summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-05-05 22:08:06 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-05 22:08:06 +0300
commitd29c9bb0108eedfc8f8b46f225f9539190c50d45 (patch)
treed214711145a74c908a31c991b314597f9b19edba /security
parentd665ea6ea86c785760ee4bad4543dab3267ad074 (diff)
parent1ca86ac1ec8d201478e9616565d4df5d51595cfc (diff)
downloadlinux-d29c9bb0108eedfc8f8b46f225f9539190c50d45.tar.xz
Merge tag 'safesetid-5.13' of git://github.com/micah-morton/linux
Pull SafeSetID update from Micah Morton: "Simple code cleanup This just has a single three-line code cleanup to eliminate some unnecessary 'break' statements" * tag 'safesetid-5.13' of git://github.com/micah-morton/linux: LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl
Diffstat (limited to 'security')
-rw-r--r--security/safesetid/lsm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c
index 8a176b6adbe5..1079c6d54784 100644
--- a/security/safesetid/lsm.c
+++ b/security/safesetid/lsm.c
@@ -125,7 +125,6 @@ static int safesetid_security_capable(const struct cred *cred,
pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n",
__kuid_val(cred->uid));
return -EPERM;
- break;
case CAP_SETGID:
/*
* If no policy applies to this task, allow the use of CAP_SETGID for
@@ -140,11 +139,9 @@ static int safesetid_security_capable(const struct cred *cred,
pr_warn("Operation requires CAP_SETGID, which is not available to GID %u for operations besides approved set*gid transitions\n",
__kuid_val(cred->uid));
return -EPERM;
- break;
default:
/* Error, the only capabilities were checking for is CAP_SETUID/GID */
return 0;
- break;
}
return 0;
}