diff options
author | anholt <anholt@FreeBSD.org> | 2004-01-07 19:28:31 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2004-01-07 19:28:31 +0000 |
commit | f69246ee4c53fb47ff25ab50e46f7e76fa1a080a (patch) | |
tree | fa26d2e73477a3460836434653bfca85e3822af6 /libexec | |
parent | 84188165535e053e9d542836d8b4e1326779ac2c (diff) | |
download | FreeBSD-src-f69246ee4c53fb47ff25ab50e46f7e76fa1a080a.zip FreeBSD-src-f69246ee4c53fb47ff25ab50e46f7e76fa1a080a.tar.gz |
man ftpd says that "by default, anonymous users cannot modify existing files."
However, the code did allow deletion of files. Make deleting require the -m
flag, too.
PR: bin/60809
Submitted by: Alexander Melkov <melkov@comptek.ru>
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 40741f0..7d685b5 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2441,7 +2441,7 @@ delete(char *name) } goto done; } - if (unlink(name) < 0) { + if ((guest && noguestmod) || unlink(name) < 0) { perror_reply(550, name); return; } |