On 12 Dec 1998, Lars Gullik Bj�nnes wrote:

> *Jean-Marc Lasgouttes writes:
>  |  Is there some places where I could read on the differences between
>  | pipes/sockets/whatever? Or perhaps you could give me a short
>  | tutorial?

> (and a lot more, this will not tell much about how to use)

There is a nice tutorial on sockets in the glibc info pages (libc.info,
node "Sockets"). ...and piles and piles of OS literature.

> 
> ip sockets similar to unix socket, but can be used from remote. (I
> don't think we want that.)

AKA "INET" or "Internet namespace"
IMO we should definitely NOT use an INET socket directly; a UNIX socket, as
you suggest, would be nice though (and have multiple connections allowed to
it).  The current FIFO is too weak, and INET too strong. 

Apart from the low-level code, there should be a dialogue where the user
can specify the name for the socket (allowing multiple LyX-sessions), and
what access rights it should have (should be rw------- by default,
regardless of the umask when LyX was started).

If someone do need an INET socket, there are ways to get that with standard
toys; it's trivial to get one right now with socket(1) for instance:
socket -s 7777 <.lyxpipe.in > .lyxpipe.out
and then have the client talk to the lyx server on port 7777
(not quite sure how to do it if we were using a UNIX-socket and multiple
connections, maybe adding -l would be sufficient)

This would of course be a potential security risk (someone connects to the
port on the sly, adds "touch /tmp/trojan; chmod 4777 /tmp/trojan" at the
top and exports "as ASCII" to ~/.profile via a symbolic link or something
equally nasty).  But if a user is willing to take that risk (may be none at
all on a `secure' LAN with only trusted users), it's his decision.

Or, better:
I suspect the "ssh"-suite would be the best bet for inter-host connections;
it can do all sorts of strange things, and has probably better security
than anything we could think up ourselves (and includes compression for
free, in case there are large blobs of text that needs to be transferred
over a slow connection).
Would scp work on named pipes/sockets perhaps?


Joacim
-
With both feet on the ground, you won't get very far.
                -- Loesje

Reply via email to