[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r1000 - in /fsf/trunk/libc: ChangeLog nis/nss_compat/compat-grp.c



Author: eglibc
Date: Sat Dec 23 00:01:30 2006
New Revision: 1000

Log:
Import glibc-mainline for 2006-12-23

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/nis/nss_compat/compat-grp.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Dec 23 00:01:30 2006
@@ -1,3 +1,8 @@
+2006-12-22  Gavin Romig-Koch  <gavin@xxxxxxxxxx>
+
+	* nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't
+	blacklist the group till after we look it up.
+
 2006-12-21  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* include/atomic.h (atomic_forced_read): New macro.

Modified: fsf/trunk/libc/nis/nss_compat/compat-grp.c
==============================================================================
--- fsf/trunk/libc/nis/nss_compat/compat-grp.c (original)
+++ fsf/trunk/libc/nis/nss_compat/compat-grp.c Sat Dec 23 00:01:30 2006
@@ -580,13 +580,17 @@
       /* +group */
       if (result->gr_name[0] == '+' && result->gr_name[1] != '\0')
 	{
+	  /* Yes, no +1, see the memcpy call below.  */
+	  size_t len = strlen (result->gr_name);
+	  char buf[len];
 	  enum nss_status status;
 
 	  /* Store the group in the blacklist for the "+" at the end of
 	     /etc/group */
-	  blacklist_store_name (&result->gr_name[1], ent);
+	  memcpy (buf, &result->gr_name[1], len);
 	  status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
 				       buffer, buflen, errnop);
+	  blacklist_store_name (buf, ent);
 	  if (status == NSS_STATUS_SUCCESS && result->gr_gid == gid)
 	    break;
 	  else