Hi/2.

Zack Weinberg wrote:
> On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote:
>> OS/2 does not allow chmod() on an opened file.
>>
>> * bin/autom4te.in (handle_output): Ignore setting mode failure on OS/2.
> 
> Not OK, for two reasons: (1) IIRC this is used to create scripts with the
> execute bit set in at least one place.  Ignoring the chmod failure will
> cause confusing errors downstream of where the problem actually was.  (2)
> Having a temporary file that's potentially writable by other user ids,
> even briefly, risks a variety of security problems.
> 
> Also, for maintainability's sake, no checks of $^O anywhere in autoconf's
> Perl code unless there is absolutely no alternative.
> 

How about this ?

1. create and close a temporary file
2. chmod() on it
3. re-open it with O_TRUNC ?

-- 
KO Myung-Hun

Korean OS/2 User Community : https://www.os2.kr/

Reply via email to