On the removal of nscd from Fedora, and the future of nscd.

DJ Delorie dj@redhat.com
Tue Mar 1 01:02:37 GMT 2022


Joseph Myers <joseph@codesourcery.com> writes:
> I think there is a reasonable case that all NSS modules that aren't in 
> libc (especially those not shipped with glibc) should be loaded only in a 
> separate process, not in the main process doing the name lookup, to avoid 
> issues with name lookup loading more or less arbitrary libraries into the 
> process doing the lookup.

Hmm... I hadn't thought of it that way, but the security implications
are compelling... and we don't hardcode the search path either, so the
user can override it via environment (unless setuid), I think.

 {
    char *shlib_name;
    if (__asprintf (&shlib_name, "libnss_%s.so%s",
                    module->name, __nss_shlib_revision) < 0)
      /* This is definitely a temporary failure.  Do not update
         module->state.  This will trigger another attempt at the next
         call.  */
      return false;

    handle = __libc_dlopen (shlib_name);
    free (shlib_name);
  }



More information about the Libc-alpha mailing list