summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-21 00:05:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-21 00:05:48 +0000
commit4af497239e3efd747972eeeffa9aef981a3b95bd (patch)
tree61fd49d79680c23ac5ca878898e6aede228efac9 /libexec/ftpd
parenteef4e572f8830d88bf0ff19780daeef4e648fadf (diff)
bad umask is an error, syslog; pointed out by form@
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 09626410925..d1370616f23 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.55 1999/07/20 19:55:06 deraadt Exp $ */
+/* $OpenBSD: ftpd.c,v 1.56 1999/07/21 00:05:47 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -317,11 +317,15 @@ main(argc, argv, envp)
case 'u':
{
long val = 0;
-
- val = strtol(optarg, &optarg, 8);
- if (*optarg != '\0' || val < 0 || (val & ~ACCESSPERMS))
- warnx("bad value for -u");
- else
+ char *p;
+
+ val = strtol(optarg, &p, 8);
+ if (*p != '\0' || val < 0 || (val & ~ACCESSPERMS)) {
+ syslog(LOG_ERR,
+ "ftpd: %s is a bad value for -u, aborting..",
+ optarg);
+ exit(2);
+ } else
defumask = val;
break;
}