diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-12-23 13:56:39 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-12-23 13:56:39 +0100 |
commit | d1c216b79080ac6092c362504bcc44f5d4b929c4 (patch) | |
tree | de8c902e43e4d803f1ac35fa69fdd081995aa0dd /src/ptunnel.c | |
parent | abea0f617f6339f3eeedcc849ef690289d5bad80 (diff) |
improved error logging
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/ptunnel.c')
-rw-r--r-- | src/ptunnel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ptunnel.c b/src/ptunnel.c index a4c5ae5..af164c5 100644 --- a/src/ptunnel.c +++ b/src/ptunnel.c @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { if (opts.chroot) { pt_log(kLog_info, "Restricting file access to %s\n", opts.root_dir); if (-1 == chdir(opts.root_dir) || -1 == chroot(opts.root_dir)) { - pt_log(kLog_error, "%s: %s\n", opts.root_dir, strerror(errno)); + pt_log(kLog_error, "chdir/chroot `%s': %s\n", opts.root_dir, strerror(errno)); exit(1); } } @@ -210,7 +210,7 @@ int main(int argc, char *argv[]) { if (! freopen("/dev/null", "r", stdin) || ! freopen("/dev/null", "w", stdout) || ! freopen("/dev/null", "w", stderr)) - pt_log(kLog_error, "freopen: %s\n", strerror(errno)); + pt_log(kLog_error, "freopen `%s': %s\n", "/dev/null", strerror(errno)); } } } |