summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1999-11-22 12:42:38 +0000
committerEivind Eklund <eivind@FreeBSD.org>1999-11-22 12:42:38 +0000
commitf739ced635a92eaeb4e29318fe2f30d3cf80dc0e (patch)
treea112ba7268c601a2f70b85e361ad3e13995ea6ba /libc
parent379672e624516d80201f17492040301a9dc9cdc4 (diff)
downloadpw-darwin-f739ced635a92eaeb4e29318fe2f30d3cf80dc0e.tar.gz
pw-darwin-f739ced635a92eaeb4e29318fe2f30d3cf80dc0e.tar.zst
pw-darwin-f739ced635a92eaeb4e29318fe2f30d3cf80dc0e.zip
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
Diffstat (limited to 'libc')
-rw-r--r--libc/gen/pw_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/gen/pw_scan.c b/libc/gen/pw_scan.c
index a24380f..09556a3 100644
--- a/libc/gen/pw_scan.c
+++ b/libc/gen/pw_scan.c
@@ -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) {