Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

SafeSetID: fix UID printed instead of GID

pr_warn message clearly says that GID should be printed,
but we have UID there. Let's fix that.

Found accidentally during the work on isolated user namespaces.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
[PM: fix spelling errors in description, subject tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>

authored by

Alexander Mikhalitsyn and committed by
Paul Moore
970ebb8a b432b551

+1 -1
+1 -1
security/safesetid/lsm.c
··· 131 131 * set*gid() (e.g. setting up userns gid mappings). 132 132 */ 133 133 pr_warn("Operation requires CAP_SETGID, which is not available to GID %u for operations besides approved set*gid transitions\n", 134 - __kuid_val(cred->uid)); 134 + __kgid_val(cred->gid)); 135 135 return -EPERM; 136 136 default: 137 137 /* Error, the only capabilities were checking for is CAP_SETUID/GID */