Skip to content

Commit f72f2d2

Browse files
committed
GFS2: Don't "get" xattrs for ACLs when ACLs are turned off
This is to match ext3 behaviour. We should not allow getting of xattrs relating to ACLs when ACLs are turned off. Reported-by: Nate Straz <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
1 parent ed4878e commit f72f2d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/gfs2/acl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,14 @@ static int gfs2_xattr_system_get(struct dentry *dentry, const char *name,
236236
void *buffer, size_t size, int xtype)
237237
{
238238
struct inode *inode = dentry->d_inode;
239+
struct gfs2_sbd *sdp = GFS2_SB(inode);
239240
struct posix_acl *acl;
240241
int type;
241242
int error;
242243

244+
if (!sdp->sd_args.ar_posix_acl)
245+
return -EOPNOTSUPP;
246+
243247
type = gfs2_acl_type(name);
244248
if (type < 0)
245249
return type;

0 commit comments

Comments
 (0)