aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2017-07-26 22:27:05 -0400
committerJames Morris <james.l.morris@oracle.com>2017-09-24 00:15:41 -0400
commitab5348c9c23cd253f5902980d2d8fe067dc24c82 (patch)
treed38fb063da3df1edd50a78ff0fdb397e7d3ccc56
parent53a2ebaaabc1eb8458796fec3bc1e0e80746b642 (diff)
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>
-rw-r--r--security/commoncap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 7abebd782d5e..123426900d25 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -300,10 +300,10 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm)
300 * 300 *
301 * Determine if an inode having a change applied that's marked ATTR_KILL_PRIV 301 * Determine if an inode having a change applied that's marked ATTR_KILL_PRIV
302 * affects the security markings on that inode, and if it is, should 302 * 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.
304 * 304 *
305 * Returns 0 if granted; +ve if granted, but inode_killpriv() is required; and 305 * Returns 1 if security.capability has a value, meaning inode_killpriv()
306 * -ve to deny the change. 306 * is required, 0 otherwise, meaning inode_killpriv() is not required.
307 */ 307 */
308int cap_inode_need_killpriv(struct dentry *dentry) 308int cap_inode_need_killpriv(struct dentry *dentry)
309{ 309{