diff options
Diffstat (limited to 'daemon/file.c')
-rw-r--r-- | daemon/file.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/daemon/file.c b/daemon/file.c index a5b3e854..5ca9ccfa 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -107,6 +107,24 @@ do_rm (const char *path) } int +do_rm_f (const char *path) +{ + int r; + + CHROOT_IN; + r = unlink (path); + CHROOT_OUT; + + /* Ignore ENOENT. */ + if (r == -1 && errno != ENOENT) { + reply_with_perror ("%s", path); + return -1; + } + + return 0; +} + +int do_chmod (int mode, const char *path) { int r; |