Skip to content

Commit ab5348c

Browse files
stefanbergerJames Morris
authored andcommitted
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: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
1 parent 53a2eba commit ab5348c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

security/commoncap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm)
300300
*
301301
* Determine if an inode having a change applied that's marked ATTR_KILL_PRIV
302302
* affects the security markings on that inode, and if it is, should
303-
* inode_killpriv() be invoked or the change rejected?
303+
* inode_killpriv() be invoked or the change rejected.
304304
*
305-
* Returns 0 if granted; +ve if granted, but inode_killpriv() is required; and
306-
* -ve to deny the change.
305+
* Returns 1 if security.capability has a value, meaning inode_killpriv()
306+
* is required, 0 otherwise, meaning inode_killpriv() is not required.
307307
*/
308308
int cap_inode_need_killpriv(struct dentry *dentry)
309309
{

0 commit comments

Comments
 (0)