linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
@ 2017-07-27  2:27 Stefan Berger
  2017-07-27  2:42 ` Serge E. Hallyn
  2017-07-27  6:10 ` James Morris
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Berger @ 2017-07-27  2:27 UTC (permalink / raw)
  To: linux-security-module

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

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
  2017-07-27  2:27 [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger
@ 2017-07-27  2:42 ` Serge E. Hallyn
  2017-07-27  6:10 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: Serge E. Hallyn @ 2017-07-27  2:42 UTC (permalink / raw)
  To: linux-security-module

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
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv
  2017-07-27  2:27 [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger
  2017-07-27  2:42 ` Serge E. Hallyn
@ 2017-07-27  6:10 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: James Morris @ 2017-07-27  6:10 UTC (permalink / raw)
  To: linux-security-module

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>

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-27  6:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27  2:27 [PATCH v2] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger
2017-07-27  2:42 ` Serge E. Hallyn
2017-07-27  6:10 ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).