This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]