Subject: Re: Problems using chroot(8).
To: Micke <miny3945@comhem.se>
From: Quentin Garnier <cube@cubidou.net>
List: netbsd-users
Date: 07/11/2006 11:49:05
--D+M1YvVlDncl3vD5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 11, 2006 at 10:55:29AM +0200, Micke wrote:
> Hi all,
> I'm trying to change root directory for Apache 2.0.58 using chroot but ha=
ve run into some problems. It probably has to do with some file or library =
not present in the new directory structure, but I'm not sure. When I use kt=
russ and chroot Apache I see the following line:
>=20
> execve("/usr/local/apache/bin/httpd", 0xbfbfea58, 0xbfbfea68) Err#8 ENOEX=
EC
>=20
> According to execve(2) this means that the elf (?) magic number is invali=
d. My question is how elf determines if a magic value is invalid? Does it d=
epend on loaded libraries (the whole process image) and could I use this as=
 an indicator of that I'm still missing libraries in the chroot:ed installa=
tion?

Well, it might just mean /lib/ld.so_elf is not found.

You're not saying much about your setup anyway.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--D+M1YvVlDncl3vD5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRLN0EdgoQloHrPnoAQIirAf/WCEGqqzgGeBuHcXHXz3MeUEE4VUJXzJb
4CDspyoboQQVNTcG1NKXEkR4jmka8EDSWkGKVoNdRnsSnTooAYQdltXo1Hty5sne
h+MmF1CnF5F4hCyzJLtMhAVJijH1U1dpJgSMvisWaqec+HxLlljnIWom+79msm8i
znV35yaafElW5LTsIBa4e49XRgpHquBJTkElGtu/kw2OmXNeeS0Y4CFm+MqZ1h6j
8qknJxphapW2VhpEy5CV+jfigzGnlvVVZ8XDeceHocBFpJvJUb0BnO3e2G6EjqX0
+kCPTGd+4BOgMrESL4NyqXESLRCrMq/R1TomZCi5wbOa+ntPC0+7kw==
=24aN
-----END PGP SIGNATURE-----

--D+M1YvVlDncl3vD5--