summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-02-01 20:06:33 +0000
committerwpaul <wpaul@FreeBSD.org>1995-02-01 20:06:33 +0000
commit58429fdc3154ba236e45689828963fd980921654 (patch)
treee7e6d57cb6b8074b0d53b0dbc37da5f1f0415de7 /lib
parent19441ff4f8d41e6e580537b46e710335154bb5b2 (diff)
downloadFreeBSD-src-58429fdc3154ba236e45689828963fd980921654.zip
FreeBSD-src-58429fdc3154ba236e45689828963fd980921654.tar.gz
Small fix to _getyppass(): sometimes we can construct the wrong mapname
when looking for master.passwd.whatever.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/getpwent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index 9f978af..9ff593e 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -442,7 +442,8 @@ _getyppass(struct passwd *pw, const char *name, const char *map)
/* Don't even bother with this if we aren't root. */
if (!geteuid())
if (_havemaster(_pw_yp_domain)) {
- sprintf(mastermap,"master.passwd.%s",map);
+ sprintf(mastermap,"master.passwd.%s",
+ strstr(map,"byuid") ? "byuid" : "byname");
gotmaster++;
}
OpenPOWER on IntegriCloud