Regression fix: allow to create users with uid0

Reported by:	Jan Mikkelsen <janm@transactionware.com>
This commit is contained in:
Baptiste Daroussin 2015-07-13 09:08:27 +00:00
parent a46045bbfa
commit d7747c3c6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285441

View File

@ -804,7 +804,7 @@ pw_uidpolicy(struct userconf * cnf, long id)
/*
* Check the given uid, if any
*/
if (id > 0) {
if (id >= 0) {
uid = (uid_t) id;
if ((pwd = GETPWUID(uid)) != NULL && conf.checkduplicate)