mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Partial fix for the forking problem: if we can't access the master maps,
try again with the unrestricted map. PR: bin/10821
This commit is contained in:
parent
4160ccd978
commit
9b030d1073
1 changed files with 11 additions and 4 deletions
|
|
@ -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, ':');
|
||||
|
|
|
|||
Loading…
Reference in a new issue