Author: abartlet Date: 2006-05-07 18:08:57 +0000 (Sun, 07 May 2006) New Revision: 15498
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15498 Log: Initialise the callback_running field, and get the flag set/clear the right way around for all the callers. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c Changeset: Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c =================================================================== --- branches/SAMBA_4_0/source/auth/credentials/credentials.c 2006-05-07 17:55:20 UTC (rev 15497) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c 2006-05-07 18:08:57 UTC (rev 15498) @@ -59,6 +59,7 @@ cred->bind_dn = NULL; cred->tries = 3; + cred->callback_running = False; cli_credentials_set_kerberos_state(cred, CRED_AUTO_USE_KERBEROS); @@ -157,9 +158,9 @@ if (cred->principal_obtained == CRED_CALLBACK && !cred->callback_running) { + cred->callback_running = True; + cred->principal = cred->principal_cb(cred); cred->callback_running = False; - cred->principal = cred->principal_cb(cred); - cred->callback_running = True; cred->principal_obtained = CRED_SPECIFIED; } @@ -241,9 +242,9 @@ if (cred->password_obtained == CRED_CALLBACK && !cred->callback_running) { + cred->callback_running = True; + cred->password = cred->password_cb(cred); cred->callback_running = False; - cred->password = cred->password_cb(cred); - cred->callback_running = True; cred->password_obtained = CRED_CALLBACK_RESULT; }
