[PATCH ucspi-vsock 0/7] Extract vsockserver-socketbinder and vsockserverd

Alyssa Ross
2021-03-19T02:54:31Z

This series breaks vsockserver apart into two smaller programs,
vsockserver-socketbinder and vsockserverd. vsockserver-socketbinder
binds and listens on an AF_VSOCK socket and then execs into another
program with the socket as stdin. vsockserverd accepts connections to
a socket provided on stdin, and for each connection runs a program
with the connection socket on stdin and stdout. vsockserver is
replaced with a program that builds an argv that just combines these
two smaller programs and execs into it.

This design is based on s6[1]'s s6-ipcserver,
s6-ipcserver-socketbinder, and s6-ipcserverd programs.

[1]: https://skarnet.org/software/s6/
[2]: https://skarnet.org/software/s6-rc/

Alyssa Ross (7):
vsock: get cid and port instead of just cid
vsock: check socket family before reading sockaddr
vsockserver: switch to a non-blocking socket
configure: create, to generate config.h
log: add die function
exec: add execzp()
Extract vsockserver-socketbinder and vsockserverd

.gitignore | 7 +-
Makefile | 33 --------
Makefile.in | 47 +++++++++++
configure | 49 ++++++++++++
exec.c | 22 +++++
exec.h | 7 ++
log.c | 10 +++
log.h | 8 +-
vsock.c | 32 ++++++--
vsock.h | 14 +++-
vsockserver-socketbinder.c | 86 ++++++++++++++++++++
vsockserver.c | 137 +++++++++++++++-----------------
vsockserver.c => vsockserverd.c | 73 +++++++++--------
13 files changed, 368 insertions(+), 157 deletions(-)
delete mode 100644 Makefile
create mode 100644 Makefile.in
create mode 100755 configure
create mode 100644 exec.c
create mode 100644 exec.h
create mode 100644 vsockserver-socketbinder.c
copy vsockserver.c => vsockserverd.c (55%)

--
2.30.0