Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Date: Fri, 15 Jun 2001 13:36:43 +0400 From: egor duda X-Mailer: The Bat! (v1.53 RC/4) Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <4378734854.20010615133643@logos-m.ru> To: "Ralf Habacker" CC: "Cygwin-Apps" , "Cygwin-Xfree" , "Suhaib Siddiqi" Subject: Re: AW: accept() failed message on kde 1.1.2 ?? In-Reply-To: <000001c0f577$dec63960$6e032bb7@BRAMSCHE> References: <000001c0f577$dec63960$6e032bb7 AT BRAMSCHE> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Friday, 15 June, 2001 Ralf Habacker Ralf DOT Habacker AT saght DOT tessag DOT com wrote: >> > The only change we had in the accept() code between 1.1.8 and >> > 1.3.2 was Egor's patch to support secure connections on AF_UNIX >> > sockets. Is it possible that the security check fails under >> > some circumstances here? you can apply this to cygwin sources, rebuild cygwin1.dll and see if it helps. this disables security checks i've added to AF_UNIX socket code. if it helps, then there may be some problem with my code. Index: net.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/net.cc,v retrieving revision 1.57 diff -u -p -1 -r1.57 net.cc --- net.cc 2001/06/03 22:18:19 1.57 +++ net.cc 2001/06/15 09:27:01 @@ -765,2 +765,3 @@ cygwin_connect (int fd, } +#if 0 if (sock->get_addr_family () == AF_UNIX) @@ -793,2 +794,3 @@ cygwin_connect (int fd, } +#endif } @@ -902,3 +904,3 @@ cygwin_accept (int fd, struct sockaddr * res = accept (sock->get_socket (), peer, len); // can't use a blocking call inside a lock - +#if 0 if (sock->get_addr_family () == AF_UNIX) @@ -934,3 +936,3 @@ cygwin_accept (int fd, struct sockaddr * } - +#endif SetResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "accept"); RH> I will try, but the difficulty is that on stracing the error does not RH> occure. I will analyze it in more detail ... RH> an example [...] RH> Done anyone have an idea ? unfortunately, i don't have kde installed so i can't get any meaningful explanation of all those debug outputs. i suspect, however, that this accept()-involved code could be somehow reduced to small testcase. you have already sent some bits to cygwin mailing list, and, if i understand them correctly, it has some weird sequences of calls such as 'conenect() to socket and then accept() on it without closing it beforehand'. is that so? if you'll be able to extract socket-related code that fails into reasonably small and self-contained program, i'll be able to debug it. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19