summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorfoxfair <foxfair@FreeBSD.org>1998-12-12 16:08:41 +0000
committerfoxfair <foxfair@FreeBSD.org>1998-12-12 16:08:41 +0000
commita73a037fb6453c9131d32150d2bf135d2ca111c3 (patch)
tree8b8e82d06ae7ff5194803b337966fcaf3b118409 /usr.sbin
parentfb03cef48c73e6e6e820cfd034923eacaac23e68 (diff)
downloadFreeBSD-src-a73a037fb6453c9131d32150d2bf135d2ca111c3.zip
FreeBSD-src-a73a037fb6453c9131d32150d2bf135d2ca111c3.tar.gz
Close PR bin/8753 pwd_mkdb problem when having comments in passwd file
Submitted by Chia-liang Kao clkao@CirX.ORG .
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c
index 3b73d8a..9df6680 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.c
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";
#endif
static const char rcsid[] =
- "$Id: pwd_mkdb.c,v 1.26 1998/06/09 20:19:59 ache Exp $";
+ "$Id: pwd_mkdb.c,v 1.27 1998/09/29 20:01:21 dt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -287,6 +287,10 @@ main(argc, argv)
(pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-'))
yp_enabled = 1;
#define COMPACT(e) t = e; while ((*p++ = *t++));
+#ifdef PASSWD_IGNORE_COMMENTS
+ if(is_comment)
+ --cnt;
+#endif
if (!is_comment &&
(!username || (strcmp(username, pwd.pw_name) == 0))) {
/* Create insecure data. */
OpenPOWER on IntegriCloud