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-op-sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 6ef0b21c5..69e6fad85 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1431,7 +1431,7 @@ glusterd_op_set_volume (dict_t *dict) if (ret) { op_errstr = (op_errstr)? op_errstr: "Volume set help internal error"; - gf_log (this->name, GF_LOG_ERROR, op_errstr); + gf_log (this->name, GF_LOG_ERROR, "%s", op_errstr); } goto out; } @@ -2678,7 +2678,7 @@ glusterd_op_ac_send_stage_op (glusterd_op_sm_event_t *event, void *ctx) ret = glusterd_op_validate_quorum (this, op, dict, &op_errstr); if (ret) { - gf_log (this->name, GF_LOG_ERROR, op_errstr); + gf_log (this->name, GF_LOG_ERROR, "%s", op_errstr); opinfo.op_errstr = op_errstr; goto out; } -- cgit