Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d1c5508 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Trond Myklebust
Browse files

nfs4: allow nfsv4 acls on non-regular-files



The rfc doesn't give any reason it shouldn't be possible to set an
attribute on a non-regular file.  And if the server supports it, then it
shouldn't be up to us to prevent it.

Thanks to Erez for the report and Trond for further analysis.

Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Tested-by: default avatarErez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent f3c391e8
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3617,10 +3617,6 @@ int nfs4_setxattr(struct dentry *dentry, const char *key, const void *buf,
	if (strcmp(key, XATTR_NAME_NFSV4_ACL) != 0)
		return -EOPNOTSUPP;

	if (!S_ISREG(inode->i_mode) &&
	    (!S_ISDIR(inode->i_mode) || inode->i_mode & S_ISVTX))
		return -EPERM;

	return nfs4_proc_set_acl(inode, buf, buflen);
}