mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
Make _havemaster() use yp_first() (again) instead of yp_order() to
ward off possible NIS+ evil. (I might be overly paranoid with this, but it doesn't hurt, so...)
This commit is contained in:
parent
24af9b645e
commit
85e8f5bee2
1 changed files with 6 additions and 2 deletions
|
|
@ -574,11 +574,15 @@ static char *_pw_yp_domain;
|
|||
static int
|
||||
_havemaster(char *_pw_yp_domain)
|
||||
{
|
||||
int order;
|
||||
int keylen, resultlen;
|
||||
char *key, *result;
|
||||
|
||||
if (yp_order(_pw_yp_domain, "master.passwd.byname", (int *)&order)) {
|
||||
if (yp_first(_pw_yp_domain, "master.passwd.byname",
|
||||
&key, &keylen, &result, &resultlen)) {
|
||||
free(result);
|
||||
return 0;
|
||||
}
|
||||
free(result);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue