It is like O_BENEATH, but disables to walk out of the subtree rooted in the starting directory. O_BENEATH does not care if path walks out if it returned.
Change O_BENEATH to handle relative paths same as absolute: do not care if path walks out if it returns.
Only clear latch for O_BENEATH when we walk out of the startdir, not unconditionally.
Check for latch even for the last component if it is a directory [*].
Stop abusing LI_NCF_STRICTRELATIVE outside vfs_lookup,c, LI_NCF should be only used during namei(). Add ni_resflags NIRES_STRICTREL to indicate the need to install file rights for kern_openat().
Update comment explaining why the tracker is needed at all.
Add at2cnpflags() to centralize convertion from AT_* flags to NAMEI flags.
PR: 248335
Reported by: pho [*]
Tested by: pho