fst/config: allocate filesystem slice
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
6acd0d4e88
commit
a1148edd00
@ -136,11 +136,17 @@ func (s *SandboxConfig) Bwrap(os linux.System) (*bwrap.Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
conf := (&bwrap.Config{
|
conf := (&bwrap.Config{
|
||||||
Net: s.Net,
|
Net: s.Net,
|
||||||
UserNS: s.UserNS,
|
UserNS: s.UserNS,
|
||||||
Hostname: s.Hostname,
|
Hostname: s.Hostname,
|
||||||
Clearenv: true,
|
Clearenv: true,
|
||||||
SetEnv: s.Env,
|
SetEnv: s.Env,
|
||||||
|
|
||||||
|
/* this is only 4 KiB of memory on a 64-bit system,
|
||||||
|
permissive defaults on NixOS results in around 100 entries
|
||||||
|
so this capacity should eliminate copies for most setups */
|
||||||
|
Filesystem: make([]bwrap.FSBuilder, 0, 256),
|
||||||
|
|
||||||
NewSession: !s.NoNewSession,
|
NewSession: !s.NoNewSession,
|
||||||
DieWithParent: true,
|
DieWithParent: true,
|
||||||
AsInit: true,
|
AsInit: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user