coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

chroot's userspec option


From: Ken Werner
Subject: chroot's userspec option
Date: Thu, 27 Feb 2014 16:48:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi,

I noticed when using chroot's --userspec option the Gnulib's parse_user_spec function gets called that leads the glibc to dlopen libnss_compat.so.2 (probably getpwnam() that triggers the libc's NSS mechanism). Since parse_user_spec is called after the chroot system call the new root directory will be searched. I guess this means that the chroot utility attempts to parse the user spec in the "guest" environment. Is this behavior intended? In my case the chroot environment contains a libnss_compat.so.2 that's not compatible and the chroot utility fails with:

/usr/bin/chroot: relocation error: /lib/libnss_compat.so.2: symbol _nss_files_parse_pwent, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

As soon as I LD_PRELOAD libnss_compat.so.2 the "host" environment is used to parse the user spec. If this is the intended behavior it would be better if chroot calls the parse_user_spec prior issuing the chroot syscall. Any thoughts? :)

Regards,
Ken




reply via email to

[Prev in Thread] Current Thread [Next in Thread]