diff options
Diffstat (limited to 'guts/chdir.c')
-rw-r--r-- | guts/chdir.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guts/chdir.c b/guts/chdir.c index b910060..ca48738 100644 --- a/guts/chdir.c +++ b/guts/chdir.c @@ -3,11 +3,17 @@ * wrap_chdir(const char *path) { * int rc = -1; */ - pseudo_debug(3, "chdir: %s\n", path ? path : "<nil>"); + pseudo_debug(2, "chdir: '%s'\n", + path ? path : "<nil>"); + + if (!path) { + errno = EFAULT; + return -1; + } rc = real_chdir(path); if (rc != -1) { - pseudo_client_op(OP_CHDIR, 0, -1, -1, path, 0); + pseudo_client_op(OP_CHDIR, -1, -1, path, 0); } /* return rc; |