(krb5_verify): try harder freeing. do not get upset on interrupted

password read


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8634 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-07-10 02:10:30 +00:00
parent 931c580a5e
commit c0b819a8aa

View File

@@ -161,13 +161,16 @@ krb5_verify(struct passwd *login_info, struct passwd *su_info,
#if 1
krb5_warn(context, ret, "krb5_cc_gen_new");
#endif
krb5_free_principal (context, p);
return 1;
}
ret = krb5_verify_user_lrealm(context, p, ccache, NULL, TRUE, NULL);
krb5_free_principal (context, p);
if(ret) {
krb5_free_principal (context, p);
krb5_cc_destroy(context, ccache);
switch (ret) {
case KRB5_LIBOS_PWDINTR :
break;
case KRB5KRB_AP_ERR_BAD_INTEGRITY:
case KRB5KRB_AP_ERR_MODIFIED:
krb5_warnx(context, "Password incorrect");
@@ -180,6 +183,7 @@ krb5_verify(struct passwd *login_info, struct passwd *su_info,
}
return 0;
}
krb5_free_principal (context, p);
#endif
return 1;
}