diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 1999-03-27 21:51:33 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 1999-03-27 21:51:33 +0000 |
| commit | 9b030d1073af74671ea686bb3b7929a981597da8 (patch) | |
| tree | 96d489e7fd5037b1a5de6b1949f1d4c6c042ba59 | |
| parent | 4160ccd978834723c9f9ed289f09088c377740e8 (diff) | |
Notes
| -rw-r--r-- | lib/libc/gen/getpwent.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 2ee0e32aabc7..f46683fe4ee2 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -747,14 +747,21 @@ _getyppass(struct passwd *pw, const char *name, const char *map) return 0; } - sprintf(mastermap,"%s",map); - if (_gotmaster == YP_HAVE_MASTER) sprintf(mastermap,"master.%s", map); + else + sprintf(mastermap,"%s",map); if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name), - &result, &resultlen)) - return 0; + &result, &resultlen)) { + if (_gotmaster != YP_HAVE_MASTER) + return 0; + sprintf(mastermap,"%s",map); + if (yp_match(_pw_yp_domain, (char *)&mastermap, + name, strlen(name), &result, &resultlen)) + return 0; + _gotmaster = YP_HAVE_NONE; + } if (!_pw_stepping_yp) { s = strchr(result, ':'); |
