[Samba] WINS resolver for glibc bugs (fwd)

Gerald Carter jerry at samba.org
Tue Mar 19 13:00:02 GMT 2002


Anyone want to comment?




jerry



---------- Forwarded message ----------
Date: Wed, 20 Feb 2002 16:12:43 +0800
From: Samuel Leo <samuel at bluepoint.com.cn>
To: samba at samba.org
Subject: [Samba] WINS resolver for glibc bugs

sometimes WINS resolver don't with gethostbyname2_r and getaddrinfo. add 
following function to nsswitch/wins.c solve this problem.

NSS_STATUS
_nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he,
                          char *buffer, size_t buflen, int *errnop,
                          int *h_errnop)
{
        if(af!=AF_INET){
                *h_errnop = NO_DATA;
                *errnop = EAFNOSUPPORT;
                return NSS_STATUS_UNAVAIL;
        }
        return _nss_wins_gethostbyname_r(name,he,buffer,buflen,errnop,h_errnop);
}






More information about the samba-technical mailing list