From c39c6cccd9f1558ae1606c3b95236322eec53962 Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 25 Jun 2008 14:51:27 +0000 Subject: Add _PW_BUF_LEN define and use it instead of hard-coding 1024 for the buffer size. OK deraadt@ --- usr.sbin/pwd_mkdb/pwd_mkdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/pwd_mkdb') 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; -- cgit v1.2.3-59-g8ed1b