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 Eklund 1999-11-22 12:42:38 +00:00
parent 51f4c15279
commit 637bc59616
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53581
2 changed files with 8 additions and 4 deletions

View File

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

View File

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