(_nss_nis_getservbyname_r): If
authordrepper <drepper>
Fri, 2 Apr 2004 09:15:47 +0000 (09:15 +0000)
committerdrepper <drepper>
Fri, 2 Apr 2004 09:15:47 +0000 (09:15 +0000)
NSS_FLAG_SERVICES_AUTHORITATIVE and services.byservicename lookup
fails, return immediately.

nis/nss_nis/nis-service.c

index 6e086e4..32ac619 100644 (file)
@@ -330,6 +330,10 @@ _nss_nis_getservbyname_r (const char *name, const char *protocol,
        return NSS_STATUS_SUCCESS;
     }
 
+  /* Check if it is safe to rely on services.byservicename.  */
+  if (_nis_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE)
+    return status;
+
   struct ypall_callback ypcb;
   struct search_t req;