]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add O_RESOLVE_BENEATH and AT_RESOLVE_BENEATH to mimic Linux' RESOLVE_BENEATH.
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 22 Sep 2020 22:48:12 +0000 (22:48 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 22 Sep 2020 22:48:12 +0000 (22:48 +0000)
commit1317da4349f7295eb5153c791cf034730c31d0ea
tree1ac1c30ff751e3e2fa0e2d1e3c689e2c71c51037
parent6a9c72d901feeca0b0865be8954a3a29d8613b34
Add O_RESOLVE_BENEATH and AT_RESOLVE_BENEATH to mimic Linux' RESOLVE_BENEATH.

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.

Requested by: Dan Gohman <dev@sunfishcode.online>
PR: 248335
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25886
sys/kern/vfs_lookup.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/fcntl.h
sys/sys/namei.h