diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-08-21 16:13:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-08-21 16:13:31 +0000 |
commit | 083f085a099b0d26bb88989aa8da175bb3c1d9b8 (patch) | |
tree | b760d12b90c28085013c4564a25e40f0044f8673 /libexec/spamlogd | |
parent | a500d03c08155fb51bef9f58852b235c4f79557f (diff) |
Remove the use of time_t in the greylist db file and use int64_t instead
with backwards compatibility for records with 32-bit times.
OK deraadt@ beck@
Diffstat (limited to 'libexec/spamlogd')
-rw-r--r-- | libexec/spamlogd/Makefile | 4 | ||||
-rw-r--r-- | libexec/spamlogd/spamlogd.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libexec/spamlogd/Makefile b/libexec/spamlogd/Makefile index fca36dea9a9..38c4bf13902 100644 --- a/libexec/spamlogd/Makefile +++ b/libexec/spamlogd/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.6 2007/03/04 03:19:41 beck Exp $ +# $OpenBSD: Makefile,v 1.7 2013/08/21 16:13:30 millert Exp $ PROG= spamlogd -SRCS= spamlogd.c sync.c +SRCS= spamlogd.c sync.c gdcopy.c MAN= spamlogd.8 CFLAGS+= -Wall -Wstrict-prototypes -I${.CURDIR}/../spamd diff --git a/libexec/spamlogd/spamlogd.c b/libexec/spamlogd/spamlogd.c index 40fd6e5f51c..761c73d8fd1 100644 --- a/libexec/spamlogd/spamlogd.c +++ b/libexec/spamlogd/spamlogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamlogd.c,v 1.21 2011/03/18 22:37:06 okan Exp $ */ +/* $OpenBSD: spamlogd.c,v 1.22 2013/08/21 16:13:30 millert Exp $ */ /* * Copyright (c) 2006 Henning Brauer <henning@openbsd.org> @@ -250,12 +250,12 @@ dbupdate(char *dbname, char *ip) goto bad; } } else { - if (dbd.size != sizeof(gd)) { + /* XXX - backwards compat */ + if (gdcopyin(&dbd, &gd) == -1) { /* whatever this is, it doesn't belong */ db->del(db, &dbk, 0); goto bad; } - memcpy(&gd, dbd.data, sizeof(gd)); gd.pcount++; gd.expire = now + whiteexp; memset(&dbk, 0, sizeof(dbk)); |