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. Really what we need here is for File::Temp to allow us to supply the third argument to the open() system call. That feature was added in version 0.2310 of the File::Temp module. Does anyone have time right now to do the archaeology on what version of File::Temp shipped with the oldest version of Perl we currently support? zw