fix-format-string.diff: Fix build errors, thanks Krzysztof Klimonda!

This commit is contained in:
Timo Aaltonen
2012-02-16 23:26:01 +02:00
parent 4e1c7658f1
commit 71f7e8b421
3 changed files with 87 additions and 0 deletions

1
debian/changelog vendored
View File

@@ -23,5 +23,6 @@ freeipa (2.1.4-1) UNRELEASED; urgency=low
* control: Add python-libipa-hbac to build-depends.
* control: Add ${shlibs:Depends} to python-freeipa depends.
* rules: Strip the executable bit from translation files.
* fix-format-string.diff: Fix build errors, thanks Krzysztof Klimonda!
-- Timo Aaltonen <tjaalton@ubuntu.com> Tue, 01 Nov 2011 10:52:25 -0400

85
debian/patches/fix-string-format.diff vendored Normal file
View File

@@ -0,0 +1,85 @@
From 93f421284081d88bbe224b48c65fbcd3deaa7b36 Mon Sep 17 00:00:00 2001
From: Krzysztof Klimonda <kklimonda@syntaxhighlighted.com>
Date: Sun, 12 Feb 2012 18:21:38 +0100
Subject: [PATCH] Fix -Wformat-security warnings
---
.../ipa-enrollment/ipa_enrollment.c | 6 +++---
.../ipa-pwd-extop/ipa_pwd_extop.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c b/daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c
index 78fb359..cb8bb84 100644
--- a/daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c
+++ b/daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c
@@ -317,7 +317,7 @@ free_and_return:
if (krbLastPwdChange) slapi_ch_free_string(&krbLastPwdChange);
- LOG(errMesg ? errMesg : "success\n");
+ LOG("%s", errMesg ? errMesg : "success\n");
slapi_send_ldap_result(pb, rc, NULL, errMesg, 0, NULL);
free(principal);
@@ -344,7 +344,7 @@ ipaenrollment_extop(Slapi_PBlock *pb)
if (slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_OID, &oid ) != 0) {
errMesg = "Could not get OID and value from request.\n";
rc = LDAP_OPERATIONS_ERROR;
- LOG(errMesg);
+ LOG("%s", errMesg);
goto free_and_return;
}
@@ -357,7 +357,7 @@ ipaenrollment_extop(Slapi_PBlock *pb)
rc = LDAP_OPERATIONS_ERROR;
free_and_return:
- LOG(errMesg);
+ LOG("%s", errMesg);
slapi_send_ldap_result(pb, rc, NULL, errMesg, 0, NULL);
return SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
index 61e0df1..d526b47 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
@@ -500,7 +500,7 @@ free_and_return:
if (targetEntry) slapi_entry_free(targetEntry);
if (ber) ber_free(ber, 1);
- LOG(errMesg ? errMesg : "success");
+ LOG("%s", errMesg ? errMesg : "success");
slapi_send_ldap_result(pb, rc, NULL, errMesg, 0, NULL);
return SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
@@ -1079,7 +1079,7 @@ free_and_return:
if (rc == LDAP_SUCCESS)
errMesg = NULL;
- LOG(errMesg ? errMesg : "success");
+ LOG("%s", errMesg ? errMesg : "success");
slapi_send_ldap_result(pb, rc, NULL, errMesg, 0, NULL);
return SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
@@ -1106,7 +1106,7 @@ static int ipapwd_extop(Slapi_PBlock *pb)
if (slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_OID, &oid) != 0) {
errMesg = "Could not get OID value from request.\n";
rc = LDAP_OPERATIONS_ERROR;
- LOG(errMesg);
+ LOG("%s", errMesg);
goto free_and_return;
} else {
LOG("Received extended operation request with OID %s\n", oid);
@@ -1129,7 +1129,7 @@ static int ipapwd_extop(Slapi_PBlock *pb)
free_and_return:
if (krbcfg) free_ipapwd_krbcfg(&krbcfg);
- LOG(errMesg);
+ LOG("%s", errMesg);
slapi_send_ldap_result(pb, rc, NULL, errMesg, 0, NULL);
return SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
--
1.7.9

View File

@@ -6,3 +6,4 @@ include-stdint.patch
no-arrows.patch
no-testcert.patch
prefix.patch
fix-string-format.diff