Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 1996 15:45:21 -0700 (MST)
From:      Marc Slemko <marcs@znep.com>
To:        "Brian J. McGovern" <mcgovern@spoon.beta.com>
Cc:        questions@freebsd.org
Subject:   Re: chroot problems...
Message-ID:  <Pine.BSF.3.95.961114154258.546A-100000@alive.ampr.ab.ca>
In-Reply-To: <199611141907.OAA17106@spoon.beta.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Nov 1996, Brian J. McGovern wrote:

> In their home directory, I have created a directory called bin,
> statically linked csh, ls, more, rz, and sz. The program has been set
> set-uid root. On execution, it changes directories and chroot's with no
> error (error codes are 0). However, if I try to run (for instance)
> /bin/csh, bin/csh, bin/ls, or /bin/ls using a call to system()
> (ie - system("/bin/csh") ), it returns an error code 4. 

system(3) calls /bin/sh to interpret its argument.  You don't have a
/bin/sh inside the chrooted environment.  Add one and things should work.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961114154258.546A-100000>