summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-13 19:38:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:06 -0500
commitc5e7ddc63b1bf7d4b4e06baeff222c5859ae4061 (patch)
tree27f86ae751734ee000fcc706fc2cb4e00393016a /source3
parentaa363846d6c26869a780b1ad1ad2e3b3588a7387 (diff)
downloadsamba-c5e7ddc63b1bf7d4b4e06baeff222c5859ae4061.tar.gz
samba-c5e7ddc63b1bf7d4b4e06baeff222c5859ae4061.tar.bz2
samba-c5e7ddc63b1bf7d4b4e06baeff222c5859ae4061.zip
r12913: missed merge to fix BUG 3391; ensure we can lookup account policies
(This used to be commit 77575c64e4e961f37ccf5b2dd17e41c74678ea45)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/passdb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index ac4d255597..f9f6021d81 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -2400,13 +2400,16 @@ BOOL pdb_increment_bad_password_count(SAM_ACCOUNT *sampass)
{
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;
}