summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2012-10-11 21:55:16 +0000
committergilles <gilles@openbsd.org>2012-10-11 21:55:16 +0000
commit1f49c3f6b8677ea4ad18aaa503f62c2efec06ae1 (patch)
tree033b8665e2245517f04bf4cadd0fbac82bf008c3
parent- no need to assign a separator to the last route flag since we're not (diff)
downloadwireguard-openbsd-1f49c3f6b8677ea4ad18aaa503f62c2efec06ae1.tar.xz
wireguard-openbsd-1f49c3f6b8677ea4ad18aaa503f62c2efec06ae1.zip
- if argc / argv not empty after getopt() loop, display usage
-rw-r--r--usr.sbin/smtpd/smtpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 8766ddb4251..4d312e90f15 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.174 2012/10/04 18:25:39 eric Exp $ */
+/* $OpenBSD: smtpd.c,v 1.175 2012/10/11 21:55:16 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -541,6 +541,9 @@ main(int argc, char *argv[])
argv += optind;
argc -= optind;
+ if (argc || *argv)
+ usage();
+
ssl_init();
if (parse_config(&smtpd, conffile, opts))