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 Date: Fri, 3 Aug 2001 14:07:04 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff. Message-ID: <20010803140704.W23782@cygbert.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <00a201c11a39$a1b55c40$0cb4a8c0 AT brisbane DOT paradigmgeo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <00a201c11a39$a1b55c40$0cb4a8c0@brisbane.paradigmgeo.com>; from miketh@brisbane.paradigmgeo.com on Wed, Aug 01, 2001 at 01:25:29PM +1000 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/