(verfiy_krb5): get the name out of the ccache before closing it

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6206 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-05-11 13:16:07 +00:00
parent f74027c877
commit 74f6a0d445

View File

@@ -185,11 +185,11 @@ verify_krb5(struct passwd *login_info, struct passwd *su_info,
ret = krb5_cc_copy_cache(context, ccache, ccache2);
if (seteuid(0))
krb5_err (context, 1, errno, "seteuid");
ret = krb5_cc_close(context, ccache2);
asprintf(&cc_name, "%s:%s", krb5_cc_get_type(context, ccache2),
krb5_cc_get_name(context, ccache2));
setenv("KRB5CCNAME", cc_name, 1);
ret = krb5_cc_close(context, ccache2);
}
krb5_cc_destroy(context, ccache);
return 0;