summaryrefslogtreecommitdiff
path: root/src/clnt_dg.c
diff options
context:
space:
mode:
authorMatthew N. Dodd <matthew.nygard.dodd@gmail.com>2011-06-20 13:34:34 -0400
committerSteve Dickson <steved@redhat.com>2011-06-21 14:31:44 -0400
commit2abb87646f696726f4ee3a89db6ebfc8adbd9b9b (patch)
tree79cc735f03e1f724d68a8ef673ef4e9c76a60858 /src/clnt_dg.c
parent1e786fc401ff625fdcec3e0bdc495125feb0a070 (diff)
downloadti-rpc-2abb87646f696726f4ee3a89db6ebfc8adbd9b9b.tar.gz
AUTH_WRAP/AUTH_UNWRAP support.
Client code lacks support for authenticator wrapping/unwrapping, which is particularly useful when using GSS. Verified for both tcp & udp using a trivial RPC client against a MIT Krb5 server. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/clnt_dg.c')
-rw-r--r--src/clnt_dg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index 79fed5d..4a1f60a 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -366,7 +366,7 @@ call_again:
if ((! XDR_PUTINT32(xdrs, (int32_t *)&proc)) ||
(! AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
- (! (*xargs)(xdrs, argsp))) {
+ (! AUTH_WRAP(cl->cl_auth, xdrs, xargs, argsp))) {
cu->cu_error.re_status = RPC_CANTENCODEARGS;
goto out;
}
@@ -400,8 +400,8 @@ get_reply:
* (We assume that this is actually only executed once.)
*/
reply_msg.acpted_rply.ar_verf = _null_auth;
- reply_msg.acpted_rply.ar_results.where = resultsp;
- reply_msg.acpted_rply.ar_results.proc = xresults;
+ reply_msg.acpted_rply.ar_results.where = NULL;
+ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
fd.fd = cu->cu_fd;
fd.events = POLLIN;
@@ -512,6 +512,10 @@ get_reply:
&reply_msg.acpted_rply.ar_verf)) {
cu->cu_error.re_status = RPC_AUTHERROR;
cu->cu_error.re_why = AUTH_INVALIDRESP;
+ } else if (! AUTH_UNWRAP(cl->cl_auth, &reply_xdrs,
+ xresults, resultsp)) {
+ if (cu->cu_error.re_status == RPC_SUCCESS)
+ cu->cu_error.re_status = RPC_CANTDECODERES;
}
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
xdrs->x_op = XDR_FREE;