aboutsummaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2018-03-01 23:20:45 -0500
committerDJ Delorie <dj@redhat.com>2018-03-01 23:20:45 -0500
commit9a219419689b444a0af5d29b5917a5f239f8d6aa (patch)
tree49407e46e5665137263feb135bac02bc188ebdf7 /NEWS
parentfbac9a26b2037ba9ec1f364719355ec19570c856 (diff)
downloadglibc-9a219419689b444a0af5d29b5917a5f239f8d6aa.zip
glibc-9a219419689b444a0af5d29b5917a5f239f8d6aa.tar.gz
glibc-9a219419689b444a0af5d29b5917a5f239f8d6aa.tar.bz2
[BZ #22342] Fix netgroup cache keys.
Unlike other nscd caches, the netgroup cache contains two types of records - those for "iterate through a netgroup" (i.e. setnetgrent()) and those for "is this user in this netgroup" (i.e. innetgr()), i.e. full and partial records. The timeout code assumes these records have the same key for the group name, so that the collection of records that is "this netgroup" can be expired as a unit. However, the keys are not the same, as the in-netgroup key is generated by nscd rather than being passed to it from elsewhere, and is generated without the trailing NUL. All other keys have the trailing NUL, and as noted in the linked BZ, debug statements confirm that two keys for the same netgroup are added to the cache with two different lengths. The result of this is that as records in the cache expire, the purge code only cleans out one of the two types of entries, resulting in stale, possibly incorrect, and possibly inconsistent cache data. The patch simply includes the existing NUL in the computation for the key length ('key' points to the char after the NUL, and 'group' to the first char of the group, so 'key-group' includes the first char to the NUL, inclusive). [BZ #22342] * nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in key value. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit 1c81d55fc4b07b51adf68558ba74ce975153e580)
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS1
1 files changed, 1 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d6da060..ad425f2 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ The following bugs are resolved with this release:
[6889] 'PWD' mentioned but not specified
[16335] Feature test macro documentation incomplete and out of date
+ [22342] NSCD not properly caching netgroup
[22638] sparc: static binaries are broken if glibc is built by gcc
configured with --enable-default-pie
[22735] Misleading typo in time.h source comment regarding CLOCKS_PER_SECOND