From f739ced635a92eaeb4e29318fe2f30d3cf80dc0e Mon Sep 17 00:00:00 2001 From: Eivind Eklund Date: Mon, 22 Nov 1999 12:42:38 +0000 Subject: 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 PR: 14865,14984 --- libc/gen/pw_scan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libc') 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) { -- cgit v1.2.3-56-ge451