From patchwork Sun Jun 24 20:34:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Strachan X-Patchwork-Id: 934132 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="fY+/hYEo"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41DjHM2R01z9s2L for ; Mon, 25 Jun 2018 18:38:07 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id DFDD23E74FF for ; Mon, 25 Jun 2018 10:38:04 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 4659D3E603C for ; Sun, 24 Jun 2018 22:35:01 +0200 (CEST) Received: from mail-it0-x249.google.com (mail-it0-x249.google.com [IPv6:2607:f8b0:4001:c0b::249]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 6B8851A00990 for ; Sun, 24 Jun 2018 22:35:00 +0200 (CEST) Received: by mail-it0-x249.google.com with SMTP id p130-v6so6494982itp.2 for ; Sun, 24 Jun 2018 13:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:message-id:subject:from:to:cc; bh=u/ZnOst571wXZeIhIjf7t+l9CJnzPpYa/V5Z+IrWIOQ=; b=fY+/hYEo2OX0c8IB4gfaMI5taAp7zGc0D7PABwKo0LFrvA52ruSNfUVXhpTs/PpdI1 YjjHkYyXBtzZbTtCUFuL7msdwgntH/ZuhHlcdu+xfpquz825h7HrZYVaNONip0KcDVLl OI/B2rwyvY9cYmOtzIRmqlHTuebwauU8Pa8PSBuZx1SSHQ03qLjJ69hoeUImqv74TVyW nnOHPrJu4juP8cotN8HxM6ncb4DXqGjX3siKlH/zKYYkJYRq5uyBDbZlgshsmaCFccQW zrS4+nrrbZdArKFNkPanIsnaLWxLDWa0xY2Y8zp8YSMOtjd9stBcZWJ+5BgtA6zDLoW/ gO8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=u/ZnOst571wXZeIhIjf7t+l9CJnzPpYa/V5Z+IrWIOQ=; b=QIw38NkXm6UPByWkyouC5/ZDokUrOIqmsAYjefMDs3aj47+ozpYWvJgX8vcpeuLl5Y uVijvb3qxDH5xRT6ZoxZOPaH8UFa3LA5fcCRMmUuSsuk+I/8fUaPujNL9OKVKOlzYz5D 4+idEl5pCZ0enFtKMz9ebzGn+VY85+5R2/2F89SVJ6Dwa2kaUXrTfQNpC60wuT7T0Zta CndU1HhU0o3cEMuhAaJO9YhJ1b2YzazIutZrmxn5KCzWvwBeKZVw6yfOe+eF+v4t8L0P rtJHj/F0Ds5k0VnNyPp2SfvT21qZvVsohwNnsU0OZhAoTd5aES1XuPg6tT0HVacEqQVX FKXw== X-Gm-Message-State: APt69E3x8RonkB5fF2sdUJ4RBY6cK2EzpTQSgQ6dXJ9K04Me3c5y+qYc zsSWmJSr3drxpUo9TMTxFGXqZQGHNiXRJno9LIhqitTcOGIDFXtvpF6cmifmwY46FkVgVnkx7w9 mzfbkf0uDUuU+Bhzn1yYV41oMaAe/ObD9oXGsT7cqRJ7WTsgydmMC/E/y4Ix8yTOn X-Google-Smtp-Source: ADUXVKJsgd0xK9fEq03e2HttRioH0Dl6PUDgh/9NEXUuCgetWmd64yGCo77AcgpEtI2m5XG5wWtofGqLflk9A/c= MIME-Version: 1.0 X-Received: by 2002:a24:9cd:: with SMTP id 196-v6mr4041330itm.25.1529872498931; Sun, 24 Jun 2018 13:34:58 -0700 (PDT) Date: Sun, 24 Jun 2018 13:34:56 -0700 Message-Id: <20180624203456.30476-1-astrachan@google.com> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog From: Alistair Strachan To: ltp@lists.linux.it X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-7.4 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it X-Mailman-Approved-At: Mon, 25 Jun 2018 10:37:44 +0200 Cc: kernel-team@android.com Subject: [LTP] [PATCH] verify_caps_exec: Replace index() with strchr() 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+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The index() function was removed in POSIX.2008. It is not implemented by Android's bionic C library for 64-bit platforms. Use the more portable strchr() function from C89. Signed-off-by: Alistair Strachan --- testcases/kernel/security/filecaps/verify_caps_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/kernel/security/filecaps/verify_caps_exec.c b/testcases/kernel/security/filecaps/verify_caps_exec.c index 2c5cc0b2a..7183d8b4a 100644 --- a/testcases/kernel/security/filecaps/verify_caps_exec.c +++ b/testcases/kernel/security/filecaps/verify_caps_exec.c @@ -186,7 +186,7 @@ static int fork_drop_and_exec(int keepperms, cap_t expected_caps) "got a bad seqno (c=%d, s=%d, seqno=%d)", c, s, seqno); } - p = index(buf, '.'); + p = strchr(buf, '.'); if (!p) tst_brkm(TFAIL, NULL, "got a bad message from print_caps\n");