If data == NULL, not store the config.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24911 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-03-22 17:22:00 +00:00
parent 83595c6202
commit 4fbab16b41

View File

@@ -1315,15 +1315,17 @@ krb5_cc_set_config(krb5_context context, krb5_ccache id,
if (ret && ret != KRB5_CC_NOTFOUND) if (ret && ret != KRB5_CC_NOTFOUND)
goto out; goto out;
/* not that anyone care when this expire */ if (data) {
cred.times.authtime = time(NULL); /* not that anyone care when this expire */
cred.times.endtime = cred.times.authtime + 3600 * 24 * 30; cred.times.authtime = time(NULL);
cred.times.endtime = cred.times.authtime + 3600 * 24 * 30;
ret = krb5_data_copy(&cred.ticket, data->data, data->length);
if (ret) ret = krb5_data_copy(&cred.ticket, data->data, data->length);
goto out; if (ret)
goto out;
ret = krb5_cc_store_cred(context, id, &cred);
ret = krb5_cc_store_cred(context, id, &cred);
}
out: out:
krb5_free_cred_contents (context, &cred); krb5_free_cred_contents (context, &cred);