mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Smack: fix: invalid length set for the result of /smack/access
@ 2011-10-18 11:34 Jarkko Sakkinen
  2011-10-18 19:07 ` Casey Schaufler
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Sakkinen @ 2011-10-18 11:34 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: linux-kernel, linux-security-module, Jarkko Sakkinen

Forgot to update simple_transaction_set() to take terminator
character into account.

Signed-off-by: Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
---
 security/smack/smackfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 5498c4a..381eecf 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -1514,7 +1514,7 @@ static ssize_t smk_write_access(struct file *file, const char __user *buf,
 	data[0] = res == 0 ? '1' : '0';
 	data[1] = '\0';
 
-	simple_transaction_set(file, 1);
+	simple_transaction_set(file, 2);
 	return SMK_LOADLEN;
 }
 
-- 
1.7.5.4


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

* Re: [PATCH] Smack: fix: invalid length set for the result of /smack/access
  2011-10-18 11:34 [PATCH] Smack: fix: invalid length set for the result of /smack/access Jarkko Sakkinen
@ 2011-10-18 19:07 ` Casey Schaufler
  0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2011-10-18 19:07 UTC (permalink / raw)
  To: Jarkko Sakkinen; +Cc: linux-kernel, linux-security-module, James Morris

On 10/18/2011 4:34 AM, Jarkko Sakkinen wrote:
> Forgot to update simple_transaction_set() to take terminator
> character into account.
>
> Signed-off-by: Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>

Applied to git://gitorious.org/smack-next/kernel.git#master
commit d86b2b61d4dea614d6f319772a90a8f98b55ed67


> ---
>  security/smack/smackfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
> index 5498c4a..381eecf 100644
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -1514,7 +1514,7 @@ static ssize_t smk_write_access(struct file *file, const char __user *buf,
>  	data[0] = res == 0 ? '1' : '0';
>  	data[1] = '\0';
>  
> -	simple_transaction_set(file, 1);
> +	simple_transaction_set(file, 2);
>  	return SMK_LOADLEN;
>  }
>  


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

end of thread, other threads:[~2011-10-18 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18 11:34 [PATCH] Smack: fix: invalid length set for the result of /smack/access Jarkko Sakkinen
2011-10-18 19:07 ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®