public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Qian Hong <fracting@gmail.com>
To: cygwin <cygwin@cygwin.com>
Subject: Re: mktemp() fails on Wine 1.9.3 + Cygwin 2.5.0-0.2
Date: Fri, 19 Feb 2016 02:48:00 -0000	[thread overview]
Message-ID: <CALd+sZR=HSUoyh6VYCqDebPiA7fXQkQspycT=Hqaf8-7hTbRog@mail.gmail.com> (raw)
In-Reply-To: <56BF9370.80303@glup.org>

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

  parent reply	other threads:[~2016-02-19  2:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 20:35 John Hood
2016-02-13 20:46 ` John Hood
2016-02-13 21:11 ` Qian Hong
2016-02-13 21:39   ` Qian Hong
2016-02-14 16:35   ` Andrey Repin
2016-02-15 11:46   ` Corinna Vinschen
2016-02-16  9:36 ` Qian Hong
2016-02-19  2:48 ` Qian Hong [this message]
2016-02-19  9:39   ` Qian Hong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALd+sZR=HSUoyh6VYCqDebPiA7fXQkQspycT=Hqaf8-7hTbRog@mail.gmail.com' \
    --to=fracting@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).