1
0
Fork 0

LSM: SafeSetID: fix use of literal -1 in capable hook

The capable() hook returns an error number. -EPERM is actually the same as
-1, so this doesn't make a difference in behavior.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
alistair/sunxi64-5.4-dsi
Jann Horn 2019-04-10 09:56:27 -07:00 committed by Micah Morton
parent 4f72123da5
commit e10337daef
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ 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 -1;
return -EPERM;
}
/*