From: Stefan Berger Date: Thu, 27 Jul 2017 02:27:05 +0000 (-0400) Subject: security: fix description of values returned by cap_inode_need_killpriv X-Git-Tag: v5.15~6410^2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab5348c9c23cd253f5902980d2d8fe067dc24c82;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Serge Hallyn Signed-off-by: James Morris --- diff --git a/security/commoncap.c b/security/commoncap.c index 7abebd7..1234269 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -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) {