Date: Wed, 23 Jan 2002 19:45:02 +0100 (CET) From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> To: Ruslan Ermilov <ru@freebsd.org> Cc: freebsd-bugs@freebsd.org Subject: Re: bin/34159: chroot man page-implementation mismatch Message-ID: <Pine.BSF.4.44.0201231932040.32692-100000@naos.dbai.tuwien.ac.at> In-Reply-To: <20020123201330.A25404@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.) ;-) Index: chroot.8 =================================================================== RCS file: /sw/FreeBSD/CVSUP/src/usr.sbin/chroot/chroot.8,v retrieving revision 1.9 diff -u -3 -p -r1.9 chroot.8 --- chroot.8 2002/01/22 10:44:02 1.9 +++ chroot.8 2002/01/23 18:29:36 @@ -47,7 +47,7 @@ The .Nm command changes its root directory to the supplied directory .Ar newroot -and exec's +and then exec's .Ar command , if supplied, or an interactive copy of your shell. .Sh ENVIRONMENT >> Also, the documentation does not make it clear that "your shell" >> apparently refers to the shell in /etc/passwd, not the shell you're >> currently running. > How it could be unclear from reading the ENVIRONMENT section that > chroot(8) runs ${SHELL} or /bin/sh if SHELL is unset? I must have been blind, sorry. How about the following? Index: environ.7 =================================================================== RCS file: /sw/FreeBSD/CVSUP/src/share/man/man7/environ.7,v retrieving revision 1.17 diff -u -3 -p -r1.17 environ.7 --- environ.7 2001/07/14 19:41:13 1.17 +++ environ.7 2002/01/23 18:41:42 @@ -187,6 +187,7 @@ and unless you know what you are doing. .Sh SEE ALSO .Xr cd 1 , +.Xr chroot 8 , .Xr csh 1 , .Xr ex 1 , .Xr login 1 , @@ -198,7 +199,8 @@ unless you know what you are doing. .Xr setlocale 3 , .Xr system 3 , .Xr termcap 3 , -.Xr termcap 5 +.Xr termcap 5 , +.Xr vi 1 .Sh HISTORY The .Nm (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.) Gerald -- Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/ 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?Pine.BSF.4.44.0201231932040.32692-100000>