summaryrefslogtreecommitdiff
path: root/lib/libutil/passwd.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-02-15 09:47:55 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-02-15 09:47:55 +0000
commit7a78ebf220e81857ae66c73f7995d83dfaa70d98 (patch)
tree410629106cf3245a98aa50a223f73e1abb6b7890 /lib/libutil/passwd.c
parent6fe02401d64298aca78de499672f5607e35d14a8 (diff)
when using strsep you should be aware that the delimiter will be replaced
by a nifty '0', so you cant check for a colon instead and dump some I am sorry, Dave. I can't do that.
Diffstat (limited to 'lib/libutil/passwd.c')
-rw-r--r--lib/libutil/passwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c
index 323b04f9498..a86b61bac5b 100644
--- a/lib/libutil/passwd.c
+++ b/lib/libutil/passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: passwd.c,v 1.6 1997/02/13 05:41:38 deraadt Exp $ */
+/* $OpenBSD: passwd.c,v 1.7 1997/02/15 09:47:54 provos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994, 1995
* The Regents of the University of California. All rights reserved.
@@ -287,7 +287,7 @@ pw_scan(bp, pw, flags)
warnx("root uid should be 0");
return (0);
}
- if (*p2 != ':') {
+ if (*p2 != '\0') {
warnx("illegal uid field");
return (0);
}
@@ -303,7 +303,7 @@ pw_scan(bp, pw, flags)
if (!(p = strsep(&bp, ":"))) /* gid */
goto fmt;
id = strtoul(p, &p2, 10);
- if (*p2 != ':') {
+ if (*p2 != '\0') {
warnx("illegal gid field");
return (0);
}