Smack: fix: invalid length set for the result of /smack/access
authorJarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
Tue, 18 Oct 2011 11:34:28 +0000 (14:34 +0300)
committerCasey Schaufler <cschaufler@cschaufler-intel.(none)>
Tue, 18 Oct 2011 16:02:57 +0000 (09:02 -0700)
Forgot to update simple_transaction_set() to take terminator
character into account.

Signed-off-by: Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
Signed-off-by: Casey Schaufler <cschaufler@cschaufler-intel.(none)>
security/smack/smackfs.c

index 5498c4a2d1aec84c386bd8272ea75d4224951d82..381eecffe516a42101c5b622fad4d92d07fab455 100644 (file)
@@ -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;
 }