From 02975a3dc769d0ffa60b07d91f5903bd719a6c9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= <ondra@mistotebe.net>
Date: Tue, 15 Aug 2023 13:07:46 +0100
Subject: [PATCH] ITS#10091 Do not allow dynlist being configured as global

---
 servers/slapd/overlays/dynlist.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c
index 10cacf9798..b552353a7d 100644
--- a/servers/slapd/overlays/dynlist.c
+++ b/servers/slapd/overlays/dynlist.c
@@ -2740,6 +2740,11 @@ dynlist_db_init(
 	slap_overinst *on = (slap_overinst *)be->bd_info;
 	dynlist_gen_t *dlg;
 
+	if ( SLAP_ISGLOBALOVERLAY( be ) ) {
+		Debug( LDAP_DEBUG_ANY, "dynlist cannot be used as global overlay.\n" );
+		return 1;
+	}
+
 	dlg = (dynlist_gen_t *)ch_malloc( sizeof( *dlg ));
 	on->on_bi.bi_private = dlg;
 	dlg->dlg_dli = NULL;
-- 
GitLab

