mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Hmm, well, whaddya know? ypserv was making calls to the undocumented
private internal _gethostbydnsname() resolver functions..
This commit is contained in:
parent
af91b5abda
commit
f1c72c4c70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17925
@ -29,7 +29,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: yp_dnslookup.c,v 1.2 1996/05/01 02:37:46 wpaul Exp $
|
* $Id: yp_dnslookup.c,v 1.2 1996/05/31 16:01:49 wpaul Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -54,12 +54,9 @@
|
|||||||
#include "yp_extern.h"
|
#include "yp_extern.h"
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Id: yp_dnslookup.c,v 1.2 1996/05/01 02:37:46 wpaul Exp $";
|
static const char rcsid[] = "$Id: yp_dnslookup.c,v 1.2 1996/05/31 16:01:49 wpaul Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern struct hostent *_gethostbydnsname __P(( char * ));
|
|
||||||
extern struct hostent *_gethostbydnsaddr __P(( const char *, int, int ));
|
|
||||||
|
|
||||||
static char *parse(hp)
|
static char *parse(hp)
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
{
|
{
|
||||||
@ -91,7 +88,7 @@ char *yp_dnsname(address)
|
|||||||
|
|
||||||
if (strchr(address, '@'))
|
if (strchr(address, '@'))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
if ((hp = (struct hostent *)_gethostbydnsname(address)) == NULL)
|
if ((hp = (struct hostent *)_gethostbydnsname(address, AF_INET)) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
return(parse(hp));
|
return(parse(hp));
|
||||||
|
Loading…
Reference in New Issue
Block a user