summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2007-02-26 22:50:52 +0000
committermillert <millert@openbsd.org>2007-02-26 22:50:52 +0000
commit03ac6a35017a303c24c55aef7ea7eea753f29a9c (patch)
tree0335d6345f873bb40a93db92de38ccd4432b7a5c
parentbecause sparc has variable pagesize, ctob() varies between machines, and we (diff)
downloadwireguard-openbsd-03ac6a35017a303c24c55aef7ea7eea753f29a9c.tar.xz
wireguard-openbsd-03ac6a35017a303c24c55aef7ea7eea753f29a9c.zip
Error out if the -t or -T options are specified without -a or -d.
OK beck@
-rw-r--r--usr.sbin/spamdb/spamdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/spamdb/spamdb.c b/usr.sbin/spamdb/spamdb.c
index d067242ec24..87224eab2f4 100644
--- a/usr.sbin/spamdb/spamdb.c
+++ b/usr.sbin/spamdb/spamdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamdb.c,v 1.20 2007/02/23 22:40:50 beck Exp $ */
+/* $OpenBSD: spamdb.c,v 1.21 2007/02/26 22:50:52 millert Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -291,6 +291,8 @@ main(int argc, char **argv)
}
argc -= optind;
argv += optind;
+ if (action == 0 && type != WHITE)
+ usage();
memset(&hashinfo, 0, sizeof(hashinfo));
db = dbopen(PATH_SPAMD_DB, O_EXLOCK|O_RDWR, 0600, DB_HASH,