View Issue Details

IDProjectCategoryView StatusLast Update
00009701003.1(2013)/Issue7+TC1Shell and Utilitiespublic2019-06-10 08:54
Reporterrhansen Assigned Toajosey  
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameRichard Hansen
OrganizationBBN
User Reference
Sectionm4
Page Number2902
Line Number95773-95774
Interp StatusApproved
Final Accepted TextSee 0000970:0002773.
Summary0000970: mkstemp() description permits mode 0640 or 0620, should only permit 0600
Descriptionmkstemp() says:
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.

The use of the word "both" implies that implementations are allowed to give others read-only or write-only access, when I believe the intention is 0600.
Desired ActionOn page 2902 lines 95773-95774 (m4 mkstemp()), change:
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 file access permission bits shall be set such that the owner can read and write the file and only the owner can read or write the file, regardless of the current umask of the process.
Tagstc2-2008

Relationships

related to 0000964 Closed should m4 treat mkstemp failure as an error? 

Activities

Don Cragun

2015-07-23 16:09

manager   bugnote:0002773

Last edited: 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.


ajosey

2015-07-24 19:59

manager   bugnote:0002775

Interpretation proposed 24 July 2015

ajosey

2015-09-07 11:32

manager   bugnote:0002814

Interpretation approved: 7 Sep 2015

Issue History

Date Modified Username Field Change
2015-07-16 15:32 rhansen New Issue
2015-07-16 15:32 rhansen Status New => Under Review
2015-07-16 15:32 rhansen Assigned To => ajosey
2015-07-16 15:32 rhansen Name => Richard Hansen
2015-07-16 15:32 rhansen Organization => BBN
2015-07-16 15:32 rhansen Section => m4
2015-07-16 15:32 rhansen Page Number => 2902
2015-07-16 15:32 rhansen Line Number => 95773-95774
2015-07-16 15:32 rhansen Interp Status => ---
2015-07-16 16:16 geoffclare Project 1003.1(2008)/Issue 7 => 1003.1(2013)/Issue7+TC1
2015-07-16 19:55 eblake Relationship added related to 0000964
2015-07-23 15:12 Don Cragun Status Under Review => Resolved
2015-07-23 15:12 Don Cragun Resolution Open => Accepted
2015-07-23 15:13 Don Cragun Tag Attached: tc2-2008
2015-07-23 15:13 Don Cragun Desired Action Updated
2015-07-23 16:09 Don Cragun Note Added: 0002773
2015-07-23 16:09 Don Cragun Resolution Accepted => Accepted As Marked
2015-07-23 16:10 Don Cragun Final Accepted Text => See 0000970:0002773.
2015-07-23 16:12 Don Cragun Note Edited: 0002773
2015-07-23 16:12 Don Cragun Interp Status --- => Pending
2015-07-23 16:12 Don Cragun Status Resolved => Interpretation Required
2015-07-24 18:04 Don Cragun Note Edited: 0002773
2015-07-24 19:00 Don Cragun Note Edited: 0002773
2015-07-24 19:59 ajosey Interp Status Pending => Proposed
2015-07-24 19:59 ajosey Note Added: 0002775
2015-07-24 21:39 Don Cragun Note Edited: 0002773
2015-09-07 11:32 ajosey Interp Status Proposed => Approved
2015-09-07 11:32 ajosey Note Added: 0002814
2019-06-10 08:54 agadmin Status Interpretation Required => Closed