mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix test failure when user can't mount temp dir
PiperOrigin-RevId: 197491098 Change-Id: Ifb75bd4e4f41b84256b6d7afc4b157f6ce3839f3
This commit is contained in:
committed by
Shentubot
parent
61b0b19497
commit
ed2b86a549
@@ -434,6 +434,17 @@ func TestCapabilities(t *testing.T) {
|
||||
Type: "bind",
|
||||
})
|
||||
|
||||
// Capability below is needed to mount TempDir above in case the user doesn't
|
||||
// have access to all parents that lead to TempDir.
|
||||
caps := []string{"CAP_DAC_OVERRIDE"}
|
||||
spec.Process.Capabilities = &specs.LinuxCapabilities{
|
||||
Bounding: caps,
|
||||
Effective: caps,
|
||||
Inheritable: caps,
|
||||
Permitted: caps,
|
||||
Ambient: caps,
|
||||
}
|
||||
|
||||
rootDir, bundleDir, conf, err := setupContainer(spec)
|
||||
if err != nil {
|
||||
t.Fatalf("error setting up container: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user