Re: [PATCH v3 1/3] namei: implement O_BENEATH-style AT_* flags

2018-10-13 Thread Aleksa Sarai
On 2018-10-13, Al Viro wrote: > > Pardon me, but... huh? The reason for your two calls of dirfd_path_init() > > is, > > AFAICS, the combination of absolute pathname with both LOOKUP_XDEV and > > LOOKUP_BENEATH at the same time. That combination is treated as if the > > pathname > > had been re

Re: [PATCH v3 1/3] namei: implement O_BENEATH-style AT_* flags

2018-10-13 Thread Aleksa Sarai
On 2018-10-13, Al Viro wrote: > First of all, dirfd_path_init() part should be in a separate commit. And I'm > really not happy with the logics in there. dirfd_path_init() itself is > kinda-sorta reasonable. Sure, I can do that. > It is equivalent to setting the starting point for > relative p

Re: [PATCH v3 1/3] namei: implement O_BENEATH-style AT_* flags

2018-10-13 Thread Al Viro
On Sat, Oct 13, 2018 at 08:33:19AM +0100, Al Viro wrote: > Pardon me, but... huh? The reason for your two calls of dirfd_path_init() is, > AFAICS, the combination of absolute pathname with both LOOKUP_XDEV and > LOOKUP_BENEATH at the same time. That combination is treated as if the > pathname >

Re: [PATCH v3 1/3] namei: implement O_BENEATH-style AT_* flags

2018-10-13 Thread Al Viro
On Tue, Oct 09, 2018 at 06:02:28PM +1100, Aleksa Sarai wrote: First of all, dirfd_path_init() part should be in a separate commit. And I'm really not happy with the logics in there. dirfd_path_init() itself is kinda-sorta reasonable. It is equivalent to setting the starting point for relative p

[PATCH v3 1/3] namei: implement O_BENEATH-style AT_* flags

2018-10-09 Thread Aleksa Sarai
Add the following flags to allow various restrictions on path resolution (these affect the *entire* resolution, rather than just the final path component -- as is the case with most other AT_* flags). The primary justification for these flags is to allow for programs to be far more strict about ho