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

getpwnam (and others) fail with glibc >= 2.32 #97

Open
josch opened this issue Sep 9, 2021 · 0 comments · May be fixed by #98
Open

getpwnam (and others) fail with glibc >= 2.32 #97

josch opened this issue Sep 9, 2021 · 0 comments · May be fixed by #98

Comments

@josch
Copy link

josch commented Sep 9, 2021

Hi,

Starting with glibc 2.32 the compat nss module for getpwnam calls __nss_files_fopen (which is a GLIBC_PRIVATE symbol provided by glibc) instead of fopen (see 299210c1fa67e2dfb564475986fce11cd33db9ad in glibc). This leads to getpwnam calls accessing /etc/passwd from outside the chroot and as a result programs like adduser do not work correctly anymore under fakechroot.

Relevant bug for the Debian fakechroot package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993946

Even if glibc changes to use fopen in the future, fakechroot will be broken for all glibc versions until then. One way to work around this would be to wrap __nss_files_fopen in fakechroot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant