summary refs log tree commit diff
path: root/nis/nis_lookup.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-08-07 19:28:26 +0000
committerJakub Jelinek <jakub@redhat.com>2006-08-07 19:28:26 +0000
commit503d6a958581777473c31f73113d0fa6cff19b30 (patch)
treec8526f0403ac272cba94213a3c5b10a369876d78 /nis/nis_lookup.c
parent98d2266156a49df5f93726c8f0b148bbdee41c9d (diff)
downloadglibc-503d6a958581777473c31f73113d0fa6cff19b30.tar.gz
glibc-503d6a958581777473c31f73113d0fa6cff19b30.tar.xz
glibc-503d6a958581777473c31f73113d0fa6cff19b30.zip
Updated to fedora-glibc-20060807T1859 cvs/fedora-glibc-2_4_90-18
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);