From: Gary Lockyer Date: Wed, 4 Apr 2018 00:38:25 +0000 (+1200) Subject: cldap: clear remote address after cldap_dse_fill X-Git-Tag: tevent-0.9.37~447 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcbb3f31fea14798d8b20ae4a3ec034eef3711ba;p=thirdparty%2Fsamba.git cldap: clear remote address after cldap_dse_fill Need to clear the remote address as the ldb handle is shared, and changes made by internal processes would be logged as coming from the last cldap requester Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/source4/cldap_server/rootdse.c b/source4/cldap_server/rootdse.c index 3f389ce8225..a5e1c6b5c4e 100644 --- a/source4/cldap_server/rootdse.c +++ b/source4/cldap_server/rootdse.c @@ -166,6 +166,13 @@ void cldapd_rootdse_request(struct cldap_socket *cldap, cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response, reply.result); + /* + * We clear this after cldapd_rootdse_fill as this is shared ldb + * and if it was not cleared the audit logging would report changes + * made by internal processes as coming from the last cldap requester + */ + ldb_set_opaque(cldapd->samctx, "remoteAddress", NULL); + status = cldap_reply_send(cldap, &reply); if (!NT_STATUS_IS_OK(status)) { DEBUG(2,("cldap rootdse query failed '%s' - %s\n",