Author: gd Date: 2006-03-23 17:32:21 +0000 (Thu, 23 Mar 2006) New Revision: 14682
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14682 Log: Small cleanup in ads_verify_ticket. Guenther Modified: branches/SAMBA_3_0/source/libads/kerberos_verify.c trunk/source/libads/kerberos_verify.c Changeset: Modified: branches/SAMBA_3_0/source/libads/kerberos_verify.c =================================================================== --- branches/SAMBA_3_0/source/libads/kerberos_verify.c 2006-03-23 16:39:37 UTC (rev 14681) +++ branches/SAMBA_3_0/source/libads/kerberos_verify.c 2006-03-23 17:32:21 UTC (rev 14682) @@ -399,10 +399,10 @@ DEBUG(3,("ads_verify_ticket: krb5_rd_req with auth failed (%s)\n", error_message(ret))); goto out; - } else { - authtime = get_authtime_from_tkt(tkt); - client_principal = get_principal_from_tkt(tkt); - } + } + + authtime = get_authtime_from_tkt(tkt); + client_principal = get_principal_from_tkt(tkt); ret = krb5_mk_rep(context, auth_context, &packet); if (ret) { @@ -459,8 +459,7 @@ #endif #endif - if ((ret = krb5_unparse_name(context, get_principal_from_tkt(tkt), - principal))) { + if ((ret = krb5_unparse_name(context, client_principal, principal))) { DEBUG(3,("ads_verify_ticket: krb5_unparse_name failed (%s)\n", error_message(ret))); sret = NT_STATUS_LOGON_FAILURE; Modified: trunk/source/libads/kerberos_verify.c =================================================================== --- trunk/source/libads/kerberos_verify.c 2006-03-23 16:39:37 UTC (rev 14681) +++ trunk/source/libads/kerberos_verify.c 2006-03-23 17:32:21 UTC (rev 14682) @@ -399,10 +399,10 @@ DEBUG(3,("ads_verify_ticket: krb5_rd_req with auth failed (%s)\n", error_message(ret))); goto out; - } else { - authtime = get_authtime_from_tkt(tkt); - client_principal = get_principal_from_tkt(tkt); - } + } + + authtime = get_authtime_from_tkt(tkt); + client_principal = get_principal_from_tkt(tkt); ret = krb5_mk_rep(context, auth_context, &packet); if (ret) { @@ -459,8 +459,7 @@ #endif #endif - if ((ret = krb5_unparse_name(context, get_principal_from_tkt(tkt), - principal))) { + if ((ret = krb5_unparse_name(context, client_principal, principal))) { DEBUG(3,("ads_verify_ticket: krb5_unparse_name failed (%s)\n", error_message(ret))); sret = NT_STATUS_LOGON_FAILURE;
