Seems like a bug with mkfifo -m

Corinna Vinschen corinna-cygwin@cygwin.com
Thu May 28 14:52:33 GMT 2020


On May 28 09:16, Ken Brown via Cygwin wrote:
> On 5/28/2020 4:12 AM, Дмитрий Есарев via Cygwin wrote:
> > Hi, all
> > 
> > When i ran cygwin 2.x, i used mkfifo -m 0600 file to create a named pipe with no user and group permissions.
> > 
> > in the latest cygwin the above command creates device with 0644 permissions. And i cant drop it to 0600:
> > 
> > cygcheck.exe -V
> > cygcheck (cygwin) 3.1.4
> > 
> > $ umask 0077
> > $ touch somefile; ls -l somefile
> > -rw------- 1 admin absent 0 may 26 18:15 somefile
> > 
> > $ mkfifo -m 0600 somefifo; ls -l somefifo
> > prw-r--r-- 1 admin absent 0 may 26 18:16 somefifo
> > 
> > $ chmod 600 somefifo; ls -l somefifo
> > prw-r--r-- 1 admin absent 0 may 26 18:16 somefifo
> > 
> > 
> > 
> > In old-good cygwin 2.x the command works as expected:
> > 
> > $ cygcheck.exe -V
> > cygcheck (cygwin) 2.9.0
> > 
> > $ umask
> > 0022
> > 
> > $ mkfifo -m 0600 somefifo; ls -l somefifo
> > prw------- 1 builduser Domain Users 0 May 26 18:21 somefifo
> 
> Thanks for the report.  The problem isn't with mkfifo, it's with the
> permission information reported by ls.  I did a bisection of the Cygwin
> development repo and found that the regression was introduced by the
> following commit:
> 
> commit f36262d56ac78f04de147746ce4a85c6155e4a23
> Author: Corinna Vinschen <corinna@vinschen.de>
> Date:   Wed Jan 29 15:14:05 2020 +0100
> 
>     Cygwin: stat: fix st_mode of fifos
> 
> I'll take a look if Corinna doesn't get to it first.

Not sure what I was thinking at the time.  I recall having observed
something funny, but the patch was apparently wrong.  Just revert
it at your discretion, Ken.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


More information about the Cygwin mailing list