summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-11-01 14:41:56 +0100
committerMichael Adam <obnox@samba.org>2012-11-01 16:11:05 +0100
commitf853c1792967332c4aff52c0fb35f653f614f86d (patch)
tree655b69520bb4d0eac7ae2e0f0d4f0de1568ec2b6 /source3
parent75c51d6561f6f39dd02fd942709039b871957f44 (diff)
downloadsamba-f853c1792967332c4aff52c0fb35f653f614f86d.tar.gz
samba-f853c1792967332c4aff52c0fb35f653f614f86d.tar.xz
samba-f853c1792967332c4aff52c0fb35f653f614f86d.zip
s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)
The removal of consumption of the time field from the centry as "removal of unused variable" in 21528da9cd12a4f5c3792a482a5d18fe946a6f7a had the side effect of changing the offset for reading the following nt password hash, so the read password hash was wrong. This patch re-installs the consumption of the time, thereby fixing the bug without changing the disk format of the cache. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 2c9dd4a9b3..c79d3b6dc1 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -1329,6 +1329,13 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
+ /*
+ * We don't use the time element at this moment,
+ * but we have to consume it, so that we don't
+ * neet to change the disk format of the cache.
+ */
+ (void)centry_time(centry);
+
/* In the salted case this isn't actually the nt_hash itself,
but the MD5 of the salt + nt_hash. Let the caller
sort this out. It can tell as we only return the cached_salt