mkfifo() and mknod() is not allowed in any directories (even NSCachesDirectory or NSTemporaryDirectory)

Originator:kishikawakatsumi
Number:rdar://23165157 Date Originated:19-Oct-2015
Status:Closed Resolved:
Product:tvOS SDK Product Version:9.0 beta2, beta3
Classification:Serious Bug Reproducible:Always
 
Summary:
mkfifo() and mknod() is not allowed in any directories (even NSCachesDirectory or NSTemporaryDirectory)

Steps to Reproduce:
Execute following code:

#import <sys/stat.h>

int ret = mkfifo([NSTemporaryDirectory() stringByAppendingPathComponent:@"test"].UTF8String, 0600);
NSLog(@"%@", @(ret));

Or:

int ret = mknod([NSTemporaryDirectory() stringByAppendingPathComponent:@"test"].UTF8String, S_IFIFO | 0666, 0);
NSLog(@"%@", @(ret));


Expected Results:
Operation succeeded in NSCachesDirectory or NSTemporaryDirectory
(ret to be ZERO)

Actual Results:
returns error code EPERM (operation not permitted)

Version:
tvOS 9.0 beta2 and beta3 (13T5379f)

Notes:


Configuration:
Apple TV

Attachments:

Comments

Please know that our engineering team has determined that this issue behaves as intended based on the information provided.

mknod is not useful since the filesystem is mounted nodev (as it has always been on iOS). mkfifo has no legitimate use-case on tvOS since a) 3rd-party apps aren’t supposed to be writing anything into their containers and b) FIFOs have never been a supported IPC mechanisms for app<—> extension communication.

Developer Bug Reporting Team Apple Worldwide Developer Relations https://developer.apple.com

By kishikawakatsumi at Nov. 3, 2015, 10 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!