summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-11-22 00:05:15 +0000
committermillert <millert@openbsd.org>2004-11-22 00:05:15 +0000
commitf7fc00fb64cb5466b76d7d6dda138fa894652b95 (patch)
treee92994e512d5578807b6fa502345bd757c2a891c
parentclarify -A option; (diff)
downloadwireguard-openbsd-f7fc00fb64cb5466b76d7d6dda138fa894652b95.tar.xz
wireguard-openbsd-f7fc00fb64cb5466b76d7d6dda138fa894652b95.zip
More sensible error when both the -n and -A flags are used. Text OK jmc@
-rw-r--r--libexec/ftpd/ftpd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 6cffa5dceed..1afa5f61e61 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.154 2004/09/30 20:33:52 deraadt Exp $ */
+/* $OpenBSD: ftpd.c,v 1.155 2004/11/22 00:05:15 millert Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -70,7 +70,7 @@ static const char copyright[] =
static const char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
#else
static const char rcsid[] =
- "$OpenBSD: ftpd.c,v 1.154 2004/09/30 20:33:52 deraadt Exp $";
+ "$OpenBSD: ftpd.c,v 1.155 2004/11/22 00:05:15 millert Exp $";
#endif
#endif /* not lint */
@@ -814,7 +814,10 @@ user(char *name)
dochroot = (lc && login_getcapbool(lc, "ftp-chroot", 0)) ||
checkuser(_PATH_FTPCHROOT, name);
if (anon_only && !dochroot) {
- reply(530, "Sorry, only anonymous ftp allowed.");
+ if (anon_ok)
+ reply(530, "Sorry, only anonymous ftp allowed.");
+ else
+ reply(530, "User %s access denied.", name);
return;
}
if (pw) {