Whamcloud - gitweb
LU-17454 nodemap: allow mapping for root
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 31 Jan 2024 14:40:44 +0000 (15:40 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 3 Mar 2024 10:25:48 +0000 (10:25 +0000)
commit16d5763e30ddc2a36d278f573cf3566e1941ea95
tree5712f52bd035281071ae0f1a39b9c06e527af544
parentb0873202f6ad61b7a62547a13edc49cfea7be742
LU-17454 nodemap: allow mapping for root

Allow an id mapping for root, to match what is implemented for regular
users, with the following behavior:
- if admin property is set, root remains root.
- if admin property is not set, the idmap for '0' is taken into
  account.
- if admin property is not set and there is no idmap for '0' and
  deny_unknown property is not set, root is squashed to the squash
  uid/gid.
- if admin property is not set and there is no idmap for '0' and
  deny_unknown property is set, root is blocked.

Note that map_mode remains ignored for root. Also, capabilities are
not dropped for root when mapped, just like it is done for regular
users. If admins want to drop root capabilities, root must be
squashed.

sanity-sec test_15 is updated to test root mapping.

Lustre-change: https://review.whamcloud.com/53870
Lustre-commit: b4a336d0ce91c05ae48544b3fd2e56f0bcb0a8cf

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id2e950b99e3b3ba27179408c647e1f7b7c49e32e
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54159
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/nodemap_handler.c
lustre/tests/sanity-sec.sh