From 5bea2dc13f56b1cb52a3724c2fb1cc2007926a5b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 6 Nov 2015 11:00:54 +0100 Subject: [PATCH] nwrap: fix return code for getaddrinfo in case service is not valid If the specified service is not a valid service name (or port number), EAI_NONAME should be returned. Signed-off-by: Michael Adam Reviewed-by: Andreas Schneider --- lib/nss_wrapper/nss_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c index 9404d173d72..986b974429a 100644 --- a/lib/nss_wrapper/nss_wrapper.c +++ b/lib/nss_wrapper/nss_wrapper.c @@ -5108,7 +5108,7 @@ static int nwrap_getaddrinfo(const char *node, if (p != NULL) { freeaddrinfo(p); } - return EAI_SERVICE; + return EAI_NONAME; } }