2008-01-15 21:43:37

by J. Bruce Fields

[permalink] [raw]
Subject: [NFS] [PATCH] nfs4: allow nfsv4 acls on non-regular-files

From: J. Bruce Fields <[email protected]>

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: J. Bruce Fields <[email protected]>
Tested-by: Erez Zadok <[email protected]>
---
fs/nfs/nfs4proc.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 92bfbcb..ffe5584 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3621,10 +3621,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);
}

--
1.5.4.rc2.60.gb2e62


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs



2008-01-15 21:49:13

by Myklebust, Trond

[permalink] [raw]
Subject: Re: [NFS] [PATCH] nfs4: allow nfsv4 acls on non-regular-files


On Tue, 2008-01-15 at 16:43 -0500, J. Bruce Fields wrote:
> From: J. Bruce Fields <[email protected]>
>
> 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.

Applied. Thanks Bruce!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs