From 543492650dd528c1d837d788dcd3b5138e8dc1c0 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Thu, 26 Sep 2019 15:07:59 -0700 Subject: Make raw socket tests pass in environments with or without CAP_NET_RAW. PiperOrigin-RevId: 271442321 --- pkg/sentry/socket/epsocket/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry') diff --git a/pkg/sentry/socket/epsocket/provider.go b/pkg/sentry/socket/epsocket/provider.go index 421f93dc4..0a9dfa6c3 100644 --- a/pkg/sentry/socket/epsocket/provider.go +++ b/pkg/sentry/socket/epsocket/provider.go @@ -65,7 +65,7 @@ func getTransportProtocol(ctx context.Context, stype linux.SockType, protocol in // Raw sockets require CAP_NET_RAW. creds := auth.CredentialsFromContext(ctx) if !creds.HasCapability(linux.CAP_NET_RAW) { - return 0, true, syserr.ErrPermissionDenied + return 0, true, syserr.ErrNotPermitted } switch protocol { -- cgit v1.2.3