libcontainer: sync: cleanup synchronisation code

This includes quite a few cleanups and improvements to the way we do
synchronisation. The core behaviour is unchanged, but switching to
embedding json.RawMessage into the synchronisation structure will allow
us to do more complicated synchronisation operations in future patches.

The file descriptor passing through the synchronisation system feature
will be used as part of the idmapped-mount and bind-mount-source
features when switching that code to use the new mount API outside of
nsexec.c.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Aleksa Sarai
2023-08-08 11:33:06 +10:00
committed by Kir Kolyshkin
parent c6e7b1a8ec
commit f81ef1493d
11 changed files with 225 additions and 164 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ func (t *tty) initHostConsole() error {
}
func (t *tty) recvtty(socket *os.File) (Err error) {
f, err := utils.RecvFd(socket)
f, err := utils.RecvFile(socket)
if err != nil {
return err
}