From: Casey Schaufler <casey@schaufler-ca.com>
To: LKLM <linux-kernel@vger.kernel.org>,
LSM <linux-security-module@vger.kernel.org>,
jmorris@namei.org
Cc: "Ahmed S. Darwish" <darwish.07@gmail.com>,
akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: [PATCH] smackfs load append mode fix
Date: Tue, 27 Jan 2009 19:56:30 -0800 [thread overview]
Message-ID: <497FD76E.1060909@schaufler-ca.com> (raw)
From: Casey Schaufler <casey@schaufler-ca.com>
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>
---
security/smack/smackfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -uprN -X linux-2.6/Documentation/dontdiff linux-2.6/security/smack/smackfs.c linux-0112/security/smack/smackfs.c
--- linux-2.6/security/smack/smackfs.c 2009-01-09 21:43:42.000000000 -0800
+++ linux-0112/security/smack/smackfs.c 2009-01-19 11:05:09.000000000 -0800
@@ -334,7 +334,7 @@ static ssize_t smk_write_load(struct fil
break;
case 'a':
case 'A':
- rule.smk_access |= MAY_READ;
+ rule.smk_access |= MAY_APPEND;
break;
default:
goto out;
reply other threads:[~2009-01-28 4:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=497FD76E.1060909@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=akpm@linux-foundation.org \
--cc=darwish.07@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox