[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jailkit-users] jk_init, jk_cp, and Gentoo /lib64
From: |
Stephen Tallowitz |
Subject: |
Re: [Jailkit-users] jk_init, jk_cp, and Gentoo /lib64 |
Date: |
Tue, 8 Aug 2006 22:50:16 +0200 |
Hello Jeffrey,
my guess is: once you compile bash on AMD64 it uses the real 64bit-libraries
(in 'lib64') and does not resort to the "legacy" libraries installed in 'lib'.
jk_init only copies the libraries in 'lib' - what jk_init does in detail is
defined in /etc/jailkit/jk_init.ini.
So if you're really having a problem with lib64, bash can't find the required
path in the jail because libc.so is missing in 'lib64'.
jk_cp is more analytic about the problem and actually copies the dependencies
it finds in the binary (i.e. bash). jk_cp looks through the binary with ldd
(which also returns full paths of the required libraries) and then copies the
dependencies into the jail.
If you have some spare time: try adding the lib64 paths to jk_init.ini and
rebuild the jail using jk_init only - oh and please report back if it works.
Cheers,
Stephen
On Tue, 8 Aug 2006 14:01:34 -0400
"Jeffrey Erikson" <address@hidden> wrote:
> I went through the instructions for installing and configuring jailkit found
> on the website (using both the 2.0 release and the cvs snapshot). My system
> is an AMD64 running Gentoo, kernel 2.6.17-gentoo-r4. When I would try to
> log in with my jailed user both through ssh and via 'su - username', I wound
> up with errors like this:
> /bin/bash: error while loading shared libraries: libc.so.6: cannot open
> shared object file: No such file or directory
>
> Looking in <chroot>/lib and <chroot>/lib64, it appeared that all the
> libraries were in place. After a while, on a whim, I decided to use jk_cp
> to copy the libs manually (rather than through jk_init as in the install
> guide). I got the libs needed for bash copied over, logged in successfully,
> and tried executing some commands, which of course needed different libs. I
> eventually wrote a simple shell script to copy over all the libs from
> /lib64. Everything seems to be working.
>
> My question is, did I miss something in the install or is this something
> weird about AMD64 or Gentoo-specific installs? I looked through the message
> archives, but I couldn't find much other than advice to make sure the libs
> were there (which they appeared to be at first).
>
> BTW, now that I have it working, I love jailkit. Great work!
>
> Jeffrey Erikson
>