lkml.org 
[lkml]   [2011]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Smack: fix: invalid length set for the result of /smack/access
Date
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


\
 
 \ /
  Last update: 2011-10-18 13:37    [W:0.114 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site