This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.13-110-gacd41f4


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  acd41f47eae558eb35871de3af7114c43093ff99 (commit)
      from  a04469764964a82863e0f61659bfa2d875f6fb7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=acd41f47eae558eb35871de3af7114c43093ff99

commit acd41f47eae558eb35871de3af7114c43093ff99
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri May 6 12:54:12 2011 -0400

    Report if no record is found by initgroups in nss_files.

diff --git a/ChangeLog b/ChangeLog
index 18e5a48..83c0f9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-06  Ulrich Drepper  <drepper@gmail.com>
+
+	* nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn): Return
+	NSS_STATUS_NOTFOUND if no record was found.
+
 2011-05-05  Andreas Schwab  <schwab@redhat.com>
 
 	* sunrpc/Makefile (headers): Add rpc/netdb.h.
diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
index 4c7b9f8..113abf2 100644
--- a/nss/nss_files/files-initgroups.c
+++ b/nss/nss_files/files-initgroups.c
@@ -43,6 +43,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
   char *line = NULL;
   size_t linelen = 0;
   enum nss_status status = NSS_STATUS_SUCCESS;
+  bool any = false;
 
   size_t buflen = 1024;
   void *buffer = alloca (buflen);
@@ -118,6 +119,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
 
 	      groups[*start] = grp.gr_gid;
 	      *start += 1;
+	      any = true;
 
 	      break;
 	    }
@@ -131,5 +133,5 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
 
   fclose (stream);
 
-  return status;
+  return status == NSS_STATUS_SUCCESS && !any ? NSS_STATUS_NOTFOUND : status;
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |    5 +++++
 nss/nss_files/files-initgroups.c |    4 +++-
 2 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]