From: "Darrick J. Wong" <djwong@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: fstests@vger.kernel.org, linux-afs@lists.infradead.org
Subject: Re: [PATCH 4/9] generic/317, afs: Allow for a filesystem not to honour the local uid/gid
Date: Tue, 25 May 2021 09:17:30 -0700 [thread overview]
Message-ID: <20210525161730.GE202095@locust> (raw)
In-Reply-To: <162194965595.4011860.7333324355639736586.stgit@warthog.procyon.org.uk>
On Tue, May 25, 2021 at 02:34:15PM +0100, David Howells wrote:
> Each AFS cell has it's own set of user IDs that is uses internally, in its
> ACL system and in its protection management protocol. The user ID used by
> the fileserver is selected from the set belonging to the fileserver's cell
> according to the authentication token associated with an RPC operation -
> and this is set as a file's user ID when it is created.
>
> This means that tests that expect to set a UID and see the same UID still
> set afterwards will fail.
>
> Add a "_require_use_local_uidgid" clause to indicate that a test expects
> internal UID/GID information to be seen in the stat output and should be
> skipped if AFS's case.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: linux-afs@lists.infradead.org
> ---
>
> common/rc | 9 +++++++++
> doc/requirement-checking.txt | 8 ++++++++
> tests/generic/317 | 1 +
> 3 files changed, 18 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 4d4b0280..a04433da 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4622,6 +4622,15 @@ _require_sgid_inheritance()
> esac
> }
>
> +_require_use_local_uidgid()
I find "local uid" to be misleading here -- I read it as "requires
system to use local user/group ids", as opposed to getting user and
group data from an external service like NIS/YP/AD.
What you're really testing for is that new files inherit the fs[ug]id of
the process. How about we make that explicit in the name:
_require_inherit_process_fsuid()
_require_inherit_process_fsgid()
?
--D
> +{
> + case $FSTYP in
> + afs)
> + _notrun "$FSTYP doesn't honour local uid and gid"
> + ;;
> + esac
> +}
> +
> init_rc
>
> ################################################################################
> diff --git a/doc/requirement-checking.txt b/doc/requirement-checking.txt
> index 6efc8dc8..c945e16a 100644
> --- a/doc/requirement-checking.txt
> +++ b/doc/requirement-checking.txt
> @@ -19,6 +19,7 @@ they have. This is done with _require_<xxx> macros, which may take parameters.
> _require_mknod
> _has_mknod
> _require_sgid_inheritance
> + _require_use_local_uidgid
>
> (3) System call requirements.
>
> @@ -113,6 +114,13 @@ _require_sgid_inheritance
> of the SGID bit and the GID from a marked directory. The test will be
> skipped if not supported.
>
> +_require_use_local_uidgid
> +
> + The test requires that the $TEST_DEV filesystem sets the uid and gid of a
> + newly created file to the creating process's fsuid and fsgid. Remote
> + filesystems, for example, may choose other settings or not even have these
> + concepts available. The test will be skipped if not supported.
> +
>
> ========================
> SYSTEM CALL REQUIREMENTS
> diff --git a/tests/generic/317 b/tests/generic/317
> index 289dfabe..112e2e97 100755
> --- a/tests/generic/317
> +++ b/tests/generic/317
> @@ -46,6 +46,7 @@ _require_user
> _require_ugid_map
> _require_userns
> _require_chown
> +_require_use_local_uidgid
> qa_user_id=`id -u $qa_user`
>
> _filter_output()
>
>
next prev parent reply other threads:[~2021-05-25 16:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 13:33 [PATCH 0/9] Add support for using xfstests to test AFS David Howells
2021-05-25 13:33 ` [PATCH 1/9] Add AFS support David Howells
2021-05-25 13:34 ` [PATCH 2/9] generic/294, afs: Allow for mknod subtest failing if mknod not supported David Howells
2021-05-25 16:09 ` Darrick J. Wong
2021-05-25 16:19 ` David Howells
2021-05-25 16:26 ` Darrick J. Wong
2021-05-30 12:49 ` Eryu Guan
2021-06-01 14:31 ` David Howells
2021-06-06 11:58 ` Eryu Guan
2021-05-25 13:34 ` [PATCH 3/9] generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritance David Howells
2021-05-25 16:10 ` Darrick J. Wong
2021-05-25 13:34 ` [PATCH 4/9] generic/317, afs: Allow for a filesystem not to honour the local uid/gid David Howells
2021-05-25 16:17 ` Darrick J. Wong [this message]
2021-05-25 16:41 ` David Howells
2021-05-25 13:34 ` [PATCH 5/9] generic/123, generic/128, afs: Allow for an fs that does its own perm management David Howells
2021-05-25 16:19 ` Darrick J. Wong
2021-05-25 16:44 ` David Howells
2021-05-25 16:51 ` Darrick J. Wong
2021-05-25 13:34 ` [PATCH 6/9] Add the ability to require O_TMPFILE to be supported for a test David Howells
2021-05-25 16:19 ` Darrick J. Wong
2021-05-30 12:54 ` Eryu Guan
2021-05-25 13:34 ` [PATCH 7/9] afs: Indicate the minimum DIO alignment is 1 David Howells
2021-05-25 13:34 ` [PATCH 8/9] generic/465: Fix handling of DIO alignment < sizeof(long) David Howells
2021-05-25 16:25 ` Darrick J. Wong
2021-05-25 16:46 ` David Howells
2021-05-25 13:34 ` [PATCH 9/9] Fix other posix_memalign() alignment issues David Howells
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=20210525161730.GE202095@locust \
--to=djwong@kernel.org \
--cc=dhowells@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-afs@lists.infradead.org \
/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