HomeFreeBSD

Revert parts of 938cfeb0f27303721081223816d4f251ffeb1767

Description

Revert parts of 938cfeb0f27303721081223816d4f251ffeb1767

When read and writing the UID/GID, we always want the value
relative to the root user namespace, the kernel will take care
of remapping this to the user namespace for us.

Calling from_kuid(user_ns, uid) with a unmapped uid will return -1
as that uid is outside of the scope of that namespace, and will result
in the files inside the namespace all being owned by 'nobody' and not
being allowed to call chmod or chown on them.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #12263

Details

Provenance
allanjudeAuthored on Jul 2 2021, 7:16 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 10 2022, 4:51 PM
Parents
rGfc5200aa9b34: AVL: Remove obsolete branching optimizations
Branches
Unknown
Tags
Unknown