Fix bug introduced in previous commit: users obtained via compat mode

had uid, gid set to 0 if not otherwise specified!

Submitted by:	eivind
This commit is contained in:
nectar 2000-11-13 21:22:50 +00:00
parent cdfb854ffa
commit 7df19d1455

View File

@ -213,9 +213,14 @@ __pwproto_set()
}
/* uid, gid */
if (pw->pw_fields & _PWF_UID) {
__pwproto->pw_uid = pw->pw_uid;
__pwproto_flags |= _PWF_UID;
}
if (pw->pw_fields & _PWF_GID) {
__pwproto->pw_gid = pw->pw_gid;
__pwproto_flags |= _PWF_UID | _PWF_GID;
__pwproto_flags |= _PWF_GID;
}
/* gecos */
if(pw->pw_gecos && (pw->pw_gecos)[0]) {