Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2002 10:45:57 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc:        freebsd-bugs@freebsd.org
Subject:   Re: bin/34159: chroot man page-implementation mismatch
Message-ID:  <20020124104557.A9749@sunbay.com>
In-Reply-To: <Pine.BSF.4.44.0201231932040.32692-100000@naos.dbai.tuwien.ac.at>
References:  <20020123201330.A25404@sunbay.com> <Pine.BSF.4.44.0201231932040.32692-100000@naos.dbai.tuwien.ac.at>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020124104557.A9749>