Commit Graph

12 Commits

Author SHA1 Message Date
Karel Zak 47f42c1d14 nsenter: allow to use --set{uid,gid} for all namespaces
Now it's possible to set UID and GID for user namespaces only. This
patch removes this restriction and allow to use --set{uid,gid} in all
cases. The default for user namespaces is still GID=0, UID=0.

Reported-by: Tomas Doran <bobtfish@bobtfish.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-29 13:07:44 +02:00
Benno Schulenberg cf8e0bae34 docs: bring five more man pages closer to standard formatting
Also, for renice, adapt the descriptions to the behaviour: the -g,
-p and -u options do not actually need to be followed by any ID.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-21 10:29:43 +02:00
Benno Schulenberg 87ec43b671 docs: tweak wording and formatting of unshare and nsenter man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:31 +02:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Richard Weinberger 6b9e5bf670 nsenter: Allow selecting the uid and gid to be used in the entered userns
Using -S (--setuid) and -G (--setgid) one can select the uid/gid which
will be used in the entered user namespace.

[kzak@redhat.com: - use setuid/gid unconditionally (always),
                  - update man page]

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-06-18 10:35:44 +02:00
Benno Schulenberg dde08a8767 docs: normalize the formatting of man pages for nsenter and unshare
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-06-07 12:11:18 +02:00
Zbigniew Jędrzejewski-Szmek 1e3832bfd1 nsenter: fix errors in manpage
- spell abbreviations with capital letters
- fix the names of a few options and files

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2013-02-14 14:43:49 +01:00
Zbigniew Jędrzejewski-Szmek 5758069426 unshare,nsenter: spawn shell by default
The behaviour mimics chroot.

Possibly it would have been nicer to to query the password database in
the new namepace and run the shell of the user there, but it's hard to
do correctly. getpwuid() might need to load nss plugins, and the arch
in the new namespace might be different (in case of NEWNS mounts), or
the hostname might be different, etc. So in general it's not possible
to do it reliably.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2013-02-14 14:42:35 +01:00
Sami Kerola 08e86f4c2c docs: align nsenter.1 man page with howto-man-page.txt
Most visible change; the --target option has a path - explanation table
instead a long paragraph.  This makes pairing of the information easier
for an average user such as me.

The rest of the changes are about aligning with howto, i.e., fix spaces
after dots, URL & mail address macros, remove inline emphasis where
possible, mark directory paths and words with underscore to be line
breakable, use optional option syntax from howto, cut line lenght to 80
chars.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-25 15:49:51 +01:00
Zbigniew Jędrzejewski-Szmek 28384adc60 nsenter: rename --exec/-e to --no-fork/-F
The naming of this option was really confusing.
Just rename it for clarity.

[kzak@redhat.com: rebase to original code without --all]

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-25 15:32:35 +01:00
Karel Zak 620d3f2dc7 nsenter: improve optional args in usage() and man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-17 13:30:33 +01:00
Eric W. Biederman f8aa8e9495 nsenter: new command (light wrapper around setns)
Inspired by unshare, nsenter is a simple wrapper around setns that
allows running a new process in the context of an existing process.

Full paths may be specified to the namespace arguments so that
namespace file descriptors may be used wherever they reside in the
filesystem.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-01-17 13:17:13 +01:00