]> Git Repo - linux.git/commitdiff
security: fix description of values returned by cap_inode_need_killpriv
authorStefan Berger <[email protected]>
Thu, 27 Jul 2017 02:27:05 +0000 (22:27 -0400)
committerJames Morris <[email protected]>
Sun, 24 Sep 2017 04:15:41 +0000 (21:15 -0700)
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 <[email protected]>
Reviewed-by: Serge Hallyn <[email protected]>
Signed-off-by: James Morris <[email protected]>
security/commoncap.c

index 7abebd782d5e02d0c024ca0b2b1b189b1f4f83d1..123426900d25b185b9b41c458b8e04b85b5fe7b5 100644 (file)
@@ -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)
 {
This page took 0.072793 seconds and 4 git commands to generate.