summaryrefslogtreecommitdiff
path: root/usr.sbin/spamdb
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-02-26 22:50:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-02-26 22:50:53 +0000
commit6808e06b15c6ed71ac3739a50b83bd53c629d43e (patch)
tree4a31cec83850c7afcecd83f90254b9f61c675b21 /usr.sbin/spamdb
parent68a7de4fe5b7bd3de868aa617615265845f9ac1d (diff)
Error out if the -t or -T options are specified without -a or -d.
OK beck@
Diffstat (limited to 'usr.sbin/spamdb')
-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,