Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697667 > unrolled thread

[PATCH v2] security: fix description of values returned by cap_inode_need_killpriv

Started byStefan Berger <stefanb@linux.vnet.ibm.com>
First post2017-07-27 04:30 +0200
Last post2017-07-27 08:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-07-27 04:30 +0200
    Re: [PATCH v2] security: fix description of values returned by  cap_inode_need_killpriv "Serge E. Hallyn" <serge@hallyn.com> - 2017-07-27 04:50 +0200
    Re: [PATCH v2] security: fix description of values returned by  cap_inode_need_killpriv James Morris <jmorris@namei.org> - 2017-07-27 08:20 +0200

#1697667 — [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv

FromStefan Berger <stefanb@linux.vnet.ibm.com>
Date2017-07-27 04:30 +0200
Subject[PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
Message-ID<u7GIN-em-15@gated-at.bofh.it>
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>
---
 security/commoncap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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)
 {
-- 
2.7.4

[toc] | [next] | [standalone]


#1697673 — Re: [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv

From"Serge E. Hallyn" <serge@hallyn.com>
Date2017-07-27 04:50 +0200
SubjectRe: [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
Message-ID<u7H2a-kG-1@gated-at.bofh.it>
In reply to#1697667
On Wed, Jul 26, 2017 at 10:27:05PM -0400, Stefan Berger wrote:
> 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>

Thanks, Stefan.

Reviewed-by: Serge Hallyn <serge@hallyn.com>

> ---
>  security/commoncap.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 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)
>  {
> -- 
> 2.7.4

[toc] | [prev] | [next] | [standalone]


#1697737 — Re: [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv

FromJames Morris <jmorris@namei.org>
Date2017-07-27 08:20 +0200
SubjectRe: [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
Message-ID<u7Kjo-2xb-15@gated-at.bofh.it>
In reply to#1697667
On Wed, 26 Jul 2017, Stefan Berger wrote:

> 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>
> ---
>  security/commoncap.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next


-- 
James Morris
<jmorris@namei.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web