[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS

From: Zack Weinberg
Subject: Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2
Date: Sat, 14 Oct 2023 12:44:31 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85

On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote:
> OS/2 does not allow chmod() on an opened file.
> * bin/ (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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]