summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dev_mkdb/dev_mkdb.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /usr.sbin/dev_mkdb/dev_mkdb.c
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz
wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.sbin/dev_mkdb/dev_mkdb.c')
-rw-r--r--usr.sbin/dev_mkdb/dev_mkdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dev_mkdb/dev_mkdb.c b/usr.sbin/dev_mkdb/dev_mkdb.c
index 08570b688b2..74a05d6d4aa 100644
--- a/usr.sbin/dev_mkdb/dev_mkdb.c
+++ b/usr.sbin/dev_mkdb/dev_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_mkdb.c,v 1.12 2013/11/27 13:32:02 okan Exp $ */
+/* $OpenBSD: dev_mkdb.c,v 1.13 2015/01/16 06:40:16 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <db.h>
@@ -60,7 +59,7 @@ main(int argc, char *argv[])
HASHINFO info;
int ch;
u_char buf[MAXNAMLEN + 1];
- char dbtmp[MAXPATHLEN], dbname[MAXPATHLEN];
+ char dbtmp[PATH_MAX], dbname[PATH_MAX];
while ((ch = getopt(argc, argv, "")) != -1)
switch(ch) {