From: Jeff Mahoney <jeffm@suse.com>
To: ReiserFS Devel <reiserfs-devel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Cc: Al Viron <viro@ZenIV.linux.org.uk>
Subject: [patch 2/3] reiserfs: dont associate security.* with xattr files
Date: Tue, 05 May 2009 15:30:16 -0400 [thread overview]
Message-ID: <20090505193206.840761438@suse.com> (raw)
In-Reply-To: 20090505193014.926371851@suse.com
[-- Attachment #1: reiserfs-fixup-security --]
[-- Type: text/plain, Size: 834 bytes --]
The security.* xattrs are ignored for xattr files, so don't create them.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
fs/reiserfs/xattr_security.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/fs/reiserfs/xattr_security.c
+++ b/fs/reiserfs/xattr_security.c
@@ -55,8 +55,16 @@ int reiserfs_security_init(struct inode
struct reiserfs_security_handle *sec)
{
int blocks = 0;
- int error = security_inode_init_security(inode, dir, &sec->name,
- &sec->value, &sec->length);
+ int error;
+
+ sec->name = NULL;
+
+ /* Don't add selinux attributes on xattrs - they'll never get used */
+ if (IS_PRIVATE(dir))
+ return 0;
+
+ error = security_inode_init_security(inode, dir, &sec->name,
+ &sec->value, &sec->length);
if (error) {
if (error == -EOPNOTSUPP)
error = 0;
next prev parent reply other threads:[~2009-05-05 19:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 19:30 [patch 0/3] reiserfs xattr fixups Jeff Mahoney
2009-05-05 19:30 ` [patch 1/3] reiserfs: fixup xattr_root caching Jeff Mahoney
2009-05-05 19:30 ` Jeff Mahoney [this message]
2009-05-05 19:30 ` [patch 3/3] reiserfs: remove privroot hiding in lookup Jeff Mahoney
2010-04-02 15:22 ` Edward Shishkin
2010-04-06 17:54 ` Jeff Mahoney
2009-05-05 20:13 ` [patch 0/3] reiserfs xattr fixups Al Viro
2009-05-05 20:14 ` Jeff Mahoney
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=20090505193206.840761438@suse.com \
--to=jeffm@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-devel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.