* [PATCH] security: fix description of values returned by cap_inode_need_killpriv
@ 2017-07-26 18:31 Stefan Berger
2017-07-26 23:07 ` Serge E. Hallyn
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2017-07-26 18:31 UTC (permalink / raw)
To: linux-security-module, jmorris; +Cc: linux-kernel, serge, Stefan Berger
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] security: fix description of values returned by cap_inode_need_killpriv
2017-07-26 18:31 [PATCH] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger
@ 2017-07-26 23:07 ` Serge E. Hallyn
0 siblings, 0 replies; 2+ messages in thread
From: Serge E. Hallyn @ 2017-07-26 23:07 UTC (permalink / raw)
To: Stefan Berger; +Cc: linux-security-module, jmorris, linux-kernel, serge
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-26 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 18:31 [PATCH] security: fix description of values returned by cap_inode_need_killpriv Stefan Berger
2017-07-26 23:07 ` Serge E. Hallyn
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).