Commit e10337da authored by Jann Horn's avatar Jann Horn Committed by Micah Morton

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: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarMicah Morton <mortonm@chromium.org>
parent 4f72123d
......@@ -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;
}
/*
......
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