ldconfig: remove chroot
Jakub Jelinek
jakub@redhat.com
Tue Sep 26 08:09:00 GMT 2000
On Tue, Sep 26, 2000 at 04:04:08PM +0200, Andreas Jaeger wrote:
>
> Hi Uli,
>
> please test the appended patch. Now ldconfig doesn't call chroot
> anymore.
Haven't tried it, but it looks too simple to me. What about if in the chroot
you have say /opt/lib -> /foo/lib symlink? Basically, if you want to avoid
using chroot (a good thing), you should do pathname lookups yourself (like
use everywhere chroot_namei routine which would give you a pathname for its
argument you can then feed to system calls (when -r is not used, it would
give you the argument, otherwise it would lstat one pathname entry after
another and if encountering a symlink, it would canonicalize it, prepend
opt_chroot if it starts with a slash and make sure you don't go out of the
chroot with ../.
Jakub
More information about the Libc-hacker
mailing list