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/16759] New: getnetgrent_r returns blank strings instead of NULL with nscd enabled


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

            Bug ID: 16759
           Summary: getnetgrent_r returns blank strings instead of NULL
                    with nscd enabled
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nscd
          Assignee: siddhesh at redhat dot com
          Reporter: siddhesh at redhat dot com
                CC: drepper.fsp at gmail dot com

getnetgrent is supposed to return NULL for values that are wildcards
    in the (host, user, domain) triplet.  This works correctly with nscd
    disabled, but with it enabled, it returns a blank ("") instead of a
    NULL.  This is easily seen with the output of `getent netgroup foonet`
    for a netgroup foonet defined as follows in /etc/netgroup:

        foonet (,foo,)

    The output with nscd disabled is:

        foonet ( ,foo,)

    while with nscd enabled, it is:

        foonet (,foo,)

    The extra space with nscd disabled is due to the fact that `getent
    netgroup` adds it if the return value from getnetgrent is NULL for
    either host or user.

Patch coming up.

-- 
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]