1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

Remove some code that's no longer needed because it's now part of pw_scan(3).

It was also leading to segfaults; pw can be NULL when control reaches these
lines now, because of the way my previous change restructured the loops.

Reported by:	lwhsu@
This commit is contained in:
Ian Lepore 2018-07-27 15:17:24 +00:00
parent 95c05062ec
commit 029a2d652e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336762

View File

@ -113,18 +113,6 @@ vnextpwent(char const *nam, uid_t uid, int doclose)
}
free(line);
/*
* If we read the non-master passwd, some fields may not have been
* populated. Clean them up so that the output looks the same as that
* generated using getpwnam() which also inits them to these values.
*/
if (!(pw->pw_fields & _PWF_CLASS))
pw->pw_class = "";
if (!(pw->pw_fields & _PWF_CHANGE))
pw->pw_change = 0;
if (!(pw->pw_fields & _PWF_EXPIRE))
pw->pw_expire = 0;
return (pw);
}