aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2009-01-27 22:56:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-27 23:13:32 -0500
commit152a649b647a8ef47bb74ff9e11850fa6001bedc (patch)
treeea626697e2cbf07f1cba973158b99125e98344ae /security
parente4a7ca29039e615ce13a61b9c6abfb2aa394e9a1 (diff)
smackfs load append mode fix
Given just how hard it is to find the code that uses MAY_APPEND it's probably not a big surprise that this went unnoticed for so long. The Smack rules loading code is incorrectly setting the MAY_READ bit when MAY_APPEND is requested. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: James Morris <jmorris@namei.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smackfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 71e2b914363e..8e42800878f4 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -334,7 +334,7 @@ static ssize_t smk_write_load(struct file *file, const char __user *buf,
334 break; 334 break;
335 case 'a': 335 case 'a':
336 case 'A': 336 case 'A':
337 rule.smk_access |= MAY_READ; 337 rule.smk_access |= MAY_APPEND;
338 break; 338 break;
339 default: 339 default:
340 goto out; 340 goto out;