Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Ken Brown
On 1/13/2020 1:39 PM, Corinna Vinschen wrote: > On Jan 13 19:34, Corinna Vinschen wrote: >> On Jan 13 16:53, Ken Brown wrote: >>> On 1/13/2020 10:28 AM, Corinna Vinschen wrote: On Dec 29 17:56, Ken Brown wrote: > [...] > Note: The man page mentions fchownat and linkat also. linkat

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Corinna Vinschen
On Jan 13 19:34, Corinna Vinschen wrote: > On Jan 13 16:53, Ken Brown wrote: > > On 1/13/2020 10:28 AM, Corinna Vinschen wrote: > > > On Dec 29 17:56, Ken Brown wrote: > > >> [...] > > >> Note: The man page mentions fchownat and linkat also. linkat already > > >> supports the AT_EMPTY_PATH flag,

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Eric Blake
On 1/13/20 11:44 AM, Ken Brown wrote: I don't think so.  I think we agree, although maybe I didn't express myself clearly enough for that to be obvious.  What confused me was the following paragraph further down in the open(2) man page (still discussing O_PATH):     If pathname is a symbolic

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Corinna Vinschen
On Jan 13 16:53, Ken Brown wrote: > On 1/13/2020 10:28 AM, Corinna Vinschen wrote: > > On Dec 29 17:56, Ken Brown wrote: > >> [...] > >> Note: The man page mentions fchownat and linkat also. linkat already > >> supports the AT_EMPTY_PATH flag, so nothing needs to be done. But I > >> don't

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Ken Brown
On 1/13/2020 12:24 PM, Eric Blake wrote: > On 1/13/20 10:53 AM, Ken Brown wrote: >> On 1/13/2020 10:28 AM, Corinna Vinschen wrote: >>> Hi Ken, >>> >>> On Dec 29 17:56, Ken Brown wrote: Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. Following Linux, the first patch in this

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Eric Blake
On 1/13/20 10:53 AM, Ken Brown wrote: On 1/13/2020 10:28 AM, Corinna Vinschen wrote: Hi Ken, On Dec 29 17:56, Ken Brown wrote: Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. Following Linux, the first patch in this series allows the call to succeed if O_PATH is also specified.

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Ken Brown
On 1/13/2020 10:28 AM, Corinna Vinschen wrote: > Hi Ken, > > On Dec 29 17:56, Ken Brown wrote: >> Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. >> Following Linux, the first patch in this series allows the call to >> succeed if O_PATH is also specified. >> >> According to the

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2020-01-13 Thread Corinna Vinschen
Hi Ken, On Dec 29 17:56, Ken Brown wrote: > Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. > Following Linux, the first patch in this series allows the call to > succeed if O_PATH is also specified. > > According to the Linux man page for 'open', the file descriptor > returned by

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Ken Brown
On 12/30/2019 6:09 PM, Brian Inglis wrote: > On 2019-12-30 14:47, Ken Brown wrote: >> On 12/30/2019 3:55 PM, Brian Inglis wrote: >>> On 2019-12-30 12:53, Ken Brown wrote: On 12/30/2019 2:18 PM, Brian Inglis wrote: > On 2019-12-29 10:56, Ken Brown wrote: >> Currently, opening a symlink

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Brian Inglis
On 2019-12-30 14:47, Ken Brown wrote: > On 12/30/2019 3:55 PM, Brian Inglis wrote: >> On 2019-12-30 12:53, Ken Brown wrote: >>> On 12/30/2019 2:18 PM, Brian Inglis wrote: On 2019-12-29 10:56, Ken Brown wrote: > Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. > Following

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Ken Brown
On 12/30/2019 3:55 PM, Brian Inglis wrote: > On 2019-12-30 12:53, Ken Brown wrote: >> On 12/30/2019 2:18 PM, Brian Inglis wrote: >>> On 2019-12-29 10:56, Ken Brown wrote: Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. Following Linux, the first patch in this series allows

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Brian Inglis
On 2019-12-30 12:53, Ken Brown wrote: > On 12/30/2019 2:18 PM, Brian Inglis wrote: >> On 2019-12-29 10:56, Ken Brown wrote: >>> Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. >>> Following Linux, the first patch in this series allows the call to >>> succeed if O_PATH is also

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Ken Brown
On 12/30/2019 2:18 PM, Brian Inglis wrote: > On 2019-12-29 10:56, Ken Brown wrote: >> Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. >> Following Linux, the first patch in this series allows the call to >> succeed if O_PATH is also specified. >> >> According to the Linux man page

Re: [PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-30 Thread Brian Inglis
On 2019-12-29 10:56, Ken Brown wrote: > Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. > Following Linux, the first patch in this series allows the call to > succeed if O_PATH is also specified. > > According to the Linux man page for 'open', the file descriptor > returned by the

[PATCH v2 0/3] Support opening a symlink with O_PATH | O_NOFOLLOW

2019-12-29 Thread Ken Brown
Currently, opening a symlink with O_NOFOLLOW fails with ELOOP. Following Linux, the first patch in this series allows the call to succeed if O_PATH is also specified. According to the Linux man page for 'open', the file descriptor returned by the call should be usable as the dirfd argument in