gvisor/test/uds
Nicolas Lacasse d5002c6adc Allow creating unix domain sockets on the host, behind a flag.
When enabled with `AllowUDS`, unix domain sockets can be created in the sandbox
and bound on the host filesystem. The application can listen() and accept() on
these sockets as usual. Accept'ed sockets will be donated to the sandbox,
similar to how connect'ed sockets work.

In order to make notifications like poll work, the gofer donates the host-bound
socket FD to the sandbox, but the seccomp filters will (correctly) prevent the
sandbox from calling listen and accept directly on that FD. Instead, listen and
accept calls must go through the gofer. The donated host FD can should only be
used to poll for new incoming connectins.

Note that I changed the order of some of the Lisa RPCs in order to group Bind
with the existing similar Connect method. This changes the RPC numbers in a
backwards-incompatible way, but since nobody is using Lisa yet we are OK. It's
better to make these cleanup changes now before we have users and are locked
in.

PiperOrigin-RevId: 447236441
2022-05-07 18:27:18 -07:00
..
BUILD [op] Replace syscall package usage with golang.org/x/sys/unix in test/. 2021-03-06 09:54:09 -08:00
uds.go Allow creating unix domain sockets on the host, behind a flag. 2022-05-07 18:27:18 -07:00