diff options
author | Jeremy Allison <jra@samba.org> | 2008-04-17 08:02:46 -0700 |
---|---|---|
committer | Gerald W. Carter <jerry@samba.org> | 2008-04-23 13:32:31 -0500 |
commit | f2a098f49f4e261b8d4fb069d4e147f90ac6e9e6 (patch) | |
tree | c4a16c594d5c802f135602e4616e545358a8b096 /source/utils | |
parent | e6b201327042867fcf0f63f6bde9ca9ab2ac97f6 (diff) | |
download | samba-f2a098f49f4e261b8d4fb069d4e147f90ac6e9e6.tar.gz samba-f2a098f49f4e261b8d4fb069d4e147f90ac6e9e6.tar.xz samba-f2a098f49f4e261b8d4fb069d4e147f90ac6e9e6.zip |
Fix gcc uninitialized variable used warning.
Jeremy.
(cherry picked from commit b95f2adeb5e2f7ce71e46e6a6165159483c9a702)
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/net_rpc_samsync.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c index 986499731af..06cde2a3fdb 100644 --- a/source/utils/net_rpc_samsync.c +++ b/source/utils/net_rpc_samsync.c @@ -1028,7 +1028,6 @@ static NTSTATUS fetch_domain_info(uint32_t rid, struct netr_DELTA_DOMAIN *r) { time_t u_max_age, u_min_age, u_logout; - time_t u_lockoutreset, u_lockouttime; NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; const char *domname; struct netr_AcctLockStr *lockstr = NULL; @@ -1046,11 +1045,6 @@ static NTSTATUS fetch_domain_info(uint32_t rid, u_min_age = uint64s_nt_time_to_unix_abs((uint64 *)&r->min_password_age); u_logout = uint64s_nt_time_to_unix_abs((uint64 *)&r->force_logoff_time); - if (lockstr) { - u_lockoutreset = uint64s_nt_time_to_unix_abs(&lockstr->reset_count); - u_lockouttime = uint64s_nt_time_to_unix_abs((uint64_t *)&lockstr->lockout_duration); - } - domname = r->domain_name.string; if (!domname) { return NT_STATUS_NO_MEMORY; @@ -1081,6 +1075,11 @@ static NTSTATUS fetch_domain_info(uint32_t rid, return nt_status; if (lockstr) { + time_t u_lockoutreset, u_lockouttime; + + u_lockoutreset = uint64s_nt_time_to_unix_abs(&lockstr->reset_count); + u_lockouttime = uint64s_nt_time_to_unix_abs((uint64_t *)&lockstr->lockout_duration); + if (!pdb_set_account_policy(AP_BAD_ATTEMPT_LOCKOUT, lockstr->bad_attempt_lockout)) return nt_status; |