1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

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>
This commit is contained in:
Eric Anholt 2004-01-07 19:28:31 +00:00
parent 9163fadb70
commit c83098a31d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124229

View File

@ -2441,7 +2441,7 @@ delete(char *name)
}
goto done;
}
if (unlink(name) < 0) {
if ((guest && noguestmod) || unlink(name) < 0) {
perror_reply(550, name);
return;
}