summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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