# Fix format security errors with hardening build flags. --- glusterfs-3.4.0~qa5.orig/xlators/mgmt/glusterd/src/glusterd-handler.c +++ glusterfs-3.4.0~qa5/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1069,7 +1069,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_r 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; } @@ -1078,7 +1078,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_r 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; } @@ -1088,7 +1088,7 @@ glusterd_handle_cli_uuid_reset (rpcsvc_r 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; } diff -Naur glusterfs-3.4.0qa5.orig/xlators/mgmt/glusterd/src/glusterd-op-sm.c glusterfs-3.4.0qa5/xlators/mgmt/glusterd/src/glusterd-op-sm.c --- glusterfs-3.4.0qa5.orig/xlators/mgmt/glusterd/src/glusterd-op-sm.c 2012-12-12 11:02:02.000000000 +0100 +++ glusterfs-3.4.0qa5/xlators/mgmt/glusterd/src/glusterd-op-sm.c 2012-12-14 09:40:00.302452518 +0100 @@ -1431,7 +1431,7 @@ 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; } @@ -2532,7 +2532,7 @@ 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; } --- glusterfs-3.4.0qa5.orig/xlators/mgmt/glusterd/src/glusterd-replace-brick.c 2012-12-12 11:02:02.000000000 +0100 +++ glusterfs-3.4.0qa5/xlators/mgmt/glusterd/src/glusterd-replace-brick.c 2012-12-14 09:44:07.110448986 +0100 @@ -451,7 +451,7 @@ if (ret) { *op_errstr = gf_strdup (msg); ret = -1; - gf_log (THIS->name, GF_LOG_ERROR, *op_errstr); + gf_log (THIS->name, GF_LOG_ERROR, "%s", *op_errstr); goto out; } --- glusterfs-3.4.0qa5.orig/cli/src/cli.c 2012-12-12 11:02:01.000000000 +0100 +++ glusterfs-3.4.0qa5/cli/src/cli.c 2012-12-14 10:08:37.430429997 +0100 @@ -298,12 +298,12 @@ return 1; if (strcmp (opt, "version") == 0) { - cli_out (argp_program_version); + cli_out ("%s", argp_program_version); exit (0); } if (strcmp (opt, "print-logdir") == 0) { - cli_out (DEFAULT_LOG_FILE_DIRECTORY); + cli_out ("%s", DEFAULT_LOG_FILE_DIRECTORY); exit (0); }