Update spamdb for fix in OpenBSD CVS:
'empty spamtrap address makes corrupted database'
This commit is contained in:
parent
c49a145e4a
commit
1cb9406866
2 changed files with 16 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.2 2007/05/23 17:29:10 jeremy-c-reed Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2007/08/08 13:59:26 jeremy-c-reed Exp $
|
||||
|
||||
DISTNAME= spamd-20070428
|
||||
DISTNAME= spamd-20070531
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= # empty
|
||||
DISTFILES= # empty
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: spamdb.c,v 1.22 2007/02/27 16:22:11 otto Exp $ */
|
||||
/* $OpenBSD: spamdb.c,v 1.23 2007/05/31 20:00:16 cnst Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Bob Beck. All rights reserved.
|
||||
|
@ -267,7 +267,7 @@ usage(void)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int i, ch, action = 0, type = WHITE, r = 0;
|
||||
int i, ch, action = 0, type = WHITE, r = 0, c = 0;
|
||||
HASHINFO hashinfo;
|
||||
DB *db;
|
||||
char *spamd_db_file = NULL;
|
||||
|
@ -322,11 +322,21 @@ main(int argc, char **argv)
|
|||
return dblist(db);
|
||||
case 1:
|
||||
for (i=0; i<argc; i++)
|
||||
r += dbupdate(db, argv[i], 1, type);
|
||||
if (argv[i][0] != '\0') {
|
||||
c++;
|
||||
r += dbupdate(db, argv[i], 1, type);
|
||||
}
|
||||
if (c == 0)
|
||||
errx(2, "no addresses specified");
|
||||
break;
|
||||
case 2:
|
||||
for (i=0; i<argc; i++)
|
||||
r += dbupdate(db, argv[i], 0, type);
|
||||
if (argv[i][0] != '\0') {
|
||||
c++;
|
||||
r += dbupdate(db, argv[i], 0, type);
|
||||
}
|
||||
if (c == 0)
|
||||
errx(2, "no addresses specified");
|
||||
break;
|
||||
default:
|
||||
errx(-1, "bad action");
|
||||
|
|
Loading…
Reference in a new issue