From: Stefan Metzmacher Date: Thu, 3 Feb 2011 01:23:21 +0000 (+0100) Subject: s3:libsmb/samlogon_cache: zero session keys before storing the info3 structure X-Git-Tag: talloc-2.1.12~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f1e221a8ffbecd3f80073c05d8f194d2dad9b24;p=thirdparty%2Fsamba.git s3:libsmb/samlogon_cache: zero session keys before storing the info3 structure The samlogon_cache is only used to get group memberships of the account without asking the dc. But for authentication we always ask the dc. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c index 70645f2dc40..ae77610ec99 100644 --- a/source3/libsmb/samlogon_cache.c +++ b/source3/libsmb/samlogon_cache.c @@ -193,6 +193,10 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3) r.timestamp = time(NULL); r.info3 = *info3; + /* avoid storing secret information */ + ZERO_STRUCT(r.info3.base.key); + ZERO_STRUCT(r.info3.base.LMSessKey); + if (DEBUGLEVEL >= 10) { NDR_PRINT_DEBUG(netsamlogoncache_entry, &r); }