diff options
author | Jeremy Allison <jra@samba.org> | 2004-05-26 17:45:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:48 -0500 |
commit | e8681c225f50ccd070dc93f2eac74d1813aaf735 (patch) | |
tree | b60c5d76c25038e62a3db15a00b26b9a213cbe59 | |
parent | 5a3bc12683c6a21567a45ae927af6458dfd03263 (diff) | |
download | samba-e8681c225f50ccd070dc93f2eac74d1813aaf735.tar.gz samba-e8681c225f50ccd070dc93f2eac74d1813aaf735.tar.bz2 samba-e8681c225f50ccd070dc93f2eac74d1813aaf735.zip |
r910: Fix for bug #1385 found by Jason Mader <jason@ncac.gwu.edu>.
Don't use non-consts in a structure initialization.
Jeremy.
(This used to be commit 455ed258b3457ad5b7d3dad14b64781ab98f00dc)
-rw-r--r-- | source3/passdb/pdb_ldap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 15635a034c..ea1424860b 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1043,9 +1043,13 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, DEBUG(7, ("bad password count is reset, deleting login cache entry for %s\n", pdb_get_nt_username(sampass))); login_cache_delentry(sampass); } else { - LOGIN_CACHE cache_entry ={time(NULL), - pdb_get_acct_ctrl(sampass), - badcount, badtime}; + LOGIN_CACHE cache_entry; + + cache_entry.entry_timestamp = time(NULL); + cache_entry.acct_ctrl = pdb_get_acct_ctrl(sampass); + cache_entry.bad_password_count = badcount; + cache_entry.bad_password_time = badtime; + DEBUG(7, ("Updating bad password count and time in login cache\n")); login_cache_write(sampass, cache_entry); } |