Small fix to _getyppass(): sometimes we can construct the wrong mapname

when looking for master.passwd.whatever.
This commit is contained in:
Bill Paul 1995-02-01 20:06:33 +00:00
parent f4df96ec7e
commit c768efa1a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6095

View File

@ -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++;
}