void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

nscd fails to start with musl

Open gabrielhdt opened this issue 1 year ago • 6 comments

Is this a new report?

Yes

System Info

Void 6.1.21_1 x86_64-musl GenuineIntel notuptodate rrnFFF

Package(s) Affected

musl-nscd-1.1.1_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

This seems related https://gitlab.alpinelinux.org/alpine/aports/-/issues/11485

Expected behaviour

Once musl-nscd is installed, I would expect nscd to run successfully.

$ nscd # with root privileges
$ echo $?
0

Actual behaviour

$ nscd # with root privileges
nscd: libnss_files.so: Error loading shared library libnss_files.so: No such file or directory
$ echo $?
1

Steps to reproduce

$ xbps-install musl-nscd
$ nscd

gabrielhdt avatar Apr 19 '23 08:04 gabrielhdt

the /etc/nsswitch.conf needs to have things it can actually load- the files entry tries to load libnss_files, and so it fails. nobody implemented that afaik

nekopsykose avatar Apr 20 '23 03:04 nekopsykose

(i don't know what 'is' implemented and allowed in nsswitch.conf, nor 3rdparty modules, aside from https://cwrap.org/nss_wrapper.html for instance)

nekopsykose avatar Apr 20 '23 03:04 nekopsykose

If I understand correctly, this issue would be fixed by implementing libnss_files on top of musl, which may be a lot of work.

While we wait for such an implementation, can we do something to warn users that the files module isn't available? IMO we can either

  • ping the developers of https://github.com/pikhq/musl-nscd and ask them whether they want to do something about that (knowing that the last commit on the repository is 2 years old), or
  • write some documentation in the Void package, although the issues doesn't seem to be specific to Void?

gabrielhdt avatar Apr 20 '23 05:04 gabrielhdt

it's not specific to void no

nekopsykose avatar Apr 20 '23 07:04 nekopsykose

I'm trying to make nss-pam-ldapd build the nss module for musl in #49070. I found that just removing the files module from nsswitch.conf works. It seems musl always queries the local files first anyway, and if it does not find anything queries the nscd service.

klarasm avatar Mar 04 '24 14:03 klarasm