Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000847 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Error 2014-06-19 07:02 2019-06-10 08:54
Reporter rhansen View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Richard Hansen
Organization BBN
User Reference
Section open, openat
Page Number 1394
Line Number 46098
Interp Status Approved
Final Accepted Text See Note: 0002268
Summary 0000847: open(O_CREAT), directories, and EISDIR
Description open("/path/to/existing/directory", O_CREAT) should fail with EISDIR, but implementations should be allowed to support creating and opening a directory via open("/path/to/directory", O_CREAT|O_DIRECTORY) as an extension

see discussion at
http://thread.gmane.org/gmane.comp.standards.posix.austin.general/9503 [^]
and
http://thread.gmane.org/gmane.comp.standards.posix.austin.general/9451 [^]
Desired Action On page 1391 at line 45975 (open() description, O_CREAT), change:
Otherwise, the file shall be created

to:
Otherwise, if O_DIRECTORY is not set the file shall be created as a regular file

On page 1393 after line 46051 (open() description), insert a new paragraph:
If O_CREAT and O_DIRECTORY are set and the requested access mode is neither O_WRONLY nor O_RDWR, the result is unspecified.

On page 1394 at line 46098 (open() errors, EISDIR), change:
The named file is a directory and oflag includes O_WRONLY or O_RDWR.

to:
The named file is a directory and oflag includes O_WRONLY or O_RDWR, or includes O_CREAT without O_DIRECTORY.


(wording courtesy of Geoff)
Tags tc2-2008
Attached Files

- Relationships

-  Notes
(0002268)
rhansen (manager)
2014-06-19 16:40
edited on: 2014-06-26 15:13

Interpretation response
------------------------
The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
The standard does not specify the behavior when open() is called with O_CREAT|O_RDONLY (or O_CREAT|O_SEARCH) on an existing directory. Additionally, some systems want to allow creation of directories using the open() function. This should be an allowed, but not required, extension.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
On page 238 line 7885 change:
O_DIRECTORY Fail if not a directory.
to:
O_DIRECTORY Fail if file is a non-directory file.
On page 1391 at line 45975 (open() description, O_CREAT), change:
Otherwise, the file shall be created
to:
Otherwise, if O_DIRECTORY is not set the file shall be created as a regular file
On page 1393 after line 46051 (open() description), insert a new paragraph:
If O_CREAT and O_DIRECTORY are set and the requested access mode is neither O_WRONLY nor O_RDWR, the result is unspecified.
On page 1394 at line 46098 (open() errors, EISDIR), change:
The named file is a directory and oflag includes O_WRONLY or O_RDWR.
to:
The named file is a directory and oflag includes O_WRONLY or O_RDWR, or includes O_CREAT without O_DIRECTORY.


(0002289)
ajosey (manager)
2014-06-27 11:09

Interpretation proposed June 27 2014
(0002331)
ajosey (manager)
2014-08-05 13:18

Interpretation approved 5 August 2014

- Issue History
Date Modified Username Field Change
2014-06-19 07:02 rhansen New Issue
2014-06-19 07:02 rhansen Name => Richard Hansen
2014-06-19 07:02 rhansen Organization => BBN
2014-06-19 07:02 rhansen Section => open, openat
2014-06-19 07:02 rhansen Page Number => 1394
2014-06-19 07:02 rhansen Line Number => 46098
2014-06-19 16:40 rhansen Note Added: 0002268
2014-06-19 16:41 rhansen Note Edited: 0002268
2014-06-23 16:43 rhansen Note Edited: 0002268
2014-06-26 15:13 rhansen Note Edited: 0002268
2014-06-26 15:14 nick Interp Status => ---
2014-06-26 15:14 nick Final Accepted Text => See Note: 0002268
2014-06-26 15:14 nick Status New => Interpretation Required
2014-06-26 15:14 nick Resolution Open => Accepted As Marked
2014-06-26 15:14 nick Tag Attached: tc2-2008
2014-06-26 15:15 nick Interp Status --- => Pending
2014-06-27 11:09 ajosey Interp Status Pending => Proposed
2014-06-27 11:09 ajosey Note Added: 0002289
2014-08-05 13:18 ajosey Interp Status Proposed => Approved
2014-08-05 13:18 ajosey Note Added: 0002331
2019-06-10 08:54 agadmin Status Interpretation Required => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker