From: David Howells <dhowells@redhat.com>
To: fstests@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
"Darrick J. Wong" <djwong@kernel.org>, Eryu Guan <guan@eryu.me>,
Marc Dionne <marc.dionne@auristor.com>,
Jeffrey Altman <jaltman@auristor.com>,
linux-afs@lists.infradead.org
Subject: [PATCH v2 2/6] generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritance
Date: Mon, 24 Apr 2023 15:10:38 +0100 [thread overview]
Message-ID: <20230424141042.450535-3-dhowells@redhat.com> (raw)
In-Reply-To: <20230424141042.450535-1-dhowells@redhat.com>
The AFS filesystem doesn't do any special handling for the SUID, SGID and
SVTX bits and doesn't perform any sort of propagation. Further, only a
user with cell admin rights can set non-0777 bits.
Handle this by adding a "_require_sgid_inheritance" clause and labelling
the test with it, thereby skipping for filesystems that don't support it.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
cc: linux-afs@lists.infradead.org
---
common/rc | 9 +++++++++
doc/requirement-checking.txt | 7 +++++++
tests/generic/314 | 1 +
3 files changed, 17 insertions(+)
diff --git a/common/rc b/common/rc
index 8b8cb714..00c5fcfe 100644
--- a/common/rc
+++ b/common/rc
@@ -5097,6 +5097,15 @@ _save_coredump()
$COREDUMP_COMPRESSOR -f "$out_file"
}
+_require_sgid_inheritance()
+{
+ case $FSTYP in
+ afs)
+ _notrun "SGID-based group ID inheritance is not supported on $FSTYP"
+ ;;
+ esac
+}
+
init_rc
################################################################################
diff --git a/doc/requirement-checking.txt b/doc/requirement-checking.txt
index 45d2756b..a3588ee9 100644
--- a/doc/requirement-checking.txt
+++ b/doc/requirement-checking.txt
@@ -16,6 +16,7 @@ they have. This is done with _require_<xxx> macros, which may take parameters.
_require_chattr <letters>
_require_exportfs
+ _require_sgid_inheritance
(3) System call requirements.
@@ -97,6 +98,12 @@ _require_exportfs
The test also requires the use of the open_by_handle_at() system call and
will be skipped if it isn't available in the kernel.
+_require_sgid_inheritance
+
+ The test required that the $TEST_DEV filesystem supports the inheritance
+ of the SGID bit and the GID from a marked directory. The test will be
+ skipped if not supported.
+
========================
SYSTEM CALL REQUIREMENTS
diff --git a/tests/generic/314 b/tests/generic/314
index 9449d30f..dd617089 100755
--- a/tests/generic/314
+++ b/tests/generic/314
@@ -17,6 +17,7 @@ _supported_fs generic
_require_test
_require_user
_require_chown
+_require_sgid_inheritance
rm -rf $TEST_DIR/$seq-dir
next prev parent reply other threads:[~2023-04-24 14:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 14:10 [PATCH v2 0/6] xfstests: Add support for using xfstests to test AFS David Howells
2023-04-24 14:10 ` [PATCH v2 1/6] Add AFS support David Howells
2023-04-26 14:30 ` Zorro Lang
2023-04-26 15:53 ` David Howells
2023-04-26 19:40 ` Zorro Lang
2023-04-26 20:32 ` David Howells
2023-04-27 5:38 ` Zorro Lang
2023-04-24 14:10 ` David Howells [this message]
2023-04-26 14:35 ` [PATCH v2 2/6] generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritance Zorro Lang
2023-04-24 14:10 ` [PATCH v2 3/6] generic/317, afs: Allow for a filesystem not to honour the local uid/gid David Howells
2023-04-26 14:40 ` Zorro Lang
2023-04-26 15:54 ` David Howells
2023-04-24 14:10 ` [PATCH v2 4/6] generic/123, generic/128, afs: Allow for an fs that does its own perm management David Howells
2023-04-26 14:47 ` Zorro Lang
2023-04-24 14:10 ` [PATCH v2 5/6] generic/531: Check for O_TMPFILE David Howells
2023-04-26 14:49 ` Zorro Lang
2023-04-26 14:51 ` Zorro Lang
2023-04-26 14:54 ` Darrick J. Wong
2023-04-26 15:32 ` Zorro Lang
2023-04-26 15:57 ` David Howells
2023-04-24 14:10 ` [PATCH v2 6/6] generic/696: AFS doesn't support the "noacl" command line option David Howells
2023-04-26 14:53 ` Zorro Lang
2023-04-28 20:06 ` [PATCH v2 7/6] Doc changes for afs David Howells
2023-04-30 6:12 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230424141042.450535-3-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=jaltman@auristor.com \
--cc=linux-afs@lists.infradead.org \
--cc=marc.dionne@auristor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox