diff options
author | espie <espie@openbsd.org> | 2008-01-25 13:52:20 +0000 |
---|---|---|
committer | espie <espie@openbsd.org> | 2008-01-25 13:52:20 +0000 |
commit | 3ca821ab96d6cc43c2fb8ff2a3a6bfc327c26639 (patch) | |
tree | 042e6b9dd7f7c78afc1e49e7d09f0b501340d783 /usr.sbin/inetd | |
parent | show an example for writing ErrorLog to syslog (diff) | |
download | wireguard-openbsd-3ca821ab96d6cc43c2fb8ff2a3a6bfc327c26639.tar.xz wireguard-openbsd-3ca821ab96d6cc43c2fb8ff2a3a6bfc327c26639.zip |
validate argv, okay otto@, henning@
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 39f67cf8aea..ec29549c37a 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.125 2008/01/05 09:53:42 jmc Exp $ */ +/* $OpenBSD: inetd.c,v 1.126 2008/01/25 13:52:20 espie Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -37,7 +37,7 @@ char copyright[] = #ifndef lint /*static const char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/ -static const char rcsid[] = "$OpenBSD: inetd.c,v 1.125 2008/01/05 09:53:42 jmc Exp $"; +static const char rcsid[] = "$OpenBSD: inetd.c,v 1.126 2008/01/25 13:52:20 espie Exp $"; #endif /* not lint */ /* @@ -376,6 +376,11 @@ main(int argc, char *argv[]) progname); exit(1); } + if (argc > 1) { + fprintf(stderr, "%s: more than one argument specified\n", + progname); + exit(1); + } umask(022); if (debug == 0) { |