diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-04-22 11:02:27 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-04-29 11:40:32 -0400 |
commit | 1de85eeda2b9a01fcdd5e1773f32a7b77f62c908 (patch) | |
tree | 0c049014febbdb72f0a04b0105a77e87311c14ce /src/svc_auth_gss.c | |
parent | c55a77516fd0d226eb46f44b89fec966a682180f (diff) | |
download | ti-rpc-1de85eeda2b9a01fcdd5e1773f32a7b77f62c908.tar.gz |
Extract caller's qop setting from svcauth_gss_validate()
svcauth_gss_validate's caller will need to know the caller's qop in
a moment.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/svc_auth_gss.c')
-rw-r--r-- | src/svc_auth_gss.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c index f5165b5..6d7c26e 100644 --- a/src/svc_auth_gss.c +++ b/src/svc_auth_gss.c @@ -354,7 +354,8 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst, } static bool_t -svcauth_gss_validate(struct svc_rpc_gss_data *gd, struct rpc_msg *msg) +svcauth_gss_validate(struct svc_rpc_gss_data *gd, struct rpc_msg *msg, + gss_qop_t *qop) { struct opaque_auth *oa; gss_buffer_desc rpcbuf, checksum; @@ -403,6 +404,7 @@ svcauth_gss_validate(struct svc_rpc_gss_data *gd, struct rpc_msg *msg) maj_stat, min_stat); return (FALSE); } + *qop = qop_state; return (TRUE); } @@ -447,6 +449,7 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) struct rpc_gss_cred *gc; struct rpc_gss_init_res gr; int call_stat, offset; + gss_qop_t qop; gss_log_debug("in svcauth_gss()"); @@ -556,7 +559,7 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) break; case RPCSEC_GSS_DATA: - if (!svcauth_gss_validate(gd, msg)) + if (!svcauth_gss_validate(gd, msg, &qop)) return (RPCSEC_GSS_CREDPROBLEM); if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) @@ -567,7 +570,7 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) if (rqst->rq_proc != NULLPROC) return (AUTH_FAILED); /* XXX ? */ - if (!svcauth_gss_validate(gd, msg)) + if (!svcauth_gss_validate(gd, msg, &qop)) return (RPCSEC_GSS_CREDPROBLEM); if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) |