* svc.c (svc_getreqset): Don't allocate either raw or cooked
credentials on the stack using the cred_area char array; use
mem_alloc() instead. This avoids alignment problems.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16668
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-08-16 Tom Yu <tlyu@mit.edu>
+
+ * svc_auth_gss.c (gssrpc__svcauth_gss): Add some debug messages.
+
+ * svc.c (svc_getreqset): Don't allocate either raw or cooked
+ credentials on the stack using the cred_area char array; use
+ mem_alloc() instead. This avoids alignment problems.
+
2004-06-28 Tom Yu <tlyu@mit.edu>
* auth_gss.c (g_OID_equal): Fix signedness.
register int sock;
bool_t no_dispatch;
- char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE];
- msg.rm_call.cb_cred.oa_base = cred_area;
- msg.rm_call.cb_verf.oa_base = &(cred_area[MAX_AUTH_BYTES]);
- r.rq_clntcred = &(cred_area[2*MAX_AUTH_BYTES]);
+ msg.rm_call.cb_cred.oa_base = mem_alloc(MAX_AUTH_BYTES);
+ msg.rm_call.cb_verf.oa_base = mem_alloc(MAX_AUTH_BYTES);
+ r.rq_clntcred = mem_alloc(RQCRED_SIZE);
#ifdef FD_SETSIZE
for (sock = 0; sock <= max_xport; sock++) {
} while (stat == XPRT_MOREREQS);
}
}
+ mem_free(msg.rm_call.cb_cred.oa_base, MAX_AUTH_BYTES);
+ mem_free(msg.rm_call.cb_verf.oa_base, MAX_AUTH_BYTES);
+ mem_free(r.rq_clntcred, RQCRED_SIZE);
}
gc = (struct rpc_gss_cred *)rqst->rq_clntcred;
memset(gc, 0, sizeof(*gc));
-
+
+ log_debug("calling xdrmem_create()");
+ log_debug("oa_base=%p, oa_length=%u", rqst->rq_cred.oa_base,
+ rqst->rq_cred.oa_length);
xdrmem_create(&xdrs, rqst->rq_cred.oa_base,
rqst->rq_cred.oa_length, XDR_DECODE);
+ log_debug("xdrmem_create() returned");
if (!xdr_rpc_gss_cred(&xdrs, gc)) {
+ log_debug("xdr_rpc_gss_cred() failed");
XDR_DESTROY(&xdrs);
return (AUTH_BADCRED);
}
retstat = AUTH_OK;
freegc:
xdr_free(xdr_rpc_gss_cred, gc);
+ log_debug("returning %d from svcauth_gss()", retstat);
return (retstat);
}