diff options
author | Eric W. Biederman | 2014-12-18 00:06:03 +0100 |
---|---|---|
committer | Karel Zak | 2015-01-09 10:32:33 +0100 |
commit | 0bf159413bdb9e324864a422b7aecb081e739119 (patch) | |
tree | 25ffb116d0a5e47a0861f1208e3af50677f4993b /include/pathnames.h | |
parent | Merge branch '2015wk01' of https://github.com/kerolasa/lelux-utiliteetit (diff) | |
download | kernel-qcow2-util-linux-0bf159413bdb9e324864a422b7aecb081e739119.tar.gz kernel-qcow2-util-linux-0bf159413bdb9e324864a422b7aecb081e739119.tar.xz kernel-qcow2-util-linux-0bf159413bdb9e324864a422b7aecb081e739119.zip |
unshare: Fix --map-root-user to work on new kernels
In rare cases droping groups with setgroups(0, NULL) is an operation
that can grant a user additional privileges. User namespaces were
allwoing that operation to unprivileged users and that had to be
fixed.
Update unshare --map-root-user to disable the setgroups operation
before setting the gid_map.
This is needed as after the security fix gid_map is restricted to
privileged users unless setgroups has been disabled.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/pathnames.h')
-rw-r--r-- | include/pathnames.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/pathnames.h b/include/pathnames.h index 0d21b980b..cbc93b769 100644 --- a/include/pathnames.h +++ b/include/pathnames.h @@ -93,6 +93,7 @@ #define _PATH_PROC_UIDMAP "/proc/self/uid_map" #define _PATH_PROC_GIDMAP "/proc/self/gid_map" +#define _PATH_PROC_SETGROUPS "/proc/self/setgroups" #define _PATH_PROC_ATTR_CURRENT "/proc/self/attr/current" #define _PATH_PROC_ATTR_EXEC "/proc/self/attr/exec" |