[torquedev] unix domain sockets for clients

Garrick Staples garrick at usc.edu
Mon Jan 7 21:49:48 MST 2008

On Mon, Jan 07, 2008 at 04:43:49PM -0800, Garrick Staples alleged:
> I just checked changes into trunk that uses unix domain sockets and credential
> passing instead of inet sockets and pbs_iff.  It works on Linux.  It really
> needs testing on other platforms.
> Obviously this is for local client connections only.  But for those
> connections, it will be much faster and not occupy privileged ports.

I'm not entirely sure how to handle other platforms yet.  The complicated part
is passing the user credentials through the socket.  I know that some platforms
don't support it (like Solaris, OSX, and OpenBSD), and others do it
differently.  I need people to try it on other platforms and possibly port the

The important bits are in src/lib/Libnet/net_server.c (creating the socket),
src/lib/Libifl/pbsD_connect.c (sending ucreds) and src/server/process_request.c
(reading ucreds).
I've added --enable-unixsockets to configure and a test for
'CMSG_SPACE(sizeof(struct ucred))'.  The result of that test is the default for
the feature.

Note that this feature is also a precursor for a future persistent pbs_iff
daemon that will do the same thing for remote connections.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080107/e1a9fa5b/attachment.bin

More information about the torquedev mailing list