r4877: When vampiring account policy AP_LOCK_ACCOUNT_DURATION honour "Lockout
authorGünther Deschner <gd@samba.org>
Thu, 20 Jan 2005 21:42:05 +0000 (21:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:06 +0000 (10:55 -0500)
Duration: Forever".

Guenther

source/utils/net_rpc_samsync.c

index 3ef2388bbc2e51d1efd73cf1c12561ee8423e812..320341ec05017a633376a9935e9925f1a1dc4ce7 100644 (file)
@@ -1021,7 +1021,10 @@ static NTSTATUS fetch_domain_info(uint32 rid, SAM_DOMAIN_INFO *delta)
        if (!account_policy_set(AP_RESET_COUNT_TIME, (uint32)u_lockoutreset/60))
                return nt_status;
 
-       if (!account_policy_set(AP_LOCK_ACCOUNT_DURATION, (uint32)u_lockouttime/60))
+       if (u_lockouttime != -1)
+               u_lockouttime /= 60;
+
+       if (!account_policy_set(AP_LOCK_ACCOUNT_DURATION, (uint32)u_lockouttime))
                return nt_status;
 
        if (!account_policy_set(AP_USER_MUST_LOGON_TO_CHG_PASS, delta->logon_chgpass))