summary refs log tree commit diff
path: root/nis/nis_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_lookup.c')
-rw-r--r--nis/nis_lookup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c
index c198376464..839ee4ee42 100644
--- a/nis/nis_lookup.c
+++ b/nis/nis_lookup.c
@@ -127,7 +127,7 @@ nis_lookup (const_nis_name name, const unsigned int flags)
 			/* Otherwise __nisfind_server will not do anything.  */
 			dir = NULL;
 
-			if (__nisfind_server (req.ns_name, &dir)
+			if (__nisfind_server (req.ns_name, 1, &dir)
 			    != NIS_SUCCESS)
 			  goto out;
 
@@ -147,6 +147,11 @@ nis_lookup (const_nis_name name, const unsigned int flags)
 			  nis_domain_of_r (req.ns_name, ndomain,
 					   sizeof (ndomain));
 			  req.ns_name = strdupa (ndomain);
+			  if (strcmp (ndomain, ".") == 0)
+			    {
+			      NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE;
+			      goto out;
+			    }
 
 			  __nisbind_destroy (&bptr);
 			  nis_free_directory (dir);