The branch, master has been updated
       via  3823451 nsswitch: Also set h_errnop for nss_wins functions
      from  d8a5565 waf: Explicitly link against libnss_wins.so

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 382345126c56e26d3dbc319f1c7c1dae3c4fafc9
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Sep 20 13:26:52 2016 +0200

    nsswitch: Also set h_errnop for nss_wins functions
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12269
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Jim McDonough <j...@samba.org>
    
    Autobuild-User(master): Jim McDonough <j...@samba.org>
    Autobuild-Date(master): Tue Sep 20 20:16:43 CEST 2016 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/wins.c | 9 +++++++++
 1 file changed, 9 insertions(+)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index be84f2e..dccb6dd 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -261,6 +261,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
        ip = lookup_byname_backend(name);
        if (ip == NULL) {
                *errnop = EINVAL;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_NOTFOUND;
                goto out;
        }
@@ -269,6 +270,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
        wbcFreeMemory(ip);
        if (rc == 0) {
                *errnop = errno;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -279,6 +281,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
 
        if ((he->h_name = get_static(&buffer, &buflen, namelen)) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -292,6 +295,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
 
        if (get_static(&buffer, &buflen, i) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -299,6 +303,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
        if ((he->h_addr_list = (char **)get_static(
                     &buffer, &buflen, 2 * sizeof(char *))) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -306,6 +311,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
        if ((he->h_addr_list[0] = get_static(&buffer, &buflen,
                                             INADDRSZ)) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -326,6 +332,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
 
        if (get_static(&buffer, &buflen, i) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
@@ -333,12 +340,14 @@ _nss_wins_gethostbyname_r(const char *hostname,
        if ((he->h_aliases = (char **)get_static(
                     &buffer, &buflen, sizeof(char *))) == NULL) {
                *errnop = EAGAIN;
+               *h_errnop = NETDB_INTERNAL;
                nss_status = NSS_STATUS_TRYAGAIN;
                goto out;
        }
 
        he->h_aliases[0] = NULL;
 
+       *h_errnop = NETDB_SUCCESS;
        nss_status = NSS_STATUS_SUCCESS;
 
   out:


-- 
Samba Shared Repository

Reply via email to