From: Ralph Boehme Date: Tue, 26 Apr 2016 06:43:26 +0000 (+0200) Subject: winbindd: check if dcinfo from genache is expired X-Git-Tag: talloc-2.1.7~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=184e7873cb4038e3e90028cb60443f5b2602a7ed;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- 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;