summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-23 00:54:53 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-23 00:54:53 +0000
commit51a2b731236faedefa999f6d7ff158cfbe0fba8b (patch)
treef3944419852a767526666d1d9f1e2189a9f212e3 /runsc/cmd
parentdd8e417e4265c358fd603a57cc03bb4902116ecf (diff)
parent0c586946ea26610b87c4ff7bda783a5a9ca11ec0 (diff)
Merge release-20200323.0-215-g0c58694 (automated)
Diffstat (limited to 'runsc/cmd')
-rw-r--r--runsc/cmd/boot.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/runsc/cmd/boot.go b/runsc/cmd/boot.go
index 0938944a6..4c2ac6ff0 100644
--- a/runsc/cmd/boot.go
+++ b/runsc/cmd/boot.go
@@ -25,8 +25,8 @@ import (
specs "github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/log"
+ "gvisor.dev/gvisor/pkg/sentry/platform"
"gvisor.dev/gvisor/runsc/boot"
- "gvisor.dev/gvisor/runsc/boot/platforms"
"gvisor.dev/gvisor/runsc/flag"
"gvisor.dev/gvisor/runsc/specutils"
)
@@ -183,7 +183,12 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
if caps == nil {
caps = &specs.LinuxCapabilities{}
}
- if conf.Platform == platforms.Ptrace {
+
+ gPlatform, err := platform.Lookup(conf.Platform)
+ if err != nil {
+ Fatalf("loading platform: %v", err)
+ }
+ if gPlatform.Requirements().RequiresCapSysPtrace {
// Ptrace platform requires extra capabilities.
const c = "CAP_SYS_PTRACE"
caps.Bounding = append(caps.Bounding, c)