[Bug libc/12459] New: [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/12459] New: [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=12459

           Summary: [RFE] glibc could have a nss_init call that's like
                    res_init but for nsswitch.conf
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Right now, long running processes don't get updates to the nsswitch module list
in /etc/nsswitch.conf if nscd isn't running.  This is because libc caches the
module list in memory after it's initially read.

It would be useful if there was a nss_init() call akin to res_init() that would
flush the cached list and reload it.

A relevant downstream bug report is here:

https://bugzilla.redhat.com/show_bug.cgi?id=621700

In that case the long running process was GDM (graphical login screen).  A user
used authconfig to change their nsswitch.conf and then used fast user switching
(which jumps to a login screen on a different vt) to try to test the new
configuration.  Because the login screen was around before the user ran
authconfig, the list of nsswitch modules was stale.  This caused a getpwnam()
call to fail, which ultimately lead to login failure.

I worked around this for the above bug report by spawning a helper program to
do the getpwnam() call for me.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=12459

Andreas Schwab <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|drepper.fsp at gmail dot    |unassigned at sourceware
                   |com                         |dot org

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Ondrej Bilka <neleai at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |neleai at seznam dot cz

--- Comment #1 from Ondrej Bilka <neleai at seznam dot cz> ---
A more reasonable proposition would be add timestamp and reload when more cache
is older than 5 minutes.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libc                        |nss

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

--- Comment #2 from Ray Strode [halfline] <rstrode at redhat dot com> ---
so i believe the stub resolver doesn't require res_init anymore to get changes
in /etc/resolv.conf, so I'd like to to update this report to request that
changes in /etc/nsswitch.conf get updated immediately too :-)

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] [RFE] glibc could have a nss_init call that's like res_init but for nsswitch.conf

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |22041


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=22041
[Bug 22041] NSS persistently caches transient dlopen errors
--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] Auto-reloading for /etc/nsswitch.conf

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Severity|normal                      |enhancement
                 CC|                            |fweimer at redhat dot com
            Summary|[RFE] glibc could have a    |Auto-reloading for
                   |nss_init call that's like   |/etc/nsswitch.conf
                   |res_init but for            |
                   |nsswitch.conf               |
           Assignee|unassigned at sourceware dot org   |dj at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Patches for implementing reloading of nsswitch.conf are under review:
https://sourceware.org/pipermail/libc-alpha/2020-July/115678.html

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] Auto-reloading for /etc/nsswitch.conf

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.redhat.com
                   |                            |/show_bug.cgi?id=132608

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug nss/12459] Auto-reloading for /etc/nsswitch.conf

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=12459

--- Comment #4 from Ray Strode [halfline] <rstrode at redhat dot com> ---
great news, thanks!

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