If its a MEMORY cc, make a copy. We need to do this since now

gss_release_cred will destroy the cred. This should be really be
solved a better way.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12982 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-10-07 04:08:57 +00:00
parent 9b8678e016
commit 535b4f1e94
2 changed files with 68 additions and 36 deletions

View File

@@ -160,6 +160,22 @@ OM_uint32 gss_add_cred (
goto failure;
}
if (strcmp(type, "MEMORY") == 0) {
ret = krb5_cc_gen_new(gssapi_krb5_context, &krb5_mcc_ops,
&handle->ccache);
if (ret) {
*minor_status = ret;
goto failure;
}
ret = krb5_cc_copy_cache(gssapi_krb5_context, cred->ccache,
handle->ccache);
if (ret) {
*minor_status = ret;
goto failure;
}
} else {
name = krb5_cc_get_name(gssapi_krb5_context, cred->ccache);
if (name == NULL) {
*minor_status = ENOMEM;
@@ -180,7 +196,7 @@ OM_uint32 gss_add_cred (
goto failure;
}
}
}
ret = gss_create_empty_oid_set(minor_status, &handle->mechanisms);
if (ret)
goto failure;

View File

@@ -160,6 +160,22 @@ OM_uint32 gss_add_cred (
goto failure;
}
if (strcmp(type, "MEMORY") == 0) {
ret = krb5_cc_gen_new(gssapi_krb5_context, &krb5_mcc_ops,
&handle->ccache);
if (ret) {
*minor_status = ret;
goto failure;
}
ret = krb5_cc_copy_cache(gssapi_krb5_context, cred->ccache,
handle->ccache);
if (ret) {
*minor_status = ret;
goto failure;
}
} else {
name = krb5_cc_get_name(gssapi_krb5_context, cred->ccache);
if (name == NULL) {
*minor_status = ENOMEM;
@@ -180,7 +196,7 @@ OM_uint32 gss_add_cred (
goto failure;
}
}
}
ret = gss_create_empty_oid_set(minor_status, &handle->mechanisms);
if (ret)
goto failure;