From a9928f0d95670b0e770fc9e8b7673bc863c1253b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 10 Jan 2005 15:28:07 +0000 Subject: r4646: Allow Account Lockout with Lockout Duration "forever" (until admin unlocks) to be set and displayed in User Manager. Guenther (This used to be commit 8fd7e26fa12a4102def630efa421fad70f3affb1) --- source3/rpc_server/srv_samr_nt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index e72cf68c74..da1c386fd2 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2163,7 +2163,9 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA break; case 0x0c: account_policy_get(AP_LOCK_ACCOUNT_DURATION, &account_policy_temp); - u_lock_duration = account_policy_temp * 60; + u_lock_duration = account_policy_temp; + if (u_lock_duration != -1) + u_lock_duration *= 60; account_policy_get(AP_RESET_COUNT_TIME, &account_policy_temp); u_reset_time = account_policy_temp * 60; @@ -4466,7 +4468,9 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW break; case 0x0c: account_policy_get(AP_LOCK_ACCOUNT_DURATION, &account_policy_temp); - u_lock_duration = account_policy_temp * 60; + u_lock_duration = account_policy_temp; + if (u_lock_duration != -1) + u_lock_duration *= 60; account_policy_get(AP_RESET_COUNT_TIME, &account_policy_temp); u_reset_time = account_policy_temp * 60; @@ -4534,7 +4538,9 @@ NTSTATUS _samr_set_dom_info(pipes_struct *p, SAMR_Q_SET_DOMAIN_INFO *q_u, SAMR_R case 0x07: break; case 0x0c: - u_lock_duration=nt_time_to_unix_abs(&q_u->ctr->info.inf12.duration)/60; + u_lock_duration=nt_time_to_unix_abs(&q_u->ctr->info.inf12.duration); + if (u_lock_duration != -1) + u_lock_duration /= 60; u_reset_time=nt_time_to_unix_abs(&q_u->ctr->info.inf12.reset_count)/60; account_policy_set(AP_LOCK_ACCOUNT_DURATION, (int)u_lock_duration); -- cgit