From: Günther Deschner Date: Thu, 20 Jan 2005 21:42:05 +0000 (+0000) Subject: r4877: When vampiring account policy AP_LOCK_ACCOUNT_DURATION honour "Lockout X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aecacf4d9cc5e2aa69b358292b9d591ade696500;p=thirdparty%2Fsamba.git r4877: When vampiring account policy AP_LOCK_ACCOUNT_DURATION honour "Lockout Duration: Forever". Guenther --- diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c index 3ef2388bbc2..320341ec050 100644 --- a/source/utils/net_rpc_samsync.c +++ b/source/utils/net_rpc_samsync.c @@ -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))