diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-05-05 15:30:16 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-09 10:49:39 -0400 |
commit | b82bb72ba7df473461c5e2368a4e7497c8ce76e9 (patch) | |
tree | e68e065466cbe333174cf24f3d1ffc39ddceb56d /fs/reiserfs/xattr_security.c | |
parent | ab17c4f02156c4f75d7fa43a5aa2a7f942d47201 (diff) |
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.c | 12 |
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, | |||
55 | struct reiserfs_security_handle *sec) | 55 | struct reiserfs_security_handle *sec) |
56 | { | 56 | { |
57 | int blocks = 0; | 57 | int blocks = 0; |
58 | int error = security_inode_init_security(inode, dir, &sec->name, | 58 | int error; |
59 | &sec->value, &sec->length); | 59 | |
60 | sec->name = NULL; | ||
61 | |||
62 | /* Don't add selinux attributes on xattrs - they'll never get used */ | ||
63 | if (IS_PRIVATE(dir)) | ||
64 | return 0; | ||
65 | |||
66 | error = security_inode_init_security(inode, dir, &sec->name, | ||
67 | &sec->value, &sec->length); | ||
60 | if (error) { | 68 | if (error) { |
61 | if (error == -EOPNOTSUPP) | 69 | if (error == -EOPNOTSUPP) |
62 | error = 0; | 70 | error = 0; |