From owner-freebsd-bugs Thu Jan 24 0:46:39 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 7C70737B404 for ; Thu, 24 Jan 2002 00:46:28 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g0O8jvK12204; Thu, 24 Jan 2002 10:45:57 +0200 (EET) (envelope-from ru) Date: Thu, 24 Jan 2002 10:45:57 +0200 From: Ruslan Ermilov To: Gerald Pfeifer Cc: freebsd-bugs@freebsd.org Subject: Re: bin/34159: chroot man page-implementation mismatch Message-ID: <20020124104557.A9749@sunbay.com> References: <20020123201330.A25404@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jan 23, 2002 at 07:45:02PM +0100, Gerald Pfeifer wrote: > On Wed, 23 Jan 2002, Ruslan Ermilov wrote: > > The point here is that chroot(8) doesn't have a code that prevents it > > from working under non-root, but chroot(2) does. chroot(8) can be > > EXECUTED by a regular user too, but the result will be different. > > Also, chroot(8) behaves differently under jails. > > Ah, I see! You have to admit this is not immediate for someone who's > really a FreeBSD guru, though. > > > I disagree. It's clear that "chroot(8) changes its root directory to > > that specified, and then executes the command or a shell". > > Could I convince you to accept/install the following patch? (It makes > it more clearly, and you used "then" in your description as well.) ;-) > I'll commit this instead: Index: chroot.8 =================================================================== RCS file: /home/ncvs/src/usr.sbin/chroot/chroot.8,v retrieving revision 1.9 diff -u -p -r1.9 chroot.8 --- chroot.8 2002/01/22 10:44:02 1.9 +++ chroot.8 2002/01/24 08:46:27 @@ -32,7 +32,7 @@ .\" @(#)chroot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD: src/usr.sbin/chroot/chroot.8,v 1.9 2002/01/22 10:44:02 ru Exp $ .\" -.Dd June 9, 1993 +.Dd January 24, 2002 .Dt CHROOT 8 .Os .Sh NAME @@ -45,15 +45,15 @@ .Sh DESCRIPTION The .Nm -command changes its root directory to the supplied directory +command changes its current and root directories to the supplied directory .Ar newroot -and exec's +and then exec's .Ar command , -if supplied, or an interactive copy of your shell. +if supplied, or an interactive copy of the user's login shell. .Sh ENVIRONMENT The following environment variable is referenced by .Nm : -.Bl -tag -width SHELL +.Bl -tag -width ".Ev SHELL" .It Ev SHELL If set, the string specified by > Index: environ.7 [...] > (Adding chroot may not be that important, but as ex(1) is mentioned > exactly once, also vi(1), which is mentioned at the same place, should > be cross-referenced.) > ex(1) and vi(1) are actually the same manpage. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message