mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Close PR bin/8753 pwd_mkdb problem when having comments in passwd file
Submitted by Chia-liang Kao clkao@CirX.ORG .
This commit is contained in:
parent
da3ff61390
commit
17b09acac9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41697
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user