Blame SOURCES/0092-Ticket-571-dup-47361-Empty-control-list-causes-LDAP-.patch

cc3dff
From c5950ffa10303383596ea7611844185901d74e2f Mon Sep 17 00:00:00 2001
cc3dff
From: Noriko Hosoi <nhosoi@redhat.com>
cc3dff
Date: Tue, 25 Feb 2014 15:09:34 -0800
cc3dff
Subject: [PATCH 92/92] Ticket 571 (dup 47361) - Empty control list causes LDAP
cc3dff
 protocol error is thrown
cc3dff
cc3dff
covscan Defect type:  Compiler Warnings
cc3dff
2. 389-ds-base-1.3.1.6/ldap/servers/slapd/control.c:364:25:
cc3dff
   warning - format '%d' expects argument of type 'int',
cc3dff
   but argument 4 has type 'PRUint64' [-Wformat=]
cc3dff
Introduced by commit d695afb6a637432e880296d8552f466981c0796c
cc3dff
Fix: Replaced %d with % NSPRIu64
cc3dff
cc3dff
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
cc3dff
(cherry picked from commit 383db4a27cc417c1708989d84cf0e4445936ae9f)
cc3dff
(cherry picked from commit 8b92149bf229d12052a2f349611e5f639fc57ef8)
cc3dff
(cherry picked from commit 86b76ef2466659efd31b07bc02b02daf444a9cde)
cc3dff
---
cc3dff
 ldap/servers/slapd/control.c | 4 ++--
cc3dff
 1 file changed, 2 insertions(+), 2 deletions(-)
cc3dff
cc3dff
diff --git a/ldap/servers/slapd/control.c b/ldap/servers/slapd/control.c
cc3dff
index e614d50..1229e9f 100644
cc3dff
--- a/ldap/servers/slapd/control.c
cc3dff
+++ b/ldap/servers/slapd/control.c
cc3dff
@@ -360,8 +360,8 @@ get_ldapmessage_controls_ext(
cc3dff
                 slapi_pblock_set(pb, SLAPI_REQCONTROLS, NULL);
cc3dff
                 slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &ctrl_not_found);
cc3dff
                 slapi_pblock_set(pb, SLAPI_PWPOLICY, &ctrl_not_found);
cc3dff
-                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%d op=%d contains an empty list of controls\n",
cc3dff
-                        pb->pb_conn->c_connid, pb->pb_op->o_opid);
cc3dff
+                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
cc3dff
+                        (long long unsigned int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
cc3dff
         } else {
cc3dff
                 if ((tag != LBER_END_OF_SEQORSET) && (len != -1)) {
cc3dff
                         goto free_and_return;
cc3dff
-- 
cc3dff
1.8.1.4
cc3dff