]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Describe borg-pwd better, remove dead code.
authorStan Shebs <stanshebs@google.com>
Fri, 21 Aug 2015 21:50:53 +0000 (14:50 -0700)
committerStan Shebs <stanshebs@google.com>
Fri, 21 Aug 2015 21:50:53 +0000 (14:50 -0700)
README.google
nss/nss_borg/borg-pwd.c

index 804f7d756a2d0333ebb0985e709becb05a23d399..035ff765f724ef7aa654abf2cc9c92b017b9c0c5 100644 (file)
@@ -443,6 +443,7 @@ libio/fmemopen.c
 libio/test-fmemopen.c
   For b/22167761, backport fix buffer overflow for writes to memory buffer stream (PR18549)
   https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7c2ce714d4e853aadbec13b920576fdfada520f1
+  (stanshebs, backport)
 
 string/string.h
 math/bits/mathcalls.h
@@ -461,6 +462,7 @@ nptl/tst-tls77mod.c
   upstream commit
   https://sourceware.org/git/?p=glibc.git&a=commit&h=f8aeae347377f3dfa8cbadde057adf1827fb1d44
   fixes this problem in a different way, so this patch is not needed upstream.
+  (stanshebs, google-local)
 
 elf/link.h
 socket/sys/un.h
@@ -471,3 +473,8 @@ socket/sys/un.h
 resolv/nss_dns/dns-host.c
   For b/21023324, backport buffer overflow in getanswer_r (PR18287, CVE-2015-1781)
   https://sourceware.org/git/?p=glibc.git;a=commit;h=2959eda9272a03386
+  (stanshebs, backport)
+
+nss/nss_borg/borg-pwd.c
+  Improve documentation, remove dead code.
+  (stanshebs, google-local)
index dc8206a48922a0f9bdba43be57a514f5d2147c69..61b29441c9e1e71f50f03e2acea2f16d6d941f2f 100644 (file)
@@ -2,6 +2,8 @@
 // Author: Paul Menage
 
 // An NSS module that extends local user account lookup to the file /etc/passwd.borg
+// (Despite the suggestive name, passwd.borg is just a second file in the standard
+// passwd format, separated for various reasons. -sts 2015)
 
 #include <stdio.h>
 #include <pwd.h>
 #include <errno.h>
 #include <string.h>
 
-#ifdef NSSBORG_STANDALONE
-#include <pthread.h>
-static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-#define NSSBORG_LOCK  pthread_mutex_lock(&mutex)
-#define NSSBORG_UNLOCK pthread_mutex_unlock(&mutex)
-#else
 #include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, lock)
 #define NSSBORG_LOCK  __libc_lock_lock (lock)
 #define NSSBORG_UNLOCK  __libc_lock_unlock (lock);
-#endif
 
 static FILE *f;