HomeFreeBSD

open.2: describe O_RESOLVE_BENEATH errors correctly

Description

open.2: describe O_RESOLVE_BENEATH errors correctly

The behavior is the same as in capability mode, it does not actually
return EINVAL for absolute lookups:

openat(AT_FDCWD,"/tmp/test",O_RDONLY|O_DIRECTORY,00) = 3 (0x3)
openat(3,"../../",O_RDONLY|0x800000,00)          ERR#93 'Capabilities insufficient'
openat(3,"/etc/passwd",O_RDONLY|0x800000,00)     ERR#93 'Capabilities insufficient'

Fixes: 1f305be43 ("Document {O,AT}_RESOLVE_BENEATH...")
Reviewed by: kib, pauamma (manpages), emaste
Sponsored by: https://www.patreon.com/valpackett
Pull Request: https://github.com/freebsd/freebsd-src/pull/680
Differential Revision: https://reviews.freebsd.org/D38675

Details

Provenance
val_packett.coolAuthored on Feb 19 2023, 8:14 PM
emasteCommitted on Mar 2 2023, 8:58 PM
Reviewer
kib
Differential Revision
D38675: open.2: describe O_RESOLVE_BENEATH errors correctly
Parents
rG939b24b0abbd: xlocale: garbage collect references to strtoq_l/strtouq_l
Branches
Unknown
Tags
Unknown