This is the mail archive of the glibc-bugs@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]

[Bug nscd/22342] New: NSCD not properly caching netgroup


https://sourceware.org/bugzilla/show_bug.cgi?id=22342

            Bug ID: 22342
           Summary: NSCD not properly caching netgroup
           Product: glibc
           Version: 2.28
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nscd
          Assignee: unassigned at sourceware dot org
          Reporter: dj at redhat dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

In addinnetgrX() in netgroupcache.c, we compute the length of the key thusly:

  size_t group_len = key - group - 1;

This omits the trailing NUL from the key.  Adding debug statements to cache_add
confirms that addinnetgrX and addgetnetgrentX differ in key lengths:

 cache_add key=QAUsers len=7 db=/var/db/nscd/netgroup
 cache_add key=QAUsers len=8 db=/var/db/nscd/netgroup

All the other services include the NUL in the key, innetrg should also.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]