diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-06-22 13:16:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:24 -0400 |
commit | 055ffbea0596942579b0dae71d5dab78de8135f6 (patch) | |
tree | 4799088989e9923c45089cab905f40247af52a45 /include/linux | |
parent | b7fa0554cf1ba6d6895cd0a5b02989a26e0bc704 (diff) |
[PATCH] NFS: Fix handling of the umask when an NFSv3 default acl is present.
NFSv3 has no concept of a umask on the server side: The client applies
the umask locally, and sends the effective permissions to the server.
This behavior is wrong when files are created in a directory that has a
default ACL. In this case, the umask is supposed to be ignored, and
only the default ACL determines the file's effective permissions.
Usually its the server's task to conditionally apply the umask. But
since the server knows nothing about the umask, we have to do it on the
client side. This patch tries to fetch the parent directory's default
ACL before creating a new file, computes the appropriate create mode to
send to the server, and finally sets the new file's access and default
acl appropriately.
Many thanks to Buck Huppmann <buchk@pobox.com> for sending the initial
version of this patch, as well as for arguing why we need this change.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfs_fs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 3a5e442ac776..7662c5131b47 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -478,6 +478,15 @@ extern void nfs_readdata_release(struct rpc_task *task); | |||
478 | extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type); | 478 | extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type); |
479 | extern int nfs3_proc_setacl(struct inode *inode, int type, | 479 | extern int nfs3_proc_setacl(struct inode *inode, int type, |
480 | struct posix_acl *acl); | 480 | struct posix_acl *acl); |
481 | extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, | ||
482 | mode_t mode); | ||
483 | #else | ||
484 | static inline int nfs3_proc_set_default_acl(struct inode *dir, | ||
485 | struct inode *inode, | ||
486 | mode_t mode) | ||
487 | { | ||
488 | return 0; | ||
489 | } | ||
481 | #endif /* CONFIG_NFS_V3_ACL */ | 490 | #endif /* CONFIG_NFS_V3_ACL */ |
482 | 491 | ||
483 | /* | 492 | /* |