andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 4 months ago
Clone

Blame 0102-Ticket-47427-Overflow-in-nsslapd-disk-monitoring-thr.patch

dc8c34
From 14655088af87f0f7244cb49351726fe89f8a9ef8 Mon Sep 17 00:00:00 2001
dc8c34
From: Noriko Hosoi <nhosoi@redhat.com>
dc8c34
Date: Tue, 17 Sep 2013 14:04:46 -0700
dc8c34
Subject: [PATCH] Ticket 47427 - Overflow in nsslapd-disk-monitoring-threshold
dc8c34
dc8c34
Bug Description:  Using ldapsearch shows threshold value as a negative number, even
dc8c34
                  though the feature is working correctly.
dc8c34
dc8c34
Fix Description:  When readingthe dse, the server was trying to cast the value as a "int".
dc8c34
                  Changed CONFIG_INT to CONFIG_LONG for nsslapd-disk-monioring-threshold.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47427
dc8c34
dc8c34
Manually cherry picked:
dc8c34
  commit 5a0d74ab8030233bcde9aa787ba7a2929a75e267
dc8c34
  commit 23a6383357990ea8f17fec9af155313d0a186af6
dc8c34
from 389-ds-base-1.2.11 branch.
dc8c34
---
dc8c34
 ldap/servers/slapd/libglobs.c | 2 +-
dc8c34
 1 file changed, 1 insertion(+), 1 deletion(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
dc8c34
index f7d4ec3..aaee33a 100644
dc8c34
--- a/ldap/servers/slapd/libglobs.c
dc8c34
+++ b/ldap/servers/slapd/libglobs.c
dc8c34
@@ -679,7 +679,7 @@ static struct config_get_and_set {
dc8c34
 		(ConfigGetFunc)config_get_disk_monitoring},
dc8c34
 	{CONFIG_DISK_THRESHOLD, config_set_disk_threshold,
dc8c34
 		NULL, 0,
dc8c34
-		(void**)&global_slapdFrontendConfig.disk_threshold, CONFIG_INT,
dc8c34
+		(void**)&global_slapdFrontendConfig.disk_threshold, CONFIG_LONG,
dc8c34
 		(ConfigGetFunc)config_get_disk_threshold},
dc8c34
 	{CONFIG_DISK_GRACE_PERIOD, config_set_disk_grace_period,
dc8c34
 		NULL, 0,
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34