diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-27 14:57:39 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-10-28 10:08:46 -0400 |
commit | 85ff872d3f4a62d076d698bd1fa15ca2a4d7c100 (patch) | |
tree | 16d74f328ccb0b81470b1fbc4cad1b37e4df7ab8 /fs/9p/vfs_inode.c | |
parent | 8e44a0805fc9d77475060280136aa491aa7d7060 (diff) |
fs/9p: Implement POSIX ACL permission checking function
The ACL value is fetched as a part of inode initialization
from the server and the permission checking function use the
cached value of the ACL
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index c3d200d41dca..1249b8323961 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/xattr.h> | 38 | #include <linux/xattr.h> |
39 | #include <linux/posix_acl.h> | ||
39 | #include <net/9p/9p.h> | 40 | #include <net/9p/9p.h> |
40 | #include <net/9p/client.h> | 41 | #include <net/9p/client.h> |
41 | 42 | ||
@@ -44,6 +45,7 @@ | |||
44 | #include "fid.h" | 45 | #include "fid.h" |
45 | #include "cache.h" | 46 | #include "cache.h" |
46 | #include "xattr.h" | 47 | #include "xattr.h" |
48 | #include "acl.h" | ||
47 | 49 | ||
48 | static const struct inode_operations v9fs_dir_inode_operations; | 50 | static const struct inode_operations v9fs_dir_inode_operations; |
49 | static const struct inode_operations v9fs_dir_inode_operations_dotu; | 51 | static const struct inode_operations v9fs_dir_inode_operations_dotu; |
@@ -500,6 +502,11 @@ v9fs_inode_dotl(struct v9fs_session_info *v9ses, struct p9_fid *fid, | |||
500 | v9fs_vcookie_set_qid(ret, &st->qid); | 502 | v9fs_vcookie_set_qid(ret, &st->qid); |
501 | v9fs_cache_inode_get_cookie(ret); | 503 | v9fs_cache_inode_get_cookie(ret); |
502 | #endif | 504 | #endif |
505 | err = v9fs_get_acl(ret, fid); | ||
506 | if (err) { | ||
507 | iput(ret); | ||
508 | goto error; | ||
509 | } | ||
503 | kfree(st); | 510 | kfree(st); |
504 | return ret; | 511 | return ret; |
505 | error: | 512 | error: |
@@ -1959,7 +1966,7 @@ static const struct inode_operations v9fs_dir_inode_operations_dotl = { | |||
1959 | .getxattr = generic_getxattr, | 1966 | .getxattr = generic_getxattr, |
1960 | .removexattr = generic_removexattr, | 1967 | .removexattr = generic_removexattr, |
1961 | .listxattr = v9fs_listxattr, | 1968 | .listxattr = v9fs_listxattr, |
1962 | 1969 | .check_acl = v9fs_check_acl, | |
1963 | }; | 1970 | }; |
1964 | 1971 | ||
1965 | static const struct inode_operations v9fs_dir_inode_operations = { | 1972 | static const struct inode_operations v9fs_dir_inode_operations = { |
@@ -1986,6 +1993,7 @@ static const struct inode_operations v9fs_file_inode_operations_dotl = { | |||
1986 | .getxattr = generic_getxattr, | 1993 | .getxattr = generic_getxattr, |
1987 | .removexattr = generic_removexattr, | 1994 | .removexattr = generic_removexattr, |
1988 | .listxattr = v9fs_listxattr, | 1995 | .listxattr = v9fs_listxattr, |
1996 | .check_acl = v9fs_check_acl, | ||
1989 | }; | 1997 | }; |
1990 | 1998 | ||
1991 | static const struct inode_operations v9fs_symlink_inode_operations = { | 1999 | static const struct inode_operations v9fs_symlink_inode_operations = { |