16
|
1 |
--- samba-3.0.37/source/passdb/login_cache.c Thu Mar 11 04:54:39 2010
|
|
2 |
+++ samba-3.0.37-new/source/passdb/login_cache.c Wed Mar 17 04:37:18 2010
|
|
3 |
@@ -68,6 +68,7 @@
|
|
4 |
{
|
|
5 |
TDB_DATA keybuf, databuf;
|
|
6 |
LOGIN_CACHE *entry;
|
|
7 |
+ uint16_t acct_ctrl;
|
|
8 |
|
|
9 |
if (!login_cache_init())
|
|
10 |
return NULL;
|
|
11 |
@@ -95,7 +96,7 @@
|
|
12 |
}
|
|
13 |
|
|
14 |
if (tdb_unpack (databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT,
|
|
15 |
- &entry->entry_timestamp, &entry->acct_ctrl,
|
|
16 |
+ &entry->entry_timestamp, &acct_ctrl,
|
|
17 |
&entry->bad_password_count,
|
|
18 |
&entry->bad_password_time) == -1) {
|
|
19 |
DEBUG(7, ("No cache entry found\n"));
|
|
20 |
@@ -106,6 +107,12 @@
|
|
21 |
|
|
22 |
SAFE_FREE(databuf.dptr);
|
|
23 |
|
|
24 |
+ /*
|
|
25 |
+ * Deal with 32-bit acct_ctrl. In the tdb we only store 16-bit
|
|
26 |
+ * ("w" in SAM_CACHE_FORMAT). Fixes bug 7253.
|
|
27 |
+ */
|
|
28 |
+ entry->acct_ctrl = acct_ctrl;
|
|
29 |
+
|
|
30 |
DEBUG(5, ("Found login cache entry: timestamp %12u, flags 0x%x, count %d, time %12u\n",
|
|
31 |
(unsigned int)entry->entry_timestamp, entry->acct_ctrl,
|
|
32 |
entry->bad_password_count, (unsigned int)entry->bad_password_time));
|