From 76c1659e90ee0e9c6e0a44bdef5a82cae00ef69a Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 25 Apr 1995 00:55:52 +0000 Subject: [PATCH] * parse.c (krb5_parse_name): Add magic number to new structure * get_creds.c: Fix comments describing operation * gc_frm_kdc.c: Fix comments describing operation * copy_cksum.c (krb5_copy_checksum): Fix comment in file * copy_addrs.c (krb5_append_addresses): ifdef out unused krb5_append_addresses function. (no API or prototype existed). * copy_data.c (krb5_copy_data): Initialize magic number git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5464 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 14 ++++++++++++++ src/lib/krb5/krb/copy_addrs.c | 2 ++ src/lib/krb5/krb/copy_cksum.c | 2 +- src/lib/krb5/krb/copy_data.c | 1 + src/lib/krb5/krb/gc_frm_kdc.c | 4 ++-- src/lib/krb5/krb/get_creds.c | 10 ++++++---- src/lib/krb5/krb/mk_req_ext.c | 1 - src/lib/krb5/krb/parse.c | 1 + 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index b72c0087e..47434f1fd 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,5 +1,19 @@ Mon Apr 24 17:09:36 1995 Ezra Peisach + * parse.c (krb5_parse_name): Add magic number to new structure + + * get_creds.c: Fix comments describing operation + + * gc_frm_kdc.c: Fix comments describing operation + + * copy_cksum.c (krb5_copy_checksum): Fix comment in file + + * copy_addrs.c (krb5_append_addresses): ifdef out unused + krb5_append_addresses function. (no API or prototype + existed). + + * copy_data.c (krb5_copy_data): Initialize magic number + * init_ctx.c (krb5_init_context): If an error is returned from krb5_set_default_in_tkt_etypes or krb5_os_init_context, pass to caller instead of stack garbage. diff --git a/src/lib/krb5/krb/copy_addrs.c b/src/lib/krb5/krb/copy_addrs.c index 5d17ed3e7..18ecf5a80 100644 --- a/src/lib/krb5/krb/copy_addrs.c +++ b/src/lib/krb5/krb/copy_addrs.c @@ -86,6 +86,7 @@ krb5_copy_addresses(context, inaddr, outaddr) return 0; } +#if 0 /* * Append an address array, to another address array, with fresh allocation. * Note that this function may change the value of *outaddr even if it @@ -141,4 +142,5 @@ krb5_append_addresses(context, inaddr, outaddr) *outaddr = tempaddr; return retval; } +#endif diff --git a/src/lib/krb5/krb/copy_cksum.c b/src/lib/krb5/krb/copy_cksum.c index 5a9a893d4..c0bf8a24a 100644 --- a/src/lib/krb5/krb/copy_cksum.c +++ b/src/lib/krb5/krb/copy_cksum.c @@ -21,7 +21,7 @@ * or implied warranty. * * - * krb5_copy_authenticator() + * krb5_copy_checksum() */ #include "k5-int.h" diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c index e9dd229a0..fb2e8708d 100644 --- a/src/lib/krb5/krb/copy_data.c +++ b/src/lib/krb5/krb/copy_data.c @@ -54,6 +54,7 @@ krb5_copy_data(context, indata, outdata) memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length); } else tempdata->data = 0; + tempdata->magic = KV5M_DATA; *outdata = tempdata; return 0; } diff --git a/src/lib/krb5/krb/gc_frm_kdc.c b/src/lib/krb5/krb/gc_frm_kdc.c index b82d023a1..5b72ebb24 100644 --- a/src/lib/krb5/krb/gc_frm_kdc.c +++ b/src/lib/krb5/krb/gc_frm_kdc.c @@ -32,8 +32,8 @@ #include "int-proto.h" /* - * Retrieve credentials for principal creds->client, - * server creds->server, ticket flags creds->ticket_flags, possibly + * Retrieve credentials for principal in_cred->client, + * server in_cred->server, ticket flags creds->ticket_flags, possibly * second_ticket if needed by ticket_flags. * * Credentials are requested from the KDC for the server's realm. Any diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 58ecd0035..2f6f0bc75 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -29,10 +29,10 @@ /* Attempts to use the credentials cache or TGS exchange to get an additional ticket for the - client identified by creds->client, the server identified by - creds->server, with options options, expiration date specified in - creds->times.endtime (0 means as long as possible), session key type - specified in creds->keyblock.keytype (if non-zero) + client identified by in_creds->client, the server identified by + in_creds->server, with options options, expiration date specified in + in_creds->times.endtime (0 means as long as possible), session key type + specified in in_creds->keyblock.keytype (if non-zero) Any returned ticket and intermediate ticket-granting tickets are stored in ccache. @@ -60,6 +60,7 @@ krb5_get_credentials(context, options, ccache, in_creds, out_creds) return -EINVAL; memset((char *)&mcreds, 0, sizeof(krb5_creds)); + mcreds.magic = KV5M_CREDS; mcreds.times.endtime = in_creds->times.endtime; #ifdef HAVE_C_STRUCTURE_ASSIGNMENT mcreds.keyblock = in_creds->keyblock; @@ -87,6 +88,7 @@ krb5_get_credentials(context, options, ccache, in_creds, out_creds) return -ENOMEM; memset((char *)ncreds, 0, sizeof(krb5_creds)); + ncreds->magic = KV5M_CREDS; /* The caller is now responsible for cleaning up in_creds */ if (retval = krb5_cc_retrieve_cred(context,ccache,fields,&mcreds,ncreds)) { diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 6cfaf11b3..727931aee 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -220,7 +220,6 @@ krb5_mk_req_extended(context, auth_context, ap_req_options, in_data, in_creds, if (retval = encode_krb5_ap_req(&request, &toutbuf)) goto cleanup_cksum; - #ifdef HAVE_C_STRUCTURE_ASSIGNMENT *outbuf = *toutbuf; #else diff --git a/src/lib/krb5/krb/parse.c b/src/lib/krb5/krb/parse.c index be48029e3..8b862b7a9 100644 --- a/src/lib/krb5/krb/parse.c +++ b/src/lib/krb5/krb/parse.c @@ -271,6 +271,7 @@ krb5_parse_name(context, name, nprincipal) * into the return variable, and let's get out of here. */ krb5_princ_type(context, principal) = KRB5_NT_PRINCIPAL; + principal->magic = KV5M_PRINCIPAL; *nprincipal = principal; return(0); } -- 2.26.2