mktemp() fails on Wine 1.9.3 + Cygwin 2.5.0-0.2

Qian Hong fracting@gmail.com
Fri Feb 19 02:48:00 GMT 2016


I wrote a test case demonstrate the problem at the Cygwin level.

It is almost only one line:
open("haha", O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); //
remember to unlink the file "haha" first

On Windows + Cygwin, this program creates a file in 0600 mode:

Administrator@short ~
$ stat haha
  File: ‘haha’
  Size: 0               Blocks: 0          IO Block: 65536  regular empty file
Device: 903b0bf0h/2419788784d   Inode: 91760842407778598  Links: 1
Access: (0600/-rw-------)  Uid: (197108/Administrator)   Gid: (197121/    None)
Access: 2016-02-19 10:34:19.917782200 +0800
Modify: 2016-02-19 10:34:19.917782200 +0800
Change: 2016-02-19 10:34:19.917782200 +0800
 Birth: 2016-02-19 09:35:08.796316900 +0800

Administrator@short ~
$ getfacl.exe haha
# file: haha
# owner: Administrator
# group: None
user::rw-
group::---
other:---

On Wine + Cygwin, this program creates a file in 0505 mode:

fracting@fracting-ThinkPad-Edge-E431 ~
$ stat haha
  File: ‘haha’
  Size: 0               Blocks: 0          IO Block: 65536  regular empty file
Device: 4fdc55f7h/1339839991d   Inode: 36447801    Links: 1
Access: (0505/-r-x---r-x)  Uid: (197608/fracting)   Gid: (197121/    None)
Access: 2016-02-19 10:32:36.828596900 +0800
Modify: 2016-02-19 10:32:31.820695700 +0800
Change: 2016-02-19 10:32:31.820695700 +0800
 Birth: 2016-02-19 10:32:31.820695700 +0800

fracting@fracting-ThinkPad-Edge-E431 ~
$ getfacl.exe haha
# file: haha
# owner: fracting
# group: None
user::r-x
group::---
group:SYSTEM:rwx
mask:r-x
other:r-x

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list