delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/09/24/07:26:59

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6524B386EC6E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1600946769;
bh=+0w+kmPnsoaDIdrI7G5nLBvg7HhKQ1qjYy6m+bCHVoc=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=wcDUeyAWp7FpnTOX1LtPdv72wCJdSCjparHHQzm9oWx5TozfJAokeKADkq9OC6NHq
EaiM5EOSbFc9/BcAkURcd7GHKsqeJxOuyqw2RbjC9nYi0ztu23r7vn4eXOdepmKAZc
oPimCldnIIkgyxWY5gFz9PbA3bpkeCOpZuQZbj50=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 12DD9385780E
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=ImFM5UAB0t5SVJkxPRk9wyYgd91bSsG98sdkNwnRVptXj1Fzr7ITahftxSZ4nb435UZjLcgyAr5vL7CPOdy5hpabt3x3pa/YzKc/QarD9FomE7TYe+UAwXVPTt1R5/5YRttE/kkRwol3D0i5HQNYKfNEpVEQTYTHAJCcgtjWbsDkVtE/pLTN1XFVxf9SBC+gY8kBXAf3H0rGHdNb8iErgF1LZaABgF/iWT7yBy+m1A4iOOVzrnvj7jGEzdRLBt0iiSLwfJNp2mAVikcd1+kYZlOx2f4y++O9BLXzd4l2zYwdziuwWHb4Kf3V0x7uBwFdGz+wUhGmP/RSZurngM5SVQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=jzHjZFP95HfWLTQYMBILNCLnzSfNKcQSA7JQB+CSEUM=;
b=WhnFEzWIA/pDF3Gqdob081LVNOFcnEdLT34sDMEzqUu/6xkTlA5lHibQZn1NB01Zm1WqyqtOvikKQ4N2VFqiE94E4b5EgtQi4cabL9bkp6Omz0DVfOLjQJmtl4Qdg/wh564lWX46tTol/XiULBbj4MX6ZNOKChw/xOfPBacUTz9sUyKb/WHJjlQAYtvG9sXfVriNssLua16jin2srwNmOH8WVuf4nffijqIGZFjoEtkptWdef0mdhpJQbo+I1YtAh/eixVm854UBRHYvF9ljPCmDjHoCbW5R3e+XsDoN4eHWEQnCt/8PoR0V171s5K7ctU53DgTVWYMSmaxRkltFlw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
dkim=pass header.d=cornell.edu; arc=none
Subject: Re: Problems with native Unix domain sockets on Win 10/2019
To: Michael McMahon <michael DOT x DOT mcmahon AT oracle DOT com>, cygwin AT cygwin DOT com
References: <2b0aeab4-983d-e1d7-301f-edfeeb38cc85 AT oracle DOT com>
Message-ID: <db0f2634-328c-baaa-1cdb-5bd3c145c9e0@cornell.edu>
Date: Thu, 24 Sep 2020 07:26:01 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.12.0
In-Reply-To: <2b0aeab4-983d-e1d7-301f-edfeeb38cc85@oracle.com>
X-Originating-IP: [68.175.129.7]
X-ClientProxiedBy: MN2PR06CA0002.namprd06.prod.outlook.com
(2603:10b6:208:23d::7) To MN2PR04MB6176.namprd04.prod.outlook.com
(2603:10b6:208:e3::13)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: b488e9b0-2bbe-4075-d199-08d8607c9f05
X-MS-TrafficTypeDiagnostic: MN2PR04MB5583:
X-Microsoft-Antispam-PRVS: <MN2PR04MB5583DBDDF518BD9822FCF32FD8390 AT MN2PR04MB5583 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:7691;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: tG0Ls2W/EQvOrfwuDA7sfvGse2gr0HCXlrY73ppyEfAnwXTKhLMcAhzr2K+D0J2sdhZvQdvVwBjWZ1EPrqn2i1BaK5CD3lQ1mErqnoIY4W8XmQptHv74t+x2MaoDWq7AXvBubUMAZCqQ3K13BLDm530BwQjbv6OERR3vlg/JMDRJRdfVg8IfeHl1GA8zBf5y2NoTqOlY8TRJ5HPnZhGODyFu4prTbjz8CgcJUv09RdDlhgm1pka2kFSJ3M7HSYDqfCjksefQA7li1AGttddIL8h7eENSXteDqs8RziNE2JC7fHsWa6G8R/5m9GsKnJhOL1iFB7o1mbdNheG1pfzyxx1/0IReEROk3HhLwD7Y+UqjavcdxOIB25bCoz9STrAf8qfJEVLWVZELilgr4GVE1DDpsEx3cfmZKGyDsHBv6akShLAp4JaaH5zeIlMWv1dip/3/nqoPMwqgtAmj30RaMJVqAstPZ4++fRAwfk63mwUiDHHzZGBWOeoRJ4hU3irbe+IkjsD288CXpZiJl3JdJA==
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE;
SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(66476007)(5660300002)(66556008)(66946007)(966005)(8676002)(75432002)(83380400001)(8936002)(36756003)(2906002)(31686004)(52116002)(786003)(53546011)(2616005)(86362001)(956004)(316002)(478600001)(16526019)(31696002)(26005)(16576012)(6486002)(186003)(43740500002)(460985005);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: JmhTlecgav3x9oSL4zhbNaj4WCTtt4BJ/eqx/Bd1/74xNYPBq+AchH4IHTXDSei5U32KijCh5f6K9Hnoebr/pa6M1nCqV4SoquQc8HAxqUsGOMEzvQigdCX2GSvqAX3pZ6zCNVpH/YC2lnZaqvrn0i7GUXzmN/dJMsEGKVdIeozcdU6Nlj6PNmDNC1z6I9c5MH0uHg0szy0WFlDDQhrWVWeQyOH/+przVMXC1k43iCwQ909FWiitDEUfX6tISoSmjPIj66DpjFGMX5AmZRuaMMlAelD7zCPna0zuL8BZQiaJC4W0EG2lOqIV+e2ZuoltI3Y8s7poS/MXyT7odNbuQ2Nuxl/cWvVHZyc4OVUkieFFmdfJU1qHIZjX2fYaJBVKJuJt9dmvK7vBew8EuyHMqOXh9P/jz6XeEedZDvDyCTF0oMoU69hDeTRWT+rtQEvyqzjbSOulk0bEvIkStPyILTx5/sv4lBKAV/LS4IrhkfX3tDGGM4zzlaOT1794EtmvizCEdQ+63l3CsWSHu0o70TdmYdWvKuEf9UFxUgP09mejHQ6ougR31urcBgPI+4repEmxMx+GQoQPFcIvaDaJoSdHiQUscG3NYnOwzgCFA4V5gECD+mYXAtZ5PUYe6uHtVj/Y2QWGPzvkyl4HOaSXTQ==
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: b488e9b0-2bbe-4075-d199-08d8607c9f05
X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2020 11:26:04.3559 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: JGJXjRpUh/BDSEx/I/c1P15qI+B4TdWONLFLfkiGk3cTT8D05Mzu/7QEK5sulT+YuPa7afVunA4CjgNSit3UOA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5583
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, BODY_8BITS,
DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER,
NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 08OBQYbk004306

On 9/23/2020 7:25 AM, Michael McMahon via Cygwin wrote:
> Hi,
> 
> I searched for related issues but haven't found anything.
> 
> I am having some trouble with Windows native Unix domain sockets
> (a recent feature in Windows 10 and 2019 server) and Cygwin.
> I think I possibly know the cause since I had to investigate a similar
> looking issue on another platform built on Windows.
> 
> The problem is that cygwin commands don't seem to recognise native Unix
> domain sockets correctly. For example, the socket "foo.sock" should
> have the same ownership and similar permissions to other files
> in the example below:
> 
> $ ls -lrt
> total 2181303
> 
> -rw-r--r--  1 mimcmah      None             1259   Sep 23 10:22 test.c
> -rwxr-xr-x  1 mimcmah      None             3680   Sep 23 10:22 test.obj
> -rwxr-xr-x  1 mimcmah      None             121344 Sep 23 10:22 test.exe
> -rw-r-----  1 Unknown+User Unknown+Group         0 Sep 23 10:23 foo.sock
> -rw-r--r--  1 mimcmah      None             144356 Sep 23 10:27 check.ot
> 
> A bigger problem is that foo.sock can't be deleted with the cygwin "rm"
> command.
> 
> $ rm -f foo.sock
> rm: cannot remove 'foo.sock': Permission denied
> 
> $ chmod 777 foo.sock
> chmod: changing permissions of 'foo.sock': Permission denied
> 
> $ cmd /c del foo.sock
> 
> But, native Windows commands are okay, as the third example shows.
> 
> I think the problem may relate to the way native Unix domain sockets are
> implemented in Windows and the resulting special handling required.
> They are implemented as NTFS reparse points and when opening them
> with CreateFile, you need to specify the FILE_FLAG_OPEN_REPARSE_POINT
> flag. Otherwise, you get an ERROR_CANT_ACCESS_FILE. There are other
> complications unfortunately, which I'd be happy to discuss further.
> 
> But, to reproduce it, you can compile the attached code snippet
> which creates foo.sock in the current directory. Obviously, this
> only works on recent versions of Windows 10 and 2019 server.

Cygwin doesn't currently support native Windows AF_UNIX sockets, as you've 
discovered.  See

   https://cygwin.com/pipermail/cygwin/2020-June/245088.html

for the current state of AF_UNIX sockets on Cygwin, including the possibility of 
using native Windows AF_UNIX sockets on systems that support them.

If all you want is for Cygwin to recognize such sockets and allow you to apply 
rm, chmod, etc., I don't think it would be hard to add that capability.  But I 
doubt if that's all you want.

Further discussion of this will have to wait until Corinna is available.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019