From 3f8b9cfe8558553bb9940d0772835f39166f339e Mon Sep 17 00:00:00 2001 From: Yaroslav Tykhiy Date: Sat, 7 Feb 2004 14:38:04 +0000 Subject: [PATCH] perror_reply() should not be used where errno isn't meaningful. --- libexec/ftpd/ftpd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 27182de26394..9976967a9f09 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2449,7 +2449,11 @@ delete(char *name) } goto done; } - if ((guest && noguestmod) || unlink(name) < 0) { + if (guest && noguestmod) { + reply(550, "Operation not permitted"); + return; + } + if (unlink(name) < 0) { perror_reply(550, name); return; }