diff options
author | wpaul <wpaul@FreeBSD.org> | 1997-03-10 16:47:19 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1997-03-10 16:47:19 +0000 |
commit | 7ff7ea9cd145afc8cdf94c0bf27900f137d3093a (patch) | |
tree | 27789cd841d080a27594faec6c1adbc4950bee5e /lib/libc | |
parent | ad874422e4999fd839d13b83307eaf9c2dc3603e (diff) | |
download | FreeBSD-src-7ff7ea9cd145afc8cdf94c0bf27900f137d3093a.zip FreeBSD-src-7ff7ea9cd145afc8cdf94c0bf27900f137d3093a.tar.gz |
Fix brain-o in SunOS passwd.adjunct stuff: !strstr(s, "##") is a) bad
style and b) the wrong logic. Should be strstr(s, "##") != NULL. (Note
that the passwd.adjunct stuff has not been merged into 2.2 so this bug
is not in that branch.)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getpwent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 4ec5bfc..66ed5c0 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -622,7 +622,7 @@ _pw_breakout_yp(struct passwd *pw, char *res, int resultlen, int master) if ((s = strsep(&result, ":")) == NULL) return 0; /* password */ if(!(pw->pw_fields & _PWF_PASSWD)) { /* SunOS passwd.adjunct hack */ - if (master == YP_HAVE_ADJUNCT && !strstr(s, "##")) { + if (master == YP_HAVE_ADJUNCT && strstr(s, "##") != NULL) { char *realpw; realpw = _get_adjunct_pw(pw->pw_name); if (realpw == NULL) |