andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 14655088af87f0f7244cb49351726fe89f8a9ef8 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue, 17 Sep 2013 14:04:46 -0700
Subject: [PATCH] Ticket 47427 - Overflow in nsslapd-disk-monitoring-threshold

Bug Description:  Using ldapsearch shows threshold value as a negative number, even
                  though the feature is working correctly.

Fix Description:  When readingthe dse, the server was trying to cast the value as a "int".
                  Changed CONFIG_INT to CONFIG_LONG for nsslapd-disk-monioring-threshold.

https://fedorahosted.org/389/ticket/47427

Manually cherry picked:
  commit 5a0d74ab8030233bcde9aa787ba7a2929a75e267
  commit 23a6383357990ea8f17fec9af155313d0a186af6
from 389-ds-base-1.2.11 branch.
---
 ldap/servers/slapd/libglobs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index f7d4ec3..aaee33a 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -679,7 +679,7 @@ static struct config_get_and_set {
 		(ConfigGetFunc)config_get_disk_monitoring},
 	{CONFIG_DISK_THRESHOLD, config_set_disk_threshold,
 		NULL, 0,
-		(void**)&global_slapdFrontendConfig.disk_threshold, CONFIG_INT,
+		(void**)&global_slapdFrontendConfig.disk_threshold, CONFIG_LONG,
 		(ConfigGetFunc)config_get_disk_threshold},
 	{CONFIG_DISK_GRACE_PERIOD, config_set_disk_grace_period,
 		NULL, 0,
-- 
1.8.1.4