Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nscd fails to start with musl #43522

Open
gabrielhdt opened this issue Apr 19, 2023 · 5 comments
Open

nscd fails to start with musl #43522

gabrielhdt opened this issue Apr 19, 2023 · 5 comments
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@gabrielhdt
Copy link

gabrielhdt commented Apr 19, 2023

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 gabrielhdt added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Apr 19, 2023
@nekopsykose
Copy link

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
Copy link

(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)

@gabrielhdt
Copy link
Author

gabrielhdt commented Apr 20, 2023

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?

@nekopsykose
Copy link

it's not specific to void no

@klarasm
Copy link
Contributor

klarasm commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

No branches or pull requests

3 participants