Skip to content

Commit

Permalink
smackfs load append mode fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Casey Schaufler authored and Linus Torvalds committed Jan 28, 2009
1 parent e4a7ca2 commit 152a649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/smack/smackfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ static ssize_t smk_write_load(struct file *file, const char __user *buf,
break;
case 'a':
case 'A':
rule.smk_access |= MAY_READ;
rule.smk_access |= MAY_APPEND;
break;
default:
goto out;
Expand Down

0 comments on commit 152a649

Please sign in to comment.