diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-03-20 12:49:49 -0700 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-08-30 23:44:11 -0700 |
commit | c7b96acf1456ef127fef461fcfedb54b81fecfbb (patch) | |
tree | 1cc9387d23e96685453e545bda6d5a5efea8fa63 /kernel/groups.c | |
parent | f54fb863c6bbcbafdfc332b4a4260abb5a002137 (diff) | |
download | linux-c7b96acf1456ef127fef461fcfedb54b81fecfbb.tar.gz linux-c7b96acf1456ef127fef461fcfedb54b81fecfbb.tar.bz2 linux-c7b96acf1456ef127fef461fcfedb54b81fecfbb.zip |
userns: Kill nsown_capable it makes the wrong thing easy
nsown_capable is a special case of ns_capable essentially for just CAP_SETUID and
CAP_SETGID. For the existing users it doesn't noticably simplify things and
from the suggested patches I have seen it encourages people to do the wrong
thing. So remove nsown_capable.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/groups.c')
-rw-r--r-- | kernel/groups.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/groups.c b/kernel/groups.c index 6b2588dd04ff..90cf1c38c8ea 100644 --- a/kernel/groups.c +++ b/kernel/groups.c @@ -233,7 +233,7 @@ SYSCALL_DEFINE2(setgroups, int, gidsetsize, gid_t __user *, grouplist) struct group_info *group_info; int retval; - if (!nsown_capable(CAP_SETGID)) + if (!ns_capable(current_user_ns(), CAP_SETGID)) return -EPERM; if ((unsigned)gidsetsize > NGROUPS_MAX) return -EINVAL; |