Skip to content

Commit

Permalink
Merge tag 'safesetid-5.13' of git://github.com/micah-morton/linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed May 5, 2021
2 parents d665ea6 + 1ca86ac commit d29c9bb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions security/safesetid/lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit d29c9bb

Please sign in to comment.