summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/epsocket/provider.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-09-26 15:07:59 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-26 15:09:20 -0700
commit543492650dd528c1d837d788dcd3b5138e8dc1c0 (patch)
tree16d362aea43c130ea59d802923752caedf8dbb8a /pkg/sentry/socket/epsocket/provider.go
parent3221e8372cbd41bbe74d0bef82519de6e2852e13 (diff)
Make raw socket tests pass in environments with or without CAP_NET_RAW.
PiperOrigin-RevId: 271442321
Diffstat (limited to 'pkg/sentry/socket/epsocket/provider.go')
-rw-r--r--pkg/sentry/socket/epsocket/provider.go2
1 files changed, 1 insertions, 1 deletions
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 {