summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2008-06-25 14:51:27 +0000
committermillert <millert@openbsd.org>2008-06-25 14:51:27 +0000
commitc39c6cccd9f1558ae1606c3b95236322eec53962 (patch)
treef95bdcfd4ba5f629f43ddebcb9ca25f2ed25d4e9 /usr.sbin/pwd_mkdb
parentsync (diff)
downloadwireguard-openbsd-c39c6cccd9f1558ae1606c3b95236322eec53962.tar.xz
wireguard-openbsd-c39c6cccd9f1558ae1606c3b95236322eec53962.zip
Add _PW_BUF_LEN define and use it instead of hard-coding 1024 for
the buffer size. OK deraadt@
Diffstat (limited to 'usr.sbin/pwd_mkdb')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c
index b55eec1d7dd..17493cf48ef 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.c
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwd_mkdb.c,v 1.39 2008/03/17 20:30:16 sobrado Exp $ */
+/* $OpenBSD: pwd_mkdb.c,v 1.40 2008/06/25 14:51:27 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -41,7 +41,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";
#else
-static const char rcsid[] = "$OpenBSD: pwd_mkdb.c,v 1.39 2008/03/17 20:30:16 sobrado Exp $";
+static const char rcsid[] = "$OpenBSD: pwd_mkdb.c,v 1.40 2008/06/25 14:51:27 millert Exp $";
#endif
#endif /* not lint */
@@ -490,7 +490,7 @@ void
db_store(FILE *fp, FILE *oldfp, DB *edp, DB *dp, struct passwd *pw,
int keytype, char *username, uid_t olduid)
{
- char *p, *t, buf[LINE_MAX * 2], tbuf[1024];
+ char *p, *t, buf[LINE_MAX * 2], tbuf[_PW_BUF_LEN];
int flags = 0, dbmode, found = 0;
static int firsttime = 1;
DBT data, key;