From cee426000531bfd599a7d1c475e7e038ec881d47 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 10 May 2004 00:00:19 -0700 Subject: [PATCH] [PATCH] reiserfs: xattr permission fix From: Chris Mason From: jeffm@suse.com reiserfs permission bug fix for xattrs --- fs/reiserfs/xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 924d895402b84..718c98b1a40fd 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -1411,7 +1411,8 @@ check_capabilities: * Read/write DACs are always overridable. * 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)) return 0; -- 2.53.0