here's most of chunk 3. note most of the cast stuff i complain about might be better to fix it on mit codebase and then get it in sol via later sync.
http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rcdef.c.wdiff.html 31 - * replay cache default set of operation vectors. 33 + * replay cache default operationvectors. * should operationvectors be all one word? http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/mech/accept_sec_context.c.wdiff.html 268 - * SUNW15resync 269 - * Added this cc_destroy for template_cache, w/out it causes memory 270 - * leak via "ssh -o gssapidelegatecredentials=yes ..." 271 - */ 272 - if (template_ccache) 273 - (void)krb5_cc_destroy(context, template_ccache); * sure this is no longer needed? (do a ssh test and run findleaks on sshd) http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/mech/export_sec_context.c.wdiff.html 65 - { gss_OID go = ctx->mech_used; 66 - printf("export ctx len=%lu\n", go->length); 67 - } * oops :) http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c.wdiff.html 1399 - /* 1400 - * Solaris Kerberos: 1401 - * If the client's realm is empty (using a fallback method to determine 1402 - * the realm) then make sure to set the client's realm to the default 1403 - * realm. This ensures that the TGT is built correctly. 1404 - */ 1405 - if (krb5_is_referral_realm(&(me->realm))) { 1406 - char *realm; 1407 1395 1408 - free(me->realm.data); 1409 - code = krb5_get_default_realm(context, &realm); 1410 - if (code) { 1411 - (void) krb5_kt_close(context, keytab); 1412 - *minor_status = code; 1413 - return (GSS_S_FAILURE); 1414 - } 1415 - 1416 - me->realm.data = realm; 1417 - me->realm.length = strlen(realm); * it's: 6523887 krb should support client side referrals no longer needed? http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/profile/prof_file.c.wdiff.html * yes! lots of unnecessary casts removed from malloc calls, one of my pet peeves! http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/gss_mechs/mech_krb5/profile/prof_parse.c.wdiff.html 325 - if (!str || !*str) 326 - return 0; 320 + if (!str) 321 + return 0; 322 + if (*str) 323 + return 1; * is 322,3 correct? http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/kadm5/clnt/chpw.c.wdiff.html 72 + memcpy(ptr, ap_req->data, ap_req->length); 73 + ptr += ap_req->length; 74 + 75 + /* krb-priv of password */ 76 + 77 + memcpy(ptr, cipherpw.data, cipherpw.length); * memcpy returns void* so needs void cast here (see others too) 239 + result_data->data = (char *) malloc(result_data->length); * malloc does not need cast http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/kadm5/clnt/client_rpc.c.wdiff.html 44 + memset((char *)&clnt_res, 0, sizeof(clnt_res)); * memset needs cast (many in this file) http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/kadm5/srv/logger.c.wdiff.html 1069 + strncpy(outbuf, ctime(&now) + 4, 15); * strncpy needs (void) cast (also the sprintf calls too) http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/kadm5/srv/svr_principal.c.wdiff.html 1136 + adb->old_keys = (osa_pw_hist_ent *) 1137 + malloc((nkeys + 1) * sizeof (osa_pw_hist_ent)); * malloc does not need cast (below it memset does need cast on retval) http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/kdb/kdb_cpw.c.wdiff.html * lots memcpy/memset need (void) ret cast http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash.c.wdiff.html 114 + if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) * no cast needed for calloc ret http://cr.opensolaris.org/~mbp/pkinit/usr/src/lib/krb5/plugins/kdb/db2/libdb2/mpool/mpool.c.wdiff.html 396 +#if defined(DEBUG) || defined(PURIFY) || 1 * || 1 ??? more later...glenn