From 6808e06b15c6ed71ac3739a50b83bd53c629d43e Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 26 Feb 2007 22:50:53 +0000 Subject: Error out if the -t or -T options are specified without -a or -d. OK beck@ --- usr.sbin/spamdb/spamdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3