Skip to content

Commit

Permalink
reiserfs: dont associate security.* with xattr files
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
Jeff Mahoney authored and Al Viro committed May 9, 2009
1 parent ab17c4f commit b82bb72
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fs/reiserfs/xattr_security.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b82bb72

Please sign in to comment.