Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <002e01c11e09$994f8930$0cb4a8c0@brisbane.paradigmgeo.com> From: "Mike Thomas" To: "Corinna Vinschen" References: <00a201c11a39$a1b55c40$0cb4a8c0 AT brisbane DOT paradigmgeo DOT com> <20010803140704 DOT W23782 AT cygbert DOT vinschen DOT de> Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff. Date: Mon, 6 Aug 2001 09:51:46 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Thanks for the help Corinna - much appreciated. ----- Original Message ----- From: Corinna Vinschen To: Sent: Friday, August 03, 2001 10:07 PM Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff. > On Wed, Aug 01, 2001 at 01:25:29PM +1000, Mike Thomas wrote: > > return accept (sockfd, (struct sockaddr *) NULL, NULL); > > Should work now in the next developers snapshot. > > > 1. socket.h does not include a type "socklen_t" which is apparently defined > > on some Unix platforms. > > Defined as `int' in cygwin/socket.h now. > > > 2. Although not relevant to the code above, I noticed while looking in > > socket.h and friends that Cygwin provides sockaddr and sockaddr_un, which > > differ in terms of how much space is made for the name of the socket. The > > sockaddr member sa_data is only very short (14 bytes, compared to > > UNIX_PATH_LEN for the sun_path member of sockaddr_un) which would not > > suffice for a long file name. Unfortunately accept is defined in terms of > > sockaddr rather than sockaddr_un which could potentially cause string > > overwrites. > > Should be no problem. Winsock accept doesn't know about AF_UNIX sockets. > They are faked using AF_INET sockets in Cygwin. > > Hope, that helps, > Corinna > > -- > Corinna Vinschen Please, send mails regarding Cygwin to > Cygwin Developer mailto:cygwin AT cygwin DOT com > Red Hat, Inc. > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/