[Y-devel] Netowrk connectivity (was: segfault on font ...)

Timothy C. Brown tim-y-devel at subastral.com
Tue May 18 14:15:39 BST 2004


Richard Hills said:

> >It's nothing to do with the reset attack. It's simply that it's much harder
> >to secure a tcp connection than a unix domain socket connection, and as you
> >can do nearly everything with a domain socket there are very few times you'd
> >need to use tcp. It has already been turned off by default in Y, and I don't
> >know how much longer it'll remain.
> >
> >Richard Hills

I don't think this is really what you're saying.  What you're saying is,
it's harder to secure an IP connection than it is a UNIX domain socket
connection, and that's true.  But that has nothing to do with the need
to create network transparency and interoperability with Y, which is an
entirely different debate altogether.  

When we talk about network connectivity between client and server, or
between server and server (yes, I know i'm crazy for suggesting this,
but there are reasons), you're essentially talking about TCP, UDP, or SCTP.
When you say "UNIX domain socket" I assume you are talking about an AF_UNIX
socket, which has nothing to do with network connectivity and only applies
to the local machine.  SSH doesn't forward these sockets, it creates an
Xauthority file and forwards the connection over TCP (i'm sure you know all
this already - i'm typing it for posterity, for those of us who don't know
it).  An AF_UNIX socket is not what you want here.

Now, if we are talking about AF_INET, then you have the choice of datagram
only (UDP) or stream sockets (TCP).  I'm not going to touch SCTP here just yet.
I think in order to keep things slim, the client and the server shouldn't
do any kind of heavyweight acknowledgement of requests over the network,
since this creates a situation that needs to be thought through carefully.
What I mean by this is that the network protocol should do the heavy lifting
of acknowledging that a packet was received, requesting a retransmission,
etcetera.  We could engineer Y using TCP or UDP, but if we use UDP, then
we have to decide a number of things amongst the group, such as how are
window states communicated, do you advance the whole screen to the user,
do you transmit the image data raw across the network, do you do it only by
request (pull) or is it a "push" protocol... if you do things via UDP, 
typically you want the option of having the client request (at least) two
things from the server:

        - consistency check (this is what my display looks like, is it right?)
        - please send me the display contents

One area that X has been really weak in is the way it does these things.
We should take a page from VNC and rdesktop when designing the Y network
stack, so as to make it as speedy as possible, easily compressible, and
simple to debug.

Anyway - that was my digression.  Using TCP should be a possibility; let
us not ignore it because it is "insecure", when realistically *some* security
*must* be implemented in Y, beyond what Xauthority generally provides.
Session cookies are at least a good idea and the client should be smart
enough to re-establish a session (or the server, in the appropriate cases).

> We need tcp for network transparency and network transparency 
> is one of the main goals of Y. We can only use unix domain 
> sockets when we are using a local server(x window point of 
> view).

Best,
Tim




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved