Whamcloud - gitweb
LU-17566 mdt: move squash code in new/old_init_ucred
authorAurelien Degremont <adegremont@nvidia.com>
Tue, 27 Feb 2024 12:20:33 +0000 (13:20 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 7 Apr 2024 19:17:07 +0000 (19:17 +0000)
commit8b23ceb4a652df2170c6dfe9f70ad83e5989b9c0
tree46d2ddde7d1dec289365f064835b796a78b064d4
parent4f956ae7c3e14e3edbec59a09c8cee04b52fd19c
LU-17566 mdt: move squash code in new/old_init_ucred

Move the uid/gid squashing code at the same place,
at the bottom of the function, to make code refactoring
simpler later.

The squashing code is mostly clearing suppgids from ucred,
and no code was using between the old and new position in
the function. So that should be pretty safe.

Handle suppgids clearing the same way for both function
and for both UID or GID squashing.

Lustre-change: https://review.whamcloud.com/54194
Lustre-commit: 1730d8093fb36e7957414d314755ae5208da1011

Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Change-Id: I29669af26cf68491bf1b6020548116acf318c0c7
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54558
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdt/mdt_lib.c