Author: jerry Date: 2006-01-13 03:17:30 +0000 (Fri, 13 Jan 2006) New Revision: 12890
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12890 Log: BUG 3391: fix delay caused by trying to lookup account policies without access to the LDAP backendbranches/SAMBA_3_0/source/passdb/passdb.c Modified: trunk/source/passdb/passdb.c Changeset: Modified: trunk/source/passdb/passdb.c =================================================================== --- trunk/source/passdb/passdb.c 2006-01-13 03:10:50 UTC (rev 12889) +++ trunk/source/passdb/passdb.c 2006-01-13 03:17:30 UTC (rev 12890) @@ -2115,13 +2115,16 @@ { uint32 account_policy_lockout; BOOL autolock_updated = False, badpw_updated = False; + BOOL ret; if (!sampass) return False; /* Retrieve the account lockout policy */ - if (!pdb_get_account_policy(AP_BAD_ATTEMPT_LOCKOUT, - &account_policy_lockout)) { + become_root(); + ret = pdb_get_account_policy(AP_BAD_ATTEMPT_LOCKOUT, &account_policy_lockout); + unbecome_root(); + if ( !ret ) { DEBUG(0, ("pdb_increment_bad_password_count: pdb_get_account_policy failed.\n")); return False; }