summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/xattr_security.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-05-05 21:30:16 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 16:49:39 +0200
commitb82bb72ba7df473461c5e2368a4e7497c8ce76e9 (patch)
treee68e065466cbe333174cf24f3d1ffc39ddceb56d /fs/reiserfs/xattr_security.c
parentreiserfs: fixup xattr_root caching (diff)
downloadlinux-b82bb72ba7df473461c5e2368a4e7497c8ce76e9.tar.xz
linux-b82bb72ba7df473461c5e2368a4e7497c8ce76e9.zip
reiserfs: dont associate security.* with xattr files
The security.* xattrs are ignored for xattr files, so don't create them. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/xattr_security.c')
-rw-r--r--fs/reiserfs/xattr_security.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c
index 4d3c20e787c3..a92c8792c0f6 100644
--- a/fs/reiserfs/xattr_security.c
+++ b/fs/reiserfs/xattr_security.c
@@ -55,8 +55,16 @@ int reiserfs_security_init(struct inode *dir, struct inode *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;