diff options
author | Giuseppe Scrivano <gscrivano@gnu.org> | 2009-05-01 23:50:11 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-05-26 15:10:22 +0200 |
commit | c45c51fe97193898f3909dcf5e4c0e117ab239a2 (patch) | |
tree | 9a146adbde39cce97dbd4e1ee5aa3eb296fe02a6 /doc | |
parent | 39285f6008a26ff1d5facbffcbf12f57d60564d1 (diff) | |
download | coreutils-c45c51fe97193898f3909dcf5e4c0e117ab239a2.tar.xz |
chroot: accept new options --userspec=U:G and --groups=G1,G2,G3
* NEWS: Note chroot's new options.
* doc/coreutils.texi: Document them.
* src/chroot.c (main): Add support for --userspec and --groups.
* tests/Makefile.am (root-tests): Add chroot/credentials.
* tests/chroot/credentials: New file.
* tests/test-lib.sh: Define NON_ROOT_GROUP to a default value.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/coreutils.texi | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 1a3075ffe..97ea830e1 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -14144,7 +14144,7 @@ underlying function is non-privileged due to lack of support in MS-Windows.} Synopses: @example -chroot @var{newroot} [@var{command} [@var{args}]@dots{}] +chroot @var{option} @var{newroot} [@var{command} [@var{args}]@dots{}] chroot @var{option} @end example @@ -14157,8 +14157,25 @@ variable or @command{/bin/sh} if not set, invoked with the @option{-i} option. @var{command} must not be a special built-in utility (@pxref{Special built-in utilities}). -The only options are @option{--help} and @option{--version}. @xref{Common -options}. Options must precede operands. +The program accepts the following options. Also see @ref{Common options}. +Options must precede operands. + +@table @samp + +@itemx --userspec=@var{user}[:@var{group}] +@opindex --userspec +By default, @var{command} is run with the same credentials +as the invoking process. +Use this option to run it as a different @var{user} and/or with a +different primary @var{group}. + +@itemx --groups=@var{groups} +@opindex --groups +Use this option to specify the supplementary @var{groups} to be +used by the new process. +The items in the list (names or numeric IDs) must be separated by commas. + +@end table Here are a few tips to help avoid common problems in using chroot. To start with a simple example, make @var{command} refer to a statically |