Mailing List Archive

Patch to support local UNIX domain sockets
I've been using VMWare more and more lately, including the newly free
VMWare Server, and I have been longing for well-managed serial
consoles on my virtual machines. A few weekends ago I hacked support
into conserver for UNIX domain sockets based on the existing TCP
socket code.

The code could still deserve a good once-over, but I figured that I'd
put it out there in case others might be interested in playing with
it now. I currently have four VMWare Server serial consoles under
control of conserver, and they've been running happily for two weeks
or so.

The patch is attached. Below are some examples of how I use it in my
conserver.cf:

------------------------------------
console openbsd-firewall {
type localsocket;
file /usr/local/share/conserver/openbsd-firewall;
}

console openbsd-client {
type localsocket;
file /usr/local/share/conserver/openbsd-client;
}
------------------------------------

Pretty simple. : -)

For use with conserver and this patch, the settings in VMWare for the
serial port should be:
- "Use named pipe" is checked
- The text field right after "Use named pipe" is the file, and this
should match the "file" setting for the console in conserver.
- Chose "This end is the server"
- Chose "The other end is an application"

There are a few places marked in the code with XXXLOCALSOCKET that I
need to look over closely where I think I may have missed something
or only implemented something partially. I should also check to see
if the user specifies a file that is longer than the length of
sockaddr_un.sun_path - 1 and complain appropriately. I'm also not
sure if I (fully?) implemented socket file substitution patterns....

Comments gladly accepted.


Have a good one,
- djg