summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/pw_scan.c6
-rw-r--r--usr.sbin/pwd_mkdb/pw_scan.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/gen/pw_scan.c b/lib/libc/gen/pw_scan.c
index a24380f..09556a3 100644
--- a/lib/libc/gen/pw_scan.c
+++ b/lib/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) {
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