yoe/nbd — pull request #23 by scrizt (2014-10-13 12:38:33+00:00)
Title: Adding capability for the client to connect to a unix socket.

An initial attempt to bring unix socket to the nbd suite (only for the client so far.)

The reasoning is that on a multi user system access control is a lot simpler with unix sockets than with TCP ports.

(Regular users should not normally have direct access to block devices.)

The approach right now is to add a -u flag which tells the client that it should interpret the hostname part as a unix path, and ignore any port number. An alternative, but less intuitive approach would be to trigger the unix behaviour with a magic port number (-1?) That way this whole story would require fewer and more confined changes to the code (maybe especially so in the server,) at the expense of user friendliness.