Re: [PATCH v4 09/12] unix-socket: disallow chdir() when creating unix domain sockets
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 5, 2021, 21:52 UTC
- Message-ID
- <xmqq5z259skb.fsf@gitster.c.googlers.com>
- In-Reply-To
- <ed933c34-85d2-c238-122f-13751a11ca7f@jeffhostetler.com>
Jeff Hostetler <git@jeffhostetler.com> writes:
Show 8 quoted lines
>> I am OK to keep the series as-is, and leave it to a possible future >> work to remove the need for chdir even for long paths and not having >> to return an error with ENAMETOOLONG; when such an update happens, >> the "fail if need to chdir" feature this patch is adding will become >> a no-op. > > I think I'd like to keep things as I have them now with the "disallow > chdir()" option bit
So we are on the same page.
Show 6 quoted lines
> and save the "fork() / bind()" solution for a > later patch series. Simple IPC is large enough as it is and the new > ENAMETOOLONG error will only affect callers who set the bit. A later > patch series can easily test and confirm the "fork() / bind() solution > in isolation and test it on the other Unix hosts and then remove the > bit from those callers (if we want).
The bit will then become an unused API relic, but that is OK (I do not think fork/bind would be the best and/or only way to avoid chdir, though, but it won't matter in the context ofh tis discussion).