Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-30 Thread René Scharfe
Am 29.03.2017 um 06:54 schrieb Christian Couder: On Tue, Mar 28, 2017 at 11:49 PM, Jeff King wrote: On Tue, Mar 28, 2017 at 11:15:12PM +0200, Christian Couder wrote: On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: FreeBSD implements getcwd(3) as a syscall, but falls back to a version b

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-28 Thread Christian Couder
On Tue, Mar 28, 2017 at 11:49 PM, Jeff King wrote: > On Tue, Mar 28, 2017 at 11:15:12PM +0200, Christian Couder wrote: > >> On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: >> > FreeBSD implements getcwd(3) as a syscall, but falls back to a version >> > based on readdir(3) if it fails for som

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-28 Thread Jeff King
On Tue, Mar 28, 2017 at 11:15:12PM +0200, Christian Couder wrote: > On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: > > FreeBSD implements getcwd(3) as a syscall, but falls back to a version > > based on readdir(3) if it fails for some reason. The latter requires > > permissions to read and

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-28 Thread Christian Couder
On Tue, Mar 28, 2017 at 11:24 PM, Stefan Beller wrote: > On Tue, Mar 28, 2017 at 2:15 PM, Christian Couder > wrote: >> On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: >>> FreeBSD implements getcwd(3) as a syscall, but falls back to a version >>> based on readdir(3) if it fails for some reas

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-28 Thread Stefan Beller
On Tue, Mar 28, 2017 at 2:15 PM, Christian Couder wrote: > On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: >> FreeBSD implements getcwd(3) as a syscall, but falls back to a version >> based on readdir(3) if it fails for some reason. The latter requires >> permissions to read and execute pat

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-28 Thread Christian Couder
On Sun, Mar 26, 2017 at 3:43 PM, René Scharfe wrote: > FreeBSD implements getcwd(3) as a syscall, but falls back to a version > based on readdir(3) if it fails for some reason. The latter requires > permissions to read and execute path components, while the former does > not. That means that if

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-27 Thread Junio C Hamano
Zenobiusz Kunegunda writes: > Od: "Junio C Hamano" > Do: "René Scharfe" ; > Wysłane: 2:40 Poniedziałek 2017-03-27 > Temat: Re: [PATCH] strbuf: support long paths w/o read rights in > strbuf_getcwd() on FreeBSD > >> >> Nicely analy

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-26 Thread Zenobiusz Kunegunda
Od: "Junio C Hamano" Do: "René Scharfe" ; Wysłane: 2:40 Poniedziałek 2017-03-27 Temat: Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD > > Nicely analysed and fixed (or is the right word "worked around"?) > > Th

Re: [PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-26 Thread Junio C Hamano
René Scharfe writes: > FreeBSD implements getcwd(3) as a syscall, but falls back to a version > based on readdir(3) if it fails for some reason. The latter requires > permissions to read and execute path components, while the former does > not. That means that if our buffer is too small and we'

[PATCH] strbuf: support long paths w/o read rights in strbuf_getcwd() on FreeBSD

2017-03-26 Thread René Scharfe
FreeBSD implements getcwd(3) as a syscall, but falls back to a version based on readdir(3) if it fails for some reason. The latter requires permissions to read and execute path components, while the former does not. That means that if our buffer is too small and we're missing rights we could get