From c768efa1a8ef820fbae506eaeb5c7dbfeaaa9eb5 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Wed, 1 Feb 1995 20:06:33 +0000 Subject: [PATCH] Small fix to _getyppass(): sometimes we can construct the wrong mapname when looking for master.passwd.whatever. --- lib/libc/gen/getpwent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 9f978af7e89..9ff593eed7f 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++; }