(0002773)
Don Cragun (manager)
2015-07-23 16:09
edited on: 2015-07-24 21:39
|
Interpretation response
------------------------
The standard states the requirements for the m4 mkstemp function, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.
Rationale:
-------------
The current standard does not match any existing practice. The m4 utility uses the mkstemp() function and does not modify the umask nor call chmod() after creating the file.
Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
On page 2902 lines 95766-95774, change:
The first argument shall be taken as a template for creating an empty file, with trailing <tt>’X’</tt> characters replaced with characters from the portable filename character set. The behavior is unspecified if the first argument does not end in at least six <tt>’X’</tt> characters. If a temporary file is successfully created, then the defining text of the macro shall be the name of the new file. The user ID of the file shall be set to the effective user ID of the process. The group ID of the file shall be set to the group ID of the file’s parent directory or to the effective group ID of the process. The file access permission bits are set such that only the owner can both read and write the file, regardless of the current umask of the process.
to:
The defining text shall be as if it were the resulting pathname after a successful call to the mkstemp() function defined in the System Interfaces volume of POSIX.1-2008 called with the first argument to the macro invocationl. If a file is created, that file shall be closed.
|