diff options
author | Andreas Schneider <asn@samba.org> | 2016-09-20 13:26:52 +0200 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2016-09-20 20:16:43 +0200 |
commit | 382345126c56e26d3dbc319f1c7c1dae3c4fafc9 (patch) | |
tree | 05b7da71494b92c38033243ba4a0d420fdd53807 /nsswitch/wins.c | |
parent | d8a5565ae647352d11d622bd4e73ff4568678a7c (diff) | |
download | samba-382345126c56e26d3dbc319f1c7c1dae3c4fafc9.tar.gz |
nsswitch: Also set h_errnop for nss_wins functions
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12269
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Sep 20 20:16:43 CEST 2016 on sn-devel-144
Diffstat (limited to 'nsswitch/wins.c')
-rw-r--r-- | nsswitch/wins.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nsswitch/wins.c b/nsswitch/wins.c index be84f2e0a1b..dccb6dd90ed 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: |