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


Groups > linux.kernel > #1697472 > unrolled thread

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

Started byStefan Berger <stefanb@linux.vnet.ibm.com>
First post2017-07-26 20:40 +0200
Last post2017-07-27 01:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger <stefanb@linux.vnet.ibm.com> - 2017-07-26 20:40 +0200
    Re: [PATCH] security: fix description of values returned by  cap_inode_need_killpriv "Serge E. Hallyn" <serge@hallyn.com> - 2017-07-27 01:10 +0200

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

FromStefan Berger <stefanb@linux.vnet.ibm.com>
Date2017-07-26 20:40 +0200
Subject[PATCH] security: fix description of values returned by cap_inode_need_killpriv
Message-ID<u7znX-3Tc-1@gated-at.bofh.it>
cap_inode_need_killpriv returns 1 if security.capability exists,
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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/security/commoncap.c b/security/commoncap.c
index 7abebd7..92931f8 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -302,8 +302,7 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm)
  * affects the security markings on that inode, and if it is, should
  * 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, 0 otherwise.
  */
 int cap_inode_need_killpriv(struct dentry *dentry)
 {
-- 
2.7.4

[toc] | [next] | [standalone]


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

From"Serge E. Hallyn" <serge@hallyn.com>
Date2017-07-27 01:10 +0200
SubjectRe: [PATCH] security: fix description of values returned by cap_inode_need_killpriv
Message-ID<u7DBg-6H2-21@gated-at.bofh.it>
In reply to#1697472
On Wed, Jul 26, 2017 at 02:31:08PM -0400, Stefan Berger wrote:
> cap_inode_need_killpriv returns 1 if security.capability exists,
> 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 | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/security/commoncap.c b/security/commoncap.c
> index 7abebd7..92931f8 100644
> --- a/security/commoncap.c
> +++ b/security/commoncap.c
> @@ -302,8 +302,7 @@ static inline void bprm_clear_caps(struct linux_binprm *bprm)
>   * affects the security markings on that inode, and if it is, should
>   * inode_killpriv() be invoked or the change rejected?

How about dropping the question mark at the end of this sentence while you're
touching it?

>   *
> - * 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, 0 otherwise.

Can you say a few more words, something like

 * Returns 1 if security.capability has a value, meaning inode_killpriv()
 * is required.  Else return 0, meaning inode_killpriv() is not required.

thanks,
-serge

>   */
>  int cap_inode_need_killpriv(struct dentry *dentry)
>  {
> -- 
> 2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web