Skip to content

Commit 970ebb8

Browse files
mihalicynpcmoore
authored andcommitted
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>
1 parent b432b55 commit 970ebb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

security/safesetid/lsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int safesetid_security_capable(const struct cred *cred,
131131
* set*gid() (e.g. setting up userns gid mappings).
132132
*/
133133
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));
135135
return -EPERM;
136136
default:
137137
/* Error, the only capabilities were checking for is CAP_SETUID/GID */

0 commit comments

Comments
 (0)