Add and implement option to close unsaveable gofer-backed unix sockets

on save
This commit is contained in:
cweld510
2024-10-04 20:13:38 +00:00
parent b89f53b2ce
commit 727bc9c72a
11 changed files with 120 additions and 34 deletions
+2
View File
@@ -35,6 +35,7 @@ import (
"gvisor.dev/gvisor/pkg/sentry/pgalloc"
"gvisor.dev/gvisor/pkg/sentry/platform"
"gvisor.dev/gvisor/pkg/sentry/seccheck"
"gvisor.dev/gvisor/pkg/sentry/socket/unix/transport"
"gvisor.dev/gvisor/pkg/sentry/time"
"gvisor.dev/gvisor/pkg/sentry/usage"
"gvisor.dev/gvisor/pkg/sentry/vfs"
@@ -106,6 +107,7 @@ func Boot() (*kernel.Kernel, error) {
RootUTSNamespace: kernel.NewUTSNamespace("hostname", "domain", creds.UserNamespace),
RootIPCNamespace: kernel.NewIPCNamespace(creds.UserNamespace),
PIDNamespace: kernel.NewRootPIDNamespace(creds.UserNamespace),
UnixSocketOpts: transport.UnixSocketOpts{},
}); err != nil {
return nil, fmt.Errorf("initializing kernel: %v", err)
}