]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritance
authorDavid Howells <dhowells@redhat.com>
Mon, 24 Apr 2023 14:10:38 +0000 (15:10 +0100)
committerZorro Lang <zlang@kernel.org>
Sun, 30 Apr 2023 16:00:42 +0000 (00:00 +0800)
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
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc
doc/requirement-checking.txt
tests/generic/314

index 2133b1ef8ad3abd96f72b871465e3ec7fe456aef..49fd0d1beee90a7b7690050a169e3201c74ac4e6 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -5152,6 +5152,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
 
 ################################################################################
index 45d2756bd2ceec07cb6b2ed5b4e6997dc0a14f60..a3588ee9095d49158ee0e5ff1583ea306b5984c5 100644 (file)
@@ -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
index 9449d30faf542d876af9077b646456044be9de63..dd617089af1dcfdcfa8707b1d940ecdabdab3234 100755 (executable)
@@ -17,6 +17,7 @@ _supported_fs generic
 _require_test
 _require_user
 _require_chown
+_require_sgid_inheritance
 
 rm -rf $TEST_DIR/$seq-dir