Subject: Re: Problem using chroot...
To: Frank Goodman <krampus@gmail.com>
From: Dave Huang <khym@azeotrope.org>
List: netbsd-help
Date: 08/18/2005 12:58:21
On Thu, Aug 18, 2005 at 01:48:11PM -0400, Frank Goodman wrote:
> bash# cp /bin/bash jail/bin
> bash# cp /bin/csh jail/bin
> bash# cp /bin/ls jail/bin/

> bash# cp /usr/lib/libtermcap.so.0 jail/usr/lib/
> bash# cp /usr/lib/libc.so.12 jail/usr/lib/
> bash# chroot /jail /bin/csh
> # ls
> bin usr
> # bin/bash
> bin/bash: Exec format error. Wrong Architecture.
> </snip>
> 
> I get this error for every binary that's dynamically linked... can
> anyone tell me what I'm doing wrong?

I've never tried setting up a chroot jail before, but one thing you're
missing is the dynamic linker: /usr/libexec/ld.elf_so (and
/libexec/ld.elf_so, depending on which version of NetBSD you're
using... on newer versions, the one in /usr/libexec is just a symlink
to the one in /libexec)
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 29 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++