From c83098a31dd6ce5bd93de7ab7b16d9f52f20c96f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2004 19:28:31 +0000 Subject: [PATCH] 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 --- libexec/ftpd/ftpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 40741f055bd6..7d685b5de1dd 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; }