Re: odb_mkstemp's 0444 permission broke write/delete access on AFP
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Feb 18, 2015, 17:04 UTC
- Message-ID
- <vpqwq3fup5g.fsf@anie.imag.fr>
- In-Reply-To
- <xmqqwq3g31hj.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> in compat/broken-unlink.c and something like this > > #ifdef BROKEN_UNLINK > #define unlink(x) workaround_broken_unlink(x) > #endif > > in git-compat-util.h instead?
That means we have to know BROKEN_UNLINK at compile-time. I had never heard about AFP before this thread, but they seem mountable on Linux and Windows. I don't know whether these platforms will have the same issue, but I suspect they will (if the server rejects the unlink).
So, if my suspicion is right, we'd have to activate it on any platform able to mount AFP, i.e. essentially everywhere.
> That way, people on well behaving systems do not have to worry about > clobbering errno and stuff, perhaps?
With my solution, unlink() is always the last call in the function, so it should behave correctly right? Or did I miss anything?
-- Matthieu Moy http://www-verimag.imag.fr/~moy/