summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1990-10-10 17:16:21 +0000
committerTheodore Tso <tytso@mit.edu>1990-10-10 17:16:21 +0000
commit8c6003de6cf943286a987fc2494078754c156704 (patch)
tree233b99aa98b3f10e7df923a32647b9ad4c787cb6 /src/lib
parent568aaed7060a91ec6c1338312265327da89217ee (diff)
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/mk_req_ext.c16
1 files changed, 12 insertions, 4 deletions
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));
}