"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/gssapi/krb5/acquire_cred.c" between
krb5-1.17.1.tar.gz and krb5-1.18.tar.gz

About: Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography (MIT implementation). Current release.

acquire_cred.c  (krb5-1.17.1):acquire_cred.c  (krb5-1.18)
skipping to change at line 194 skipping to change at line 194
{ {
OM_uint32 major; OM_uint32 major;
krb5_error_code code; krb5_error_code code;
krb5_keytab kt = NULL; krb5_keytab kt = NULL;
krb5_rcache rc = NULL; krb5_rcache rc = NULL;
assert(cred->keytab == NULL); assert(cred->keytab == NULL);
/* If we have an explicit rcache name, open it. */ /* If we have an explicit rcache name, open it. */
if (rcname != NULL) { if (rcname != NULL) {
code = krb5_rc_resolve_full(context, &rc, rcname); code = k5_rc_resolve(context, rcname, &rc);
if (code) {
major = GSS_S_FAILURE;
goto cleanup;
}
code = krb5_rc_recover_or_initialize(context, rc, context->clockskew);
if (code) { if (code) {
major = GSS_S_FAILURE; major = GSS_S_FAILURE;
goto cleanup; goto cleanup;
} }
} }
if (req_keytab != NULL) { if (req_keytab != NULL) {
code = krb5_kt_dup(context, req_keytab, &kt); code = krb5_kt_dup(context, req_keytab, &kt);
} else { } else {
k5_mutex_lock(&gssint_krb5_keytab_lock); k5_mutex_lock(&gssint_krb5_keytab_lock);
skipping to change at line 263 skipping to change at line 258
cred->keytab = kt; cred->keytab = kt;
kt = NULL; kt = NULL;
cred->rcache = rc; cred->rcache = rc;
rc = NULL; rc = NULL;
major = GSS_S_COMPLETE; major = GSS_S_COMPLETE;
cleanup: cleanup:
if (kt != NULL) if (kt != NULL)
krb5_kt_close(context, kt); krb5_kt_close(context, kt);
if (rc != NULL) if (rc != NULL)
krb5_rc_close(context, rc); k5_rc_close(context, rc);
*minor_status = code; *minor_status = code;
return major; return major;
} }
#endif /* LEAN_CLIENT */ #endif /* LEAN_CLIENT */
#ifdef USE_LEASH #ifdef USE_LEASH
static krb5_error_code static krb5_error_code
get_ccache_leash(krb5_context context, krb5_principal desired_princ, get_ccache_leash(krb5_context context, krb5_principal desired_princ,
krb5_ccache *ccache_out) krb5_ccache *ccache_out)
{ {
skipping to change at line 883 skipping to change at line 878
else else
krb5_cc_close(context, cred->ccache); krb5_cc_close(context, cred->ccache);
} }
if (cred->client_keytab) if (cred->client_keytab)
krb5_kt_close(context, cred->client_keytab); krb5_kt_close(context, cred->client_keytab);
#ifndef LEAN_CLIENT #ifndef LEAN_CLIENT
if (cred->keytab) if (cred->keytab)
krb5_kt_close(context, cred->keytab); krb5_kt_close(context, cred->keytab);
#endif /* LEAN_CLIENT */ #endif /* LEAN_CLIENT */
if (cred->rcache) if (cred->rcache)
krb5_rc_close(context, cred->rcache); k5_rc_close(context, cred->rcache);
if (cred->name) if (cred->name)
kg_release_name(context, &cred->name); kg_release_name(context, &cred->name);
krb5_free_principal(context, cred->impersonator); krb5_free_principal(context, cred->impersonator);
zapfreestr(cred->password); zapfreestr(cred->password);
k5_mutex_destroy(&cred->lock); k5_mutex_destroy(&cred->lock);
xfree(cred); xfree(cred);
} }
save_error_info(*minor_status, context); save_error_info(*minor_status, context);
return ret; return ret;
} }
skipping to change at line 1050 skipping to change at line 1045
rcache = (krb5_rcache)value->value; rcache = (krb5_rcache)value->value;
cred = (krb5_gss_cred_id_t)*cred_handle; cred = (krb5_gss_cred_id_t)*cred_handle;
code = krb5_gss_init_context(&context); code = krb5_gss_init_context(&context);
if (code) { if (code) {
*minor_status = code; *minor_status = code;
return GSS_S_FAILURE; return GSS_S_FAILURE;
} }
if (cred->rcache != NULL) { if (cred->rcache != NULL)
code = krb5_rc_close(context, cred->rcache); k5_rc_close(context, cred->rcache);
if (code) {
*minor_status = code;
krb5_free_context(context);
return GSS_S_FAILURE;
}
}
cred->rcache = rcache; cred->rcache = rcache;
krb5_free_context(context); krb5_free_context(context);
*minor_status = 0; *minor_status = 0;
return GSS_S_COMPLETE; return GSS_S_COMPLETE;
} }
/* /*
 End of changes. 4 change blocks. 
16 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)