From: Theodore Tso Date: Wed, 10 Oct 1990 17:16:21 +0000 (+0000) Subject: Added an extra argument to mk_req_ext so that the caller can get a X-Git-Tag: krb5-1.0-alpha2~186 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8c6003de6cf943286a987fc2494078754c156704;p=krb5.git Added an extra argument to mk_req_ext so that the caller can get a copy of the authenticator which was used to build up the AP_REQ message. Also took out a cast because cmsec was changed to be signed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1225 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index a2624e8c3..220f829e1 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -58,13 +58,14 @@ static krb5_error_code generate_authenticator PROTOTYPE((krb5_authenticator *, krb5_error_code krb5_mk_req_extended(ap_req_options, checksum, times, kdc_options, ccache, - creds, outbuf) + creds, authentp, outbuf) const krb5_flags ap_req_options; const krb5_checksum *checksum; const krb5_ticket_times *times; const krb5_flags kdc_options; krb5_ccache ccache; krb5_creds *creds; +krb5_authenticator *authentp; krb5_data *outbuf; { krb5_error_code retval; @@ -106,6 +107,15 @@ krb5_data *outbuf; cleanup_ticket(); return retval; } + if (authentp) { + *authentp = authent; + /* Null out these fields, to prevent pointer sharing problems + * The caller won't need these fields anyway, since they were + * supplied by the caller + */ + authentp->client = NULL; + authentp->checksum = NULL; + } /* encode it before encrypting */ retval = encode_krb5_authenticator(&authent, &scratch); if (retval) { @@ -187,7 +197,5 @@ const krb5_checksum *cksum; authent->client = creds->client; authent->checksum = (krb5_checksum *)cksum; - /* cmsec is unsigned, time is signed, hence the cast */ - return(krb5_ms_timeofday(&authent->ctime, - (krb5_int16 *)&authent->cmsec)); + return(krb5_ms_timeofday(&authent->ctime, &authent->cmsec)); }