diff options
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 2 | ||||
-rw-r--r-- | xlators/nfs/server/src/nlm4.c | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index c0cb7fcac07..7fdeaeb0458 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -244,8 +244,6 @@ struct rpcsvc_request { #define rpcsvc_request_program_private(req) (((rpcsvc_program_t *)((req)->prog))->private) #define rpcsvc_request_accepted(req) ((req)->rpc_status == MSG_ACCEPTED) #define rpcsvc_request_accepted_success(req) ((req)->rpc_err == SUCCESS) -#define rpcsvc_request_uid(req) ((req)->uid) -#define rpcsvc_request_gid(req) ((req)->gid) #define rpcsvc_request_prog_minauth(req) (rpcsvc_request_program(req)->min_auth) #define rpcsvc_request_cred_flavour(req) (rpcsvc_auth_flavour(req->cred)) #define rpcsvc_request_verf_flavour(req) (rpcsvc_auth_flavour(req->verf)) diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index 498342eb1b0..aee14e9c8cd 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -630,14 +630,11 @@ nlm4_file_open_and_resume(nfs3_call_state_t *cs, nlm4_resume_fn_t resume) } frame->root->pid = NFS_PID; - frame->root->uid = 0; - frame->root->gid = 0; + frame->root->uid = rpcsvc_request_uid (cs->req); + frame->root->gid = rpcsvc_request_gid (cs->req); frame->local = cs; - /* - * This is the only place that we call STACK_WIND without nfs_fix_groups, - * because in this particular case the relevant identify is in lk_owner and - * we don't care about the fields that nfs_fix_groups would set up. - */ + nfs_fix_groups (cs->nfsx, frame->root); + STACK_WIND_COOKIE (frame, nlm4_file_open_cbk, cs->vol, cs->vol, cs->vol->fops->open, &cs->resolvedloc, O_RDWR, cs->fd, NULL); |