Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 2003d1abfa0c20ee77815f0da33e2c1c > files > 171

glibc-2.5-49.el5_5.5.src.rpm

2007-08-17  Jakub Jelinek  <jakub@redhat.com>

	* nis/nis_table.c (nis_list): Don't fail if __follow_path returned
	NIS_NOTFOUND.

--- libc/nis/nis_table.c	21 Mar 2007 20:24:59 -0000	1.41
+++ libc/nis/nis_table.c	22 Aug 2007 16:04:09 -0000	1.42
@@ -372,7 +372,8 @@ nis_list (const_nis_name name, unsigned 
 					     &bptr);
 		if (clnt_status != NIS_SUCCESS)
 		  {
-		    NIS_RES_STATUS (res) = clnt_status;
+		    if (clnt_status == NIS_NOMEMORY)
+		      NIS_RES_STATUS (res) = clnt_status;
 		    ++done;
 		  }
 		else
@@ -452,10 +453,14 @@ nis_list (const_nis_name name, unsigned 
 		  ++done;
 		else
 		  {
-		    NIS_RES_STATUS (res)
+		    clnt_status
 		      = __follow_path (&tablepath, &tableptr, ibreq, &bptr);
-		    if (NIS_RES_STATUS (res) != NIS_SUCCESS)
-		      ++done;
+		    if (clnt_status != NIS_SUCCESS)
+		      {
+			if (clnt_status == NIS_NOMEMORY)
+			  NIS_RES_STATUS (res) = clnt_status;
+			++done;
+		      }
 		  }
 	      }
 	    break;