diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-18 18:17:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-18 18:17:59 +0000 |
commit | 598e3cbaf8767e694003bccbfd0356efec4222ed (patch) | |
tree | a0d49e4a1f47d2afe82bf7b7cb60bbf041a2a902 /usr.bin/cap_mkdb | |
parent | f7997709b8dc33be95594f11d083c74a2f4529b7 (diff) |
use cgetusedb(3)
Diffstat (limited to 'usr.bin/cap_mkdb')
-rw-r--r-- | usr.bin/cap_mkdb/cap_mkdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 689230c2197..4fa82f655ad 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cap_mkdb.c,v 1.6 2000/09/22 22:22:22 naddy Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.7 2001/06/18 18:17:58 millert Exp $ */ /* $NetBSD: cap_mkdb.c,v 1.5 1995/09/02 05:47:12 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cap_mkdb.c 8.2 (Berkeley) 4/27/95"; #endif -static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.6 2000/09/22 22:22:22 naddy Exp $"; +static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.7 2001/06/18 18:17:58 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -119,7 +119,7 @@ main(argc, argv) /* * The database file is the first argument if no name is specified. - * Make arrangements to unlink it if exit badly. + * Make arrangements to unlink it if we exit badly. */ (void)snprintf(buf, sizeof(buf), "%s.db", capname ? capname : *argv); if ((capname = strdup(buf)) == NULL) @@ -168,6 +168,8 @@ db_build(ifiles) int st; char *bp, *p, *t; + cgetusedb(0); /* disable reading of .db files in getcap(3) */ + data.data = NULL; key.data = NULL; for (reccnt = 0, bplen = 0; |