nss_wins: Fix errno values for HOST_NOT_FOUND
authorAndreas Schneider <asn@samba.org>
Sun, 13 Nov 2016 16:40:21 +0000 (17:40 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 16 Nov 2016 03:10:55 +0000 (04:10 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12269

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 16 04:10:55 CET 2016 on sn-devel-144

nsswitch/wins.c

index dccb6dd90ed9dbde44b984ed2d99254442aa8298..19d3c5b4fccb206973773dd1dc0e11adf584ed28 100644 (file)
@@ -260,8 +260,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
 
        ip = lookup_byname_backend(name);
        if (ip == NULL) {
-               *errnop = EINVAL;
-               *h_errnop = NETDB_INTERNAL;
+               *h_errnop = HOST_NOT_FOUND;
                nss_status = NSS_STATUS_NOTFOUND;
                goto out;
        }