From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m0.truegem.net (m0.truegem.net [69.55.228.47]) by sourceware.org (Postfix) with ESMTPS id 97E623857C6D for ; Wed, 5 May 2021 05:04:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97E623857C6D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maxrnd.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=mark@maxrnd.com Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id 14554OgH066748 for ; Tue, 4 May 2021 22:04:24 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 162-235-43-67.lightspeed.irvnca.sbcglobal.net(162.235.43.67), claiming to be "[192.168.1.20]" via SMTP by m0.truegem.net, id smtpdMQPGav; Tue May 4 22:04:15 2021 Subject: Re: python > 3.5: Issue with unix domain sockets To: cygwin-developers@cygwin.com References: <1620046759893.5340@bmw.de> <2cde4128-6a3d-7431-6608-a2184d23964a@cornell.edu> <134fa003-836f-1184-79eb-e31dfd852a64@maxrnd.com> From: Mark Geisert Message-ID: Date: Tue, 4 May 2021 22:04:15 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 05:04:26 -0000 Corinna Vinschen wrote: > On May 4 02:45, Mark Geisert wrote: >>[blah blah...] > You're supposed to call the special setsockopt(SO_PEERCRED) on the > accepting socket. The no_getpeereid property is inherited by the > accepted socket. Ah, of course. Well, I couldn't figure out a way to do the setsockopt() call some times but not others, because Python can't reach into the Cygwin DLL. Nor should it. Since this Python patch is supposed to be a temporary workaround, I took the tack that it should just ignore an error return from setsockopt(SO_PEERCRED). In this fashion the handshake will be turned off when it can be, and when it can't (on the accepted socket) the attempt will error but that error will be ignored. Thanks for the sanity check! ..mark