From 8c03b1dbcdf75ba76b96ccfcc148afe0e134e2d3 Mon Sep 17 00:00:00 2001 From: Krzysztof Klimonda Date: Tue, 3 Sep 2013 00:12:26 +0300 Subject: [PATCH] Fix -Wformat-security warnings --- daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c | 6 +++--- daemons/ipa-slapi-plugins/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 9f884bd39233adf90b0f4eff1868885d587d351a..22c40f2bcfc527127b745e1efde5977b148c78a8 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 1058c313d1f2a193eb7fae621bc9c5d103fb6d5f..c3e0ebd9d90f393be031b26fadcedd00f6091a8d 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 @@ -573,7 +573,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; @@ -1143,7 +1143,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; @@ -1170,7 +1170,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); @@ -1193,7 +1193,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.8.3.1