Skip to content

Commit

Permalink
security: fix description of values returned by cap_inode_need_killpriv
Browse files Browse the repository at this point in the history
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: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
  • Loading branch information
Stefan Berger authored and James Morris committed Sep 24, 2017
1 parent 53a2eba commit ab5348c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/commoncap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ab5348c

Please sign in to comment.