diff options
Diffstat (limited to 'daemon/file.c')
-rw-r--r-- | daemon/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/file.c b/daemon/file.c index dbdbbaae..7a0f8f92 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -198,6 +198,11 @@ do_chmod (int mode, const char *path) { int r; + if (mode < 0) { + reply_with_error ("%s: mode is negative", path); + return -1; + } + CHROOT_IN; r = chmod (path, mode); CHROOT_OUT; |