Commit 1ca86ac1 authored by Yanwei Gao's avatar Yanwei Gao Committed by Micah Morton

LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl

First, the code is found to be irregular through checkpatch.pl.
Then I found break is really useless here.
Signed-off-by: default avatarYanwei Gao <gaoyanwei.tx@gmail.com>
Signed-off-by: default avatarMicah Morton <mortonm@chromium.org>
parent 9f4ad9e4
...@@ -125,7 +125,6 @@ static int safesetid_security_capable(const struct cred *cred, ...@@ -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", 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)); __kuid_val(cred->uid));
return -EPERM; return -EPERM;
break;
case CAP_SETGID: case CAP_SETGID:
/* /*
* If no policy applies to this task, allow the use of CAP_SETGID for * 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, ...@@ -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", 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)); __kuid_val(cred->uid));
return -EPERM; return -EPERM;
break;
default: default:
/* Error, the only capabilities were checking for is CAP_SETUID/GID */ /* Error, the only capabilities were checking for is CAP_SETUID/GID */
return 0; return 0;
break;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment