summaryrefslogtreecommitdiff
path: root/source3/passdb/login_cache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-16 22:22:21 +0100
committerVolker Lendecke <vl@samba.org>2010-03-16 22:35:41 +0100
commit2b4ce9a73f6b041f3cc69125e45b9f61e0155ff5 (patch)
treebfce27cd38655a7b039e74033850170bf92aa523 /source3/passdb/login_cache.c
parent276b1aa1891df2a31e8c65b04f41b0a0ebb57335 (diff)
downloadsamba-2b4ce9a73f6b041f3cc69125e45b9f61e0155ff5.tar.gz
samba-2b4ce9a73f6b041f3cc69125e45b9f61e0155ff5.tar.bz2
samba-2b4ce9a73f6b041f3cc69125e45b9f61e0155ff5.zip
s3: Make login_cache_write take a pointer
Diffstat (limited to 'source3/passdb/login_cache.c')
-rw-r--r--source3/passdb/login_cache.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 2f9f000f11..cf6c796321 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -112,13 +112,14 @@ bool login_cache_read(struct samu *sampass, struct login_cache *entry)
return true;
}
-bool login_cache_write(const struct samu *sampass, struct login_cache entry)
+bool login_cache_write(const struct samu *sampass,
+ const struct login_cache *entry)
{
char *keystr;
TDB_DATA databuf;
bool ret;
uint32_t entry_timestamp;
- uint32_t bad_password_time = (uint32_t)entry.bad_password_time;
+ uint32_t bad_password_time = entry->bad_password_time;
if (!login_cache_init())
return False;
@@ -138,8 +139,8 @@ bool login_cache_write(const struct samu *sampass, struct login_cache entry)
databuf.dsize =
tdb_pack(NULL, 0, SAM_CACHE_FORMAT,
entry_timestamp,
- entry.acct_ctrl,
- entry.bad_password_count,
+ entry->acct_ctrl,
+ entry->bad_password_count,
bad_password_time);
databuf.dptr = SMB_MALLOC_ARRAY(uint8, databuf.dsize);
if (!databuf.dptr) {
@@ -149,8 +150,8 @@ bool login_cache_write(const struct samu *sampass, struct login_cache entry)
if (tdb_pack(databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT,
entry_timestamp,
- entry.acct_ctrl,
- entry.bad_password_count,
+ entry->acct_ctrl,
+ entry->bad_password_count,
bad_password_time)
!= databuf.dsize) {
SAFE_FREE(keystr);