The AFS filesystem has its own distributed permission management system
that's based on a per-cell user and group database used in conjunction with
ACLs. The user is determined by the authentication token acquired from the
kaserver or Kerberos, not by the local fsuid/fsgid. For the most part, the
uid, gid and mask on a file are ignored.
The generic/123 and generic/128 tests check that the UNIX permission bits do
what would normally be expected of them - but this fails on AFS. Using "su"
to change the user is not effective on AFS. Instead, "keyctl session" would
need to be used and an alternative authentication token would need to be
obtained.
Provide a "_require_unix_perm_checking" clause so that these tests can be
suppressed in cases such as AFS.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
esac
}
+_require_unix_perm_checking()
+{
+ case $FSTYP in
+ afs)
+ _notrun "$FSTYP doesn't perform traditional UNIX perm checking"
+ ;;
+ esac
+}
+
init_rc
################################################################################
_require_exportfs
_require_sgid_inheritance
_require_use_local_uidgid
+ _require_unix_perm_checking
(3) System call requirements.
filesystems, for example, may choose other settings or not even have these
concepts available. The test will be skipped if not supported.
+_require_unix_perm_checking
+
+ The test requires that the $TEST_DEV filesystem performs traditional UNIX
+ file permissions checking. A remote filesystem, for example, might use
+ some alternative distributed permissions model involving authentication
+ tokens rather than the local fsuid/fsgid.
+
========================
SYSTEM CALL REQUIREMENTS
_require_test
_require_user
+_require_unix_perm_checking
my_test_subdir=$TEST_DIR/123subdir
_require_scratch
_require_user
_require_chmod
+_require_unix_perm_checking
_scratch_mkfs >/dev/null 2>&1
_scratch_mount "-o nosuid"