Allow empty UIDs if we are processing NIS records. I am not entirely

happy with how this end up and will re-visit the entire empty field
problem, but this patch solves the NIS problem for now.

Submitted by:	Dan Nelson <dan@emsphone.com>
PR:	14865,14984
This commit is contained in:
eivind 1999-11-22 12:42:38 +00:00
parent 887d0bc6a8
commit ba4a0df540
2 changed files with 8 additions and 4 deletions

View File

@ -88,8 +88,10 @@ pw_scan(bp, pw)
if (p[0]) if (p[0])
pw->pw_fields |= _PWF_UID; pw->pw_fields |= _PWF_UID;
else { else {
warnx("no uid for user %s", pw->pw_name); if (pw->pw_name[0] != '+' && pw->pw_name[0] != '-') {
return (0); warnx("no uid for user %s", pw->pw_name);
return (0);
}
} }
id = atol(p); id = atol(p);
if (root && id) { if (root && id) {

View File

@ -88,8 +88,10 @@ pw_scan(bp, pw)
if (p[0]) if (p[0])
pw->pw_fields |= _PWF_UID; pw->pw_fields |= _PWF_UID;
else { else {
warnx("no uid for user %s", pw->pw_name); if (pw->pw_name[0] != '+' && pw->pw_name[0] != '-') {
return (0); warnx("no uid for user %s", pw->pw_name);
return (0);
}
} }
id = atol(p); id = atol(p);
if (root && id) { if (root && id) {