aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2015-08-21 14:50:53 -0700
committerStan Shebs <stanshebs@google.com>2015-08-21 14:50:53 -0700
commitdb2523b0dab3ec8de173f97fd8be0bc1ae35fe54 (patch)
treefd8c3d0022159b2494e1d783b89269fd20da7892
parent5ccef4d19729d502c7e796b8ff382663be601d5e (diff)
downloadglibc-db2523b0dab3ec8de173f97fd8be0bc1ae35fe54.zip
glibc-db2523b0dab3ec8de173f97fd8be0bc1ae35fe54.tar.gz
glibc-db2523b0dab3ec8de173f97fd8be0bc1ae35fe54.tar.bz2
Describe borg-pwd better, remove dead code.
-rw-r--r--README.google7
-rw-r--r--nss/nss_borg/borg-pwd.c9
2 files changed, 9 insertions, 7 deletions
diff --git a/README.google b/README.google
index 804f7d7..035ff76 100644
--- a/README.google
+++ b/README.google
@@ -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)
diff --git a/nss/nss_borg/borg-pwd.c b/nss/nss_borg/borg-pwd.c
index dc8206a..61b2944 100644
--- a/nss/nss_borg/borg-pwd.c
+++ b/nss/nss_borg/borg-pwd.c
@@ -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>
@@ -10,17 +12,10 @@
#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;