summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2004-03-11 18:09:43 +0000
committerbeck <beck@openbsd.org>2004-03-11 18:09:43 +0000
commitc3e1a8583b1d1f0635c73686ca102cda66e40421 (patch)
treedae427859794e0f53fc2a6dd2e1a83cab24d879e
parentRemove sync() calls that immediately precede databse close(). Since (diff)
downloadwireguard-openbsd-c3e1a8583b1d1f0635c73686ca102cda66e40421.tar.xz
wireguard-openbsd-c3e1a8583b1d1f0635c73686ca102cda66e40421.zip
open O_RDONLY when listing
ok millert@, dharmei@
-rw-r--r--usr.sbin/spamdb/spamdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/spamdb/spamdb.c b/usr.sbin/spamdb/spamdb.c
index 67ee5e811b3..96be5dca301 100644
--- a/usr.sbin/spamdb/spamdb.c
+++ b/usr.sbin/spamdb/spamdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamdb.c,v 1.5 2004/03/11 17:48:59 millert Exp $ */
+/* $OpenBSD: spamdb.c,v 1.6 2004/03/11 18:09:43 beck Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -164,7 +164,7 @@ dblist(char *dbname)
/* walk db, list in text format */
memset(&btreeinfo, 0, sizeof(btreeinfo));
- db = dbopen(dbname, O_EXLOCK|O_RDWR, 0600, DB_BTREE, &btreeinfo);
+ db = dbopen(dbname, O_EXLOCK|O_RDONLY, 0600, DB_BTREE, &btreeinfo);
if (db == NULL)
err(1, "dbopen");
memset(&dbk, 0, sizeof(dbk));