summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2011-07-04 06:32:32 +0000
committerAnand Avati <avati@gluster.com>2011-07-12 06:59:40 -0700
commitf9e0638b7597f4b1a4245f63c94d3d6bd3158136 (patch)
tree2d32cc277dd2032e3420b7b16d21a3d68d909435 /xlators/nfs/server/src/nfs3.c
parent43d6d33d35618eb684975d6f0d1263e25ae6466c (diff)
nfs: Change NFS3 access op to use access fop
This change is needed so that we have a uniform dependence on posix-acl for permission checks as well as ACL checks. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3057 (acl permissions don't work on nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
Diffstat (limited to 'xlators/nfs/server/src/nfs3.c')
-rw-r--r--xlators/nfs/server/src/nfs3.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index cd0a543f6cf..70ce23a3990 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -1367,20 +1367,13 @@ rpcerr:
int
-nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, struct iatt *buf,
- uint32_t accbits)
+nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, int32_t accbits)
{
access3res res;
uint64_t deviceid = 0;
- gid_t *gidarr = NULL;
- int gids = 0;
deviceid = nfs3_request_xlator_deviceid (req);
- gidarr = nfs_rpcsvc_auth_unix_auxgids (req, &gids);
- nfs3_fill_access3res (&res, status, buf, accbits,
- nfs_rpcsvc_request_uid (req),
- nfs_rpcsvc_request_gid (req), deviceid, gidarr,
- gids);
+ nfs3_fill_access3res (&res, status, accbits);
nfs3svc_submit_reply (req, &res,
(nfs3_serializer)xdr_serialize_access3res);
return 0;
@@ -1389,7 +1382,7 @@ nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, struct iatt *buf,
int32_t
nfs3svc_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf)
+ int32_t op_ret, int32_t op_errno)
{
nfsstat3 status = NFS3_OK;
nfs3_call_state_t *cs = NULL;
@@ -1401,7 +1394,7 @@ nfs3svc_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "ACCESS", status,
op_errno);
- nfs3_access_reply (cs->req, status, buf, cs->accessbits);
+ nfs3_access_reply (cs->req, status, op_errno);
nfs3_call_state_wipe (cs);
return 0;
@@ -1422,8 +1415,8 @@ nfs3_access_resume (void *carg)
nfs3_check_fh_resolve_status (cs, stat, nfs3err);
cs->fh = cs->resolvefh;
nfs_request_user_init (&nfu, cs->req);
- ret = nfs_stat (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,
- nfs3svc_access_cbk, cs);
+ ret = nfs_access (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,
+ cs->accessbits, nfs3svc_access_cbk, cs);
if (ret < 0)
stat = nfs3_errno_to_nfsstat3 (-ret);
@@ -1431,7 +1424,7 @@ nfs3err:
if (ret < 0) {
nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "ACCESS",
stat, -ret);
- nfs3_access_reply (cs->req, stat, NULL, 0);
+ nfs3_access_reply (cs->req, stat, 0);
nfs3_call_state_wipe (cs);
ret = 0;
}
@@ -1468,7 +1461,7 @@ nfs3err:
if (ret < 0) {
nfs3_log_common_res (nfs_rpcsvc_request_xid (req), "ACCESS",
stat, -ret);
- nfs3_access_reply (req, stat, NULL, 0);
+ nfs3_access_reply (req, stat, 0);
nfs3_call_state_wipe (cs);
ret = 0;
}