From owner-freebsd-questions Thu Nov 14 14:54:38 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA14188 for questions-outgoing; Thu, 14 Nov 1996 14:54:38 -0800 (PST) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA14164 for ; Thu, 14 Nov 1996 14:54:26 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.7.5/8.7.3) with UUCP id PAA18112; Thu, 14 Nov 1996 15:51:09 -0700 (MST) Received: from localhost (marcs@localhost) by alive.ampr.ab.ca (8.7.5/8.7.3) with SMTP id PAA00777; Thu, 14 Nov 1996 15:45:22 -0700 (MST) Date: Thu, 14 Nov 1996 15:45:21 -0700 (MST) From: Marc Slemko X-Sender: marcs@alive.ampr.ab.ca To: "Brian J. McGovern" cc: questions@freebsd.org Subject: Re: chroot problems... In-Reply-To: <199611141907.OAA17106@spoon.beta.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.