From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58A2F158009 for ; Thu, 22 Jun 2023 13:55:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8323E088B; Thu, 22 Jun 2023 13:55:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8E173E088B for ; Thu, 22 Jun 2023 13:55:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AC9AE335D94 for ; Thu, 22 Jun 2023 13:55:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 34AFBA9C for ; Thu, 22 Jun 2023 13:55:45 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1687442126.817965df90b7f421da65d2e1355957b588d8d2fe.floppym@gentoo> Subject: [gentoo-commits] proj/sandbox:stable-2.x commit in: tests/ X-VCS-Repository: proj/sandbox X-VCS-Files: tests/fchmod-2.sh tests/fchmod.at tests/fchown-2.sh tests/fchown.at X-VCS-Directories: tests/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 817965df90b7f421da65d2e1355957b588d8d2fe X-VCS-Branch: stable-2.x Date: Thu, 22 Jun 2023 13:55:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: edc46e71-2f63-49a4-8932-75560eda75d7 X-Archives-Hash: d332597aad955372745581ecb1f575aa commit: 817965df90b7f421da65d2e1355957b588d8d2fe Author: Michael Orlitzky gentoo org> AuthorDate: Sun Jan 28 03:38:26 2018 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu Jun 22 13:55:26 2023 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=817965df tests: add more tests to make sure fchown/fchmod are handled correctly. Closes: https://bugs.gentoo.org/599706 Signed-off-by: Michael Orlitzky gentoo.org> Signed-off-by: Mike Gilbert gentoo.org> tests/fchmod-2.sh | 11 +++++++++++ tests/fchmod.at | 1 + tests/fchown-2.sh | 11 +++++++++++ tests/fchown.at | 1 + 4 files changed, 24 insertions(+) diff --git a/tests/fchmod-2.sh b/tests/fchmod-2.sh new file mode 100755 index 0000000..96d7cc9 --- /dev/null +++ b/tests/fchmod-2.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Ensure that fchmod() doesn't trigger spurious violations in the most +# basic of cases. +# +addwrite $PWD + +# This should not trigger a violation. +rm -f file +touch file +fchmod-0 0644 file || exit 1 diff --git a/tests/fchmod.at b/tests/fchmod.at index 081d7d2..d364b4b 100644 --- a/tests/fchmod.at +++ b/tests/fchmod.at @@ -1 +1,2 @@ SB_CHECK(1) +SB_CHECK(2) diff --git a/tests/fchown-2.sh b/tests/fchown-2.sh new file mode 100755 index 0000000..dedfbe4 --- /dev/null +++ b/tests/fchown-2.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Ensure that fchown() doesn't trigger spurious violations in the most +# basic of cases. +# +addwrite $PWD + +# This should not trigger a violation. +rm -f file +touch file +fchown-0 ${SB_UID} ${SB_GID} file || exit 1 diff --git a/tests/fchown.at b/tests/fchown.at index 081d7d2..d364b4b 100644 --- a/tests/fchown.at +++ b/tests/fchown.at @@ -1 +1,2 @@ SB_CHECK(1) +SB_CHECK(2)