summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-11-22 12:42:38 +0000
committereivind <eivind@FreeBSD.org>1999-11-22 12:42:38 +0000
commitba4a0df540a5551dbef7f887398bcf4ebce200ba (patch)
tree5be2851b31ba18ea0a0becd568a0c996d00ac4a6 /usr.sbin/pwd_mkdb
parent887d0bc6a8dc1e5b036e633c999cb29583c761a4 (diff)
downloadFreeBSD-src-ba4a0df540a5551dbef7f887398bcf4ebce200ba.zip
FreeBSD-src-ba4a0df540a5551dbef7f887398bcf4ebce200ba.tar.gz
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 'usr.sbin/pwd_mkdb')
-rw-r--r--usr.sbin/pwd_mkdb/pw_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pwd_mkdb/pw_scan.c b/usr.sbin/pwd_mkdb/pw_scan.c
index a24380f..09556a3 100644
--- a/usr.sbin/pwd_mkdb/pw_scan.c
+++ b/usr.sbin/pwd_mkdb/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) {
OpenPOWER on IntegriCloud