Blame SOURCES/0047-Ticket-50428-Log-the-actual-base-DN-when-the-search-.patch

47a30d
From 572ed29e447141f532f2d84f9ea78c48308ad684 Mon Sep 17 00:00:00 2001
47a30d
From: Thierry Bordaz <tbordaz@redhat.com>
47a30d
Date: Fri, 7 Jun 2019 11:35:46 +0200
47a30d
Subject: [PATCH] Ticket 50428 - Log the actual base DN when the search fails
47a30d
 with "invalid attribute request"
47a30d
47a30d
Bug Description:
47a30d
	When a search request contains invalid parameters (attribute list with empty attribute
47a30d
	name, unknown scope, invalid filter..) the search is rejected but the access log
47a30d
	contains a wrong base search: ... SRCH base="(null)"...
47a30d
	This is because it does not use for logging the variable that gather the actual base ('rawbase')
47a30d
47a30d
Fix Description:
47a30d
	Use 'rawbase' value for logging
47a30d
47a30d
https://pagure.io/389-ds-base/issue/50428
47a30d
47a30d
Reviewed by: Mark Reynolds
47a30d
47a30d
Platforms tested: F28
47a30d
47a30d
Flag Day: no
47a30d
47a30d
Doc impact: no
47a30d
---
47a30d
 ldap/servers/slapd/search.c | 1 +
47a30d
 1 file changed, 1 insertion(+)
47a30d
47a30d
diff --git a/ldap/servers/slapd/search.c b/ldap/servers/slapd/search.c
47a30d
index 7e253f535..2a9979552 100644
47a30d
--- a/ldap/servers/slapd/search.c
47a30d
+++ b/ldap/servers/slapd/search.c
47a30d
@@ -154,6 +154,7 @@ do_search(Slapi_PBlock *pb)
47a30d
             goto free_and_return;
47a30d
         }
47a30d
     }
47a30d
+    base = rawbase;
47a30d
 
47a30d
     /*
47a30d
      * ignore negative time and size limits since they make no sense
47a30d
-- 
47a30d
2.21.1
47a30d