summaryrefslogtreecommitdiffstats
path: root/sys-utils/unshare.1
diff options
context:
space:
mode:
authorLaurent Vivier2018-10-05 13:09:30 +0200
committerKarel Zak2018-11-12 11:52:15 +0100
commitf0af42b51761428bdd821b31381fbfa1346f6782 (patch)
treed470ecd3f56b55267523151531f95fffecf04659 /sys-utils/unshare.1
parentunshare: allow to set a new root (diff)
downloadkernel-qcow2-util-linux-f0af42b51761428bdd821b31381fbfa1346f6782.tar.gz
kernel-qcow2-util-linux-f0af42b51761428bdd821b31381fbfa1346f6782.tar.xz
kernel-qcow2-util-linux-f0af42b51761428bdd821b31381fbfa1346f6782.zip
unshare: allow to set user ID and group ID
This patch introduces two new parameters to set the user ID and the group ID of the program to be executed. Setting group ID also drops supplementary groups. The option names used are the same as for nsenter, -S, --setuid and -G, --setgid. Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'sys-utils/unshare.1')
-rw-r--r--sys-utils/unshare.17
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1
index 40cbedbd1..d2ba6c3a5 100644
--- a/sys-utils/unshare.1
+++ b/sys-utils/unshare.1
@@ -192,6 +192,13 @@ run the command with root directory set to \fIdir\fP.
.BR \-w, "\-\-wd=\fIdir"
change working directory to \fIdir\fP.
.TP
+.BR \-S, "\-\-setuid \fIuid"
+Set the user ID which will be used in the entered namespace.
+.TP
+.BR \-G, "\-\-setgid \fIgid"
+Set the group ID which will be used in the entered namespace and drop
+supplementary groups.
+.TP
.BR \-V , " \-\-version"
Display version information and exit.
.TP