Skip to content
Snippets Groups Projects
Commit ab5348c9 authored by Stefan Berger's avatar Stefan Berger Committed by James Morris
Browse files

security: fix description of values returned by cap_inode_need_killpriv


cap_inode_need_killpriv returns 1 if security.capability exists and
has a value and inode_killpriv() is required, 0 otherwise. Fix the
description of the return value to reflect this.

Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: default avatarSerge Hallyn <serge@hallyn.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 53a2ebaa
No related branches found
No related tags found
No related merge requests found
......@@ -300,10 +300,10 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm)
*
* Determine if an inode having a change applied that's marked ATTR_KILL_PRIV
* affects the security markings on that inode, and if it is, should
* inode_killpriv() be invoked or the change rejected?
* inode_killpriv() be invoked or the change rejected.
*
* Returns 0 if granted; +ve if granted, but inode_killpriv() is required; and
* -ve to deny the change.
* Returns 1 if security.capability has a value, meaning inode_killpriv()
* is required, 0 otherwise, meaning inode_killpriv() is not required.
*/
int cap_inode_need_killpriv(struct dentry *dentry)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment