In our system (Linux 4.4) we see a a unix socket with an abstract namespace (those starting with @ with no corresponding file on the file system). Showing its details with lsof reports:

serv 7539 aesmd    6u  unix 0xffff8800795e12c0      0t0   220690 @aesm_socket_base type=STREAM

We would like to create a sort of alias (or symlink) on the filesystem (something like /var/run/aesm.sock )

Is there a way to do so ?

  • What are you going to use it for? In what way does it need to be an alias (which I think isn't possible) and not an unrelated socket with a program forwarding between them (which is definitely possible)? – Gilles 'SO- stop being evil' Jun 14 '16 at 20:30
  • It can be an unrelated socket, as long as it forwards all the actions (connection attempts and traffic) to the original one. The resulting, file-system based socket /var/run/aesm.sock is going to be made accessible from inside a docker container via the usual volume mounting approach. – Valerio Schiavoni Jun 15 '16 at 9:27

You can forward between just about any kind of sockets and other communication channels with socat. Listen to connections on the file-named socket, forward them to the abstract-named socket, forking to handle concurrent connections. I think this should do the trick (untested):

socat UNIX-LISTEN:/var/run/aesm.sock,fork ABSTRACT-CONNECT:aesm_socket_base
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.