summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-12-05 17:19:27 -0600
committerLuis Henriques <luis.henriques@canonical.com>2015-01-15 10:43:33 +0000
commit7b46d23fa92895a58dca19edb2db05bb71221e95 (patch)
treec260d27439b72405edd817f7fa0b23c4b3ed318b /arch/s390/kernel
parent9a264c14988f25cb45a5aa404b1f634816160559 (diff)
downloadlinux-stable-7b46d23fa92895a58dca19edb2db05bb71221e95.tar.gz
linux-stable-7b46d23fa92895a58dca19edb2db05bb71221e95.tar.bz2
linux-stable-7b46d23fa92895a58dca19edb2db05bb71221e95.zip
groups: Consolidate the setgroups permission checks
commit 7ff4d90b4c24a03666f296c3d4878cd39001e81e upstream. Today there are 3 instances of setgroups and due to an oversight their permission checking has diverged. Add a common function so that they may all share the same permission checking code. This corrects the current oversight in the current permission checks and adds a helper to avoid this in the future. A user namespace security fix will update this new helper, shortly. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index ca38139423ae..437e61159279 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -249,7 +249,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setgroups16, int, gidsetsize, u16 __user *, grouplis
struct group_info *group_info;
int retval;
- if (!capable(CAP_SETGID))
+ if (!may_setgroups())
return -EPERM;
if ((unsigned)gidsetsize > NGROUPS_MAX)
return -EINVAL;