Commit cee42600 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs: xattr permission fix

From: Chris Mason <mason@suse.com>

From: jeffm@suse.com

reiserfs permission bug fix for xattrs
parent 446a7461
...@@ -1411,7 +1411,8 @@ __reiserfs_permission (struct inode *inode, int mask, struct nameidata *nd, ...@@ -1411,7 +1411,8 @@ __reiserfs_permission (struct inode *inode, int mask, struct nameidata *nd,
* Read/write DACs are always overridable. * Read/write DACs are always overridable.
* Executable DACs are overridable if at least one exec bit is set. * Executable DACs are overridable if at least one exec bit is set.
*/ */
if ((mask & (MAY_READ|MAY_WRITE)) || (inode->i_mode & S_IXUGO)) if (!(mask & MAY_EXEC) ||
(inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode))
if (capable(CAP_DAC_OVERRIDE)) if (capable(CAP_DAC_OVERRIDE))
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment