diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-06-30 15:23:33 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-30 15:23:33 +0000 |
commit | e75120d9b11f25bf12cf999efb0bd738eb82c662 (patch) | |
tree | 98ffaab6e1d7f7ec8f6fe179fb4cd93d06a25291 /pkg/sentry/kernel/shm/shm.go | |
parent | 5cbcccf1faa9c329ecf8e5ba420692b7fd51a7e8 (diff) | |
parent | 6ef268409620c57197b9d573e23be8cb05dbf381 (diff) |
Merge release-20210628.0-14-g6ef268409 (automated)
Diffstat (limited to 'pkg/sentry/kernel/shm/shm.go')
-rw-r--r-- | pkg/sentry/kernel/shm/shm.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/shm/shm.go b/pkg/sentry/kernel/shm/shm.go index 7a6e91004..9c66b90ef 100644 --- a/pkg/sentry/kernel/shm/shm.go +++ b/pkg/sentry/kernel/shm/shm.go @@ -170,7 +170,7 @@ func (r *Registry) FindOrCreate(ctx context.Context, pid int32, key Key, size ui // memory segment, and does not have the CAP_IPC_OWNER // capability in the user namespace that governs its IPC // namespace." - man shmget(2) - return nil, syserror.EACCES + return nil, linuxerr.EACCES } if size > shm.size { @@ -559,7 +559,7 @@ func (s *Shm) ConfigureAttach(ctx context.Context, addr hostarch.Addr, opts Atta // "The calling process does not have the required permissions for the // requested attach type, and does not have the CAP_IPC_OWNER capability // in the user namespace that governs its IPC namespace." - man shmat(2) - return memmap.MMapOpts{}, syserror.EACCES + return memmap.MMapOpts{}, linuxerr.EACCES } return memmap.MMapOpts{ Length: s.size, @@ -596,7 +596,7 @@ func (s *Shm) IPCStat(ctx context.Context) (*linux.ShmidDS, error) { // read access for shmid, and the calling process does not have the // CAP_IPC_OWNER capability in the user namespace that governs its IPC // namespace." - man shmctl(2) - return nil, syserror.EACCES + return nil, linuxerr.EACCES } var mode uint16 @@ -646,7 +646,7 @@ func (s *Shm) Set(ctx context.Context, ds *linux.ShmidDS) error { defer s.mu.Unlock() if !s.checkOwnership(ctx) { - return syserror.EPERM + return linuxerr.EPERM } creds := auth.CredentialsFromContext(ctx) |