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.22-299-g5a9af63


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  5a9af6376d43b58c6545feb86002812a57956654 (commit)
      from  775e99641eca25a0dc9049253fe12b02c568f97a (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a9af6376d43b58c6545feb86002812a57956654

commit 5a9af6376d43b58c6545feb86002812a57956654
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 25 20:20:33 2015 +0200

    Fix inconsistent passwd compensation in nss/bug17079.c
    
    It used to be common practice to have a statically linked shell for an
    alternative root account, as in:
    
    root:x:0:0:root:/root:/bin/bash
    toor:x:0:0:root recovery account:/root:/sbin/sash
    
    This causes problems with passwd NSS tests because a UID-based lookup
    will only retrieve one of those entries.  The original version of
    nss/bug17079.c detected this, but failed to use this information later
    on.

diff --git a/ChangeLog b/ChangeLog
index ba7aa4e..7e8156e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-25  Florian Weimer  <fweimer@redhat.com>
+
+	* nss/bug17079.c (init_test_items): Add diagnostic for
+	inconsistent entries.
+	(test_buffer_size): Skip inconsistent entries.
+
 2015-09-25  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #13304]
diff --git a/nss/bug17079.c b/nss/bug17079.c
index 9846737..0249922 100644
--- a/nss/bug17079.c
+++ b/nss/bug17079.c
@@ -72,7 +72,11 @@ init_test_items (void)
       struct passwd *pwd2 = getpwuid (test_items[i].pw_uid);
       if (pwd1 == NULL || !equal (pwd1, test_items + i)
           || pwd2 == NULL || !equal (pwd2, test_items + i))
-        test_items[i].pw_name = NULL;
+        {
+          printf ("info: skipping user \"%s\", UID %ld due to inconsistency\n",
+                  test_items[i].pw_name, (long) test_items[i].pw_uid);
+          test_items[i].pw_name = NULL;
+        }
       else
         found = true;
     }
@@ -195,6 +199,10 @@ test_buffer_size (size_t buffer_size)
   for (int i = 0; i < test_count; ++i)
     for (size_t padding_size = 0; padding_size < 3; ++padding_size)
       {
+        /* Skip entries with inconsistent name/UID lookups.  */
+        if (test_items[i].pw_name == NULL)
+          continue;
+
         test_one (test_items + i, buffer_size, '\0', padding_size);
         if (padding_size > 0)
           {

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

Summary of changes:
 ChangeLog      |    6 ++++++
 nss/bug17079.c |   10 +++++++++-
 2 files changed, 15 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]