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


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

new testcase: Re: Info on "Can't open display"


I just did a bit of reading about aventail - it is the successor to
AutoSOCKS. As such it will be hooking into TCP at a very low level.

Can someone experiencing the problem with Aventail try the following:

start the X server, but no clients.
start bash
$ export DISPLAY=<insert ethernet or ppp adapter ip address here>:0.0
then from the same bash session run vtwm or some window manager.

I'm guessing that that will work with Aventail.

=== reasoning ===
Looking at the AF_UNIX code in cygwin, all the source connections for
AF_UNIX sockets are emulated by a normal socket connection made with the
following settings...

sockaddr_in sin;
sin.sin_family = AF_INET;
sscanf (buf + strlen (SOCKET_COOKIE), "%hu %08x-%08x-%08x-%08x",
        &sin.sin_port,
        secret_ptr, secret_ptr + 1, secret_ptr + 2, secret_ptr + 3);
sin.sin_port = htons (sin.sin_port);
sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
*out = sin;
*outlen = sizeof sin;
ret = 1;

IE a fixed port (dependent on the contents of the socket file, and a
fixed source address (127.0.0.1)...

If the above test works then we'll have a workaround for Aventail users.
And hopefully someone with Aventail support can log a bug report with
them.

If this is the problem, it isn't something that is appropriate to change
in Cygwin. (AF_UNIX sockets are only allowed to operate on the local
machine, and using 127.0.0.1 as the source port guarantees that that is
the case).

Rob

----- Original Message -----
From: "Suhaib Siddiqi" <ssiddiqi@inspirepharm.com>
To: <cygwin-xfree@cygwin.com>
Sent: Saturday, June 16, 2001 10:06 PM
Subject: RE: Info on "Can't open display"


>
>
> > -----Original Message-----
> > From: Christopher Faylor [mailto:cgf@redhat.com]
> > Sent: Friday, June 15, 2001 10:10 PM
> > To: cygwin-xfree@cygwin.com
> > Subject: Re: Info on "Can't open display"
> >
> > On Fri, Jun 15, 2001 at 09:34:22PM -0400, Suhaib Siddiqi wrote:
> > >
> > >> You will lose fork() support for sockets if you use winsock32
directly.
> > >
> > >
> > >I know.  What I want to see if this display problem goes away with
it.
> > >I know it is not the best way.
> > >
> > >> I'm much more keen on identifying why the problem occurs - we can
> > >> probably solve it quickly inside cygwin1.dll once we know that.
> > >
> > >Can anyone build a debug version of Cygwin1.dll with the Egor Duda
patch
> > he
> > >posted this morning?  I do not have time to fool around with Cygwin
code.
> >
> > I'm sure everyone knows this, but Egor's patch was just a temporary
> > commenting out of some AF_UNIX security code.  It wasn't a real
"fix".
> > So, don't get too excited if things start working for you after
applying
> > the patch.
>
>
> I know it was a temporary fix.  I man for checking if his Security
check
> For AF_UNIX is creating problem.  This is also for testing purposes.
>
> Suhaib
>
> >
> > cgf
>


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