From patchwork Mon Feb 25 17:12:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 159179 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2262493jad; Mon, 25 Feb 2019 09:12:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IZfai/gGPCiADeBpTINXxtq/oCcBu5DYCwOm/FR8kwOuMBXwixzFKEfvdKSE9gKLklEqbe1 X-Received: by 2002:a1c:e0d7:: with SMTP id x206mr11533802wmg.152.1551114753057; Mon, 25 Feb 2019 09:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551114753; cv=none; d=google.com; s=arc-20160816; b=WuA4jpdx+e9csV/ps90Yjp1V+M9a1F+4QJ0hWKM+v2tArwLhVmVMwiIWDDun4AeSRy jvj2QlFf/8a2DuIpYNQEx6abxi/HnfjZhf+3eWFBvUj5tnrqX6ixI2TgEesMu9xmne9h JtRp4CIbhU1QvGWaDzmunVci9gE7XP6ekuaaSnm8T8iMHqObtXxb9iSZ/oqrY+lKCM6s zMx/oBTuU5cfhmDXjmnzaVQuHj0mbKqEtFP3prD9Ab7GADjVKUBxDP06LEZF7oMKKBYw N8HfWaV1wb4WIMykuUrVpTsiyk/fuugi0m6We3cy6RGuQjqIlTyDitH902buyrnFaarC a2yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=of37bij0v7TfrwM+f7GN7Cp5XIFkjKde2oTu95MYUV0=; b=AFLcZvxp6QRC413qFbCnCcl0FOSfkg6VY905Fxz7DzT8ZtXHfGXbnwWTEDuoa9WQND 4Vhn3ko+GEAyenUnBi8WSiQ5hh4KpjLdSnNNH/UMFvfBaWIJZNkKwfZ248GTPnk0gVHU yO82ID9t2+R/s7Mmreyd89DQ+8ZRTNC4nwSANP4VbU7aFKXqj1f2AP0+feRxk0St0gM+ gKzwUeMCFcOai/8vT5CYK7nSPr7O0b9AX2q+JDp0NMI8Q8jJ56YSgllaIzwphnKcofug xXO0uxx69XeQn/xO47QjH7Zyu5KCc3B9fFP3BqCqyHsNKAihULJvoG2iAyXoCfvnPJcj B2Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZIe75+uO; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it" Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id l13si6629167wrr.124.2019.02.25.09.12.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 09:12:33 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZIe75+uO; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it" Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9B06B3EA389 for ; Mon, 25 Feb 2019 18:12:32 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id 0C6313EA29A for ; Mon, 25 Feb 2019 18:12:28 +0100 (CET) Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 0B1C61400142 for ; Mon, 25 Feb 2019 18:12:27 +0100 (CET) Received: by mail-ot1-x341.google.com with SMTP id q24so8524031otk.0 for ; Mon, 25 Feb 2019 09:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7DR98hAK5kIeGEonF93WAgE0PIZOhNCk0ucGloIYtx4=; b=ZIe75+uOMaB7TB2/5ARvXUNnT7wybPIMz+Q3mLtoXUL25HtE5uznlG0AJJ4ujBRvza xw6dBD7jCNh9hi1SUh0unTJI/X86g2c2rOl+yNmxxbspZ6cYWHno7faWVUF5dcw0DlNI wn10oGuf3szy++N9S0vMNBcW4sXfRRAqZ2oqK/EjnxdZjUnUM5/ehHi3hMKAsSJYLzgJ W94fGEYt6RIhiCSmRsEukO2R7DFfcgr9zeF46/Tn1hmZQdDqCquN6mjerZtXi5FmZ8uQ QWREegHHm3PldW+hIescUa7WCBViTDovK+0+Ndb//w5ujy3DXFLMO3vkm63i5RRsYvRg XpRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7DR98hAK5kIeGEonF93WAgE0PIZOhNCk0ucGloIYtx4=; b=H7U9zxvgK6CR5UM65wGJxGp9xg3mRgzJ3eTxuNdHJh25NJKN9oJqFu1LkEoqf3MqZB 93aP3+jPfFek+O2YvUj1Eh+/NDGLcDt0HFga+X2oLoYtEHHXNZNpdaIVQe/KTz8YloC6 HFqNTRcgo9cblansRGWEm8JREquVEraoH2Rq4GkN8q0D77e08OMrHbdWZG2mIpg6FOtt U8/CBPWNTLlerA2CYynbuAewr07Iz813u+F4DDsJc52jmEzAafaioyvctQaoRPMCruhp fOMfa5PqljtPLcv2BWYa7c9xluZ/3IaLUVFEfjfan3EDGP7XPyAWwVh3bZoXWYgxf6Pj demw== X-Gm-Message-State: AHQUAuYFLxOjEPpU1g1jtzO5kNvJRdnl+2hkRlipuZspt1/IrSU4ypIp KZ9ULRx68JRkq0CG4ANNfy6WrTN+924= X-Received: by 2002:a9d:7658:: with SMTP id o24mr4304419otl.275.1551114746028; Mon, 25 Feb 2019 09:12:26 -0800 (PST) Received: from alago.cortijodelrio.net (CableLink-189-218-30-19.Hosts.InterCable.net. [189.218.30.19]) by smtp.googlemail.com with ESMTPSA id o128sm4273865oif.14.2019.02.25.09.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 09:12:25 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: ltp@lists.linux.it Date: Mon, 25 Feb 2019 11:12:20 -0600 Message-Id: <20190225171220.5827-1-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH] setregid01: Fix security warning for string formatting X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" GCC 8.2.0 complains with the following: setregid01.c: In function 'run': setregid01.c:47:3: error: format not a string literal and no format arguments [-Werror=format-security] tst_res(TFAIL | TTERRNO, tc->msg); ^~~~~~~ because there is no string formatting in the message. This can be seen with CFLAGS set to: -Wformat -Wformat-security -Werror=format-security as Yocto Project's Poky does, e.g.: http://errors.yoctoproject.org/Errors/Details/230043/ Signed-off-by: Daniel Díaz --- testcases/kernel/syscalls/setregid/setregid01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c index f2e41e134..8c9e11918 100644 --- a/testcases/kernel/syscalls/setregid/setregid01.c +++ b/testcases/kernel/syscalls/setregid/setregid01.c @@ -44,9 +44,9 @@ static void run(unsigned int n) TEST(SETREGID(*tc->arg1, *tc->arg2)); if (TST_RET == -1) - tst_res(TFAIL | TTERRNO, tc->msg); + tst_res(TFAIL | TTERRNO, "%s", tc->msg); else - tst_res(TPASS, tc->msg); + tst_res(TPASS, "%s", tc->msg); } static void setup(void)