From b9249c8f9f838c2a9c28e5c09fffddc9c8917df6 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 14 Dec 2012 10:48:46 +0100 Subject: Fix format security errors with hardening build flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These problems were found while building with the hardening options used by Debian. In order to prevent introducing new unsafe constructs, the options -Wformat" and -Werror=format-security are addeded to the CFLAGS by configure.ac if the compiler supports them. Also, a small spelling fix in posix-aio.c is included. Change-Id: I1034311644fa3c21bc5a7b842c41a3ca79108b3f BUG: 887278 Original-author: Patrick Matthäi Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/4311 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index fe85eb397..d4bdcd740 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1070,7 +1070,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_request_t *req) snprintf (msg_str, sizeof (msg_str), "volumes are already " "present in the cluster. Resetting uuid is not " "allowed"); - gf_log (this->name, GF_LOG_WARNING, msg_str); + gf_log (this->name, GF_LOG_WARNING, "%s", msg_str); goto out; } @@ -1079,7 +1079,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_request_t *req) snprintf (msg_str, sizeof (msg_str),"trusted storage pool " "has been already formed. Please detach this peer " "from the pool and reset its uuid."); - gf_log (this->name, GF_LOG_WARNING, msg_str); + gf_log (this->name, GF_LOG_WARNING, "%s", msg_str); goto out; } @@ -1089,7 +1089,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_request_t *req) if (!uuid_compare (uuid, MY_UUID)) { snprintf (msg_str, sizeof (msg_str), "old uuid and the new uuid" " are same. Try gluster peer reset again"); - gf_log (this->name, GF_LOG_ERROR, msg_str); + gf_log (this->name, GF_LOG_ERROR, "%s", msg_str); ret = -1; goto out; } -- cgit