summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2016-04-26 08:43:26 +0200
committerJeremy Allison <jra@samba.org>2016-04-28 20:48:14 +0200
commit184e7873cb4038e3e90028cb60443f5b2602a7ed (patch)
treeb1b7bcc0a9a4d102d1ec4723f81d19e4beafc90d /source3
parenteee88e07b3e68efb467b390536eea4155b5ced7e (diff)
downloadsamba-184e7873cb4038e3e90028cb60443f5b2602a7ed.tar.gz
winbindd: check if dcinfo from genache is expired
The gencache parse function dcinfo_parser() used by wb_dsgetdcname_gencache_get() misses a check for expired gencache entries. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/wb_dsgetdcname.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/winbindd/wb_dsgetdcname.c b/source3/winbindd/wb_dsgetdcname.c
index 5aea7de626f..125e98ade74 100644
--- a/source3/winbindd/wb_dsgetdcname.c
+++ b/source3/winbindd/wb_dsgetdcname.c
@@ -176,6 +176,10 @@ static void dcinfo_parser(time_t timeout, DATA_BLOB blob, void *private_data)
struct dcinfo_parser_state *state = private_data;
enum ndr_err_code ndr_err;
+ if (timeout <= time(NULL)) {
+ return;
+ }
+
state->dcinfo = talloc(state->mem_ctx, struct netr_DsRGetDCNameInfo);
if (state->dcinfo == NULL) {
state->status = NT_STATUS_NO_MEMORY;