Skip to content
Permalink
Browse files

selinux: Update to latest

Update the selinux package to the latest available.  Moves selinux
from pkg/selinux to vendor/github.com/opencontainers/selinux.

Fixes 'make unit-check' errors like these when a directory named
'/sys/fs/selinux' exists, but selinux is not enabled:

  --- FAIL: TestSetfilecon (0.00s)
        selinux_test.go: Setfilecon failed
        selinux_test.go: operation not supported

Signed-off-by: Geoff Levand <geoff@infradead.org>
  • Loading branch information...
glevand committed Oct 26, 2017
1 parent 2ee9247 commit 27a8e231524b1471ed0a43136e01ee5471bd7761
@@ -20,7 +20,7 @@ import (
"syscall"

"github.com/hashicorp/errwrap"
"github.com/rkt/rkt/pkg/label"
"github.com/opencontainers/selinux/go-selinux/label"
)

// sanitizer defines a string translator used to escape colon and comma

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -174,6 +174,11 @@ import:
version: e5c918b80c17694cbc49aab32a759f9a40067f5d
- package: github.com/kr/pty
version: f7ee69f31298ecbe5d2b349c711e2547a617d398
- package: github.com/opencontainers/selinux
version: 4a2974bf1ee960774ffd517717f1f45325af0206
subpackages:
- go-selinux
- go-selinux/label
- package: github.com/pborman/uuid
version: v1.1
- package: github.com/peterbourgon/diskv

This file was deleted.

Oops, something went wrong.
@@ -30,10 +30,10 @@ import (
"github.com/appc/spec/schema"
"github.com/appc/spec/schema/types"
"github.com/hashicorp/errwrap"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pborman/uuid"
"github.com/rkt/rkt/common"
"github.com/rkt/rkt/networking/netinfo"
"github.com/rkt/rkt/pkg/label"
"github.com/rkt/rkt/pkg/lock"
"github.com/rkt/rkt/pkg/sys"
)
@@ -414,8 +414,7 @@ func (p *Pod) ToRun() error {
if err := p.ExclusiveLock(); err != nil {
return err
}

label.Relabel(p.Path(), p.MountLabel, "Z")
label.Relabel(p.Path(), p.MountLabel, false)
if err := os.Rename(p.Path(), p.runPath()); err != nil {
// TODO(vc): we could race here with a concurrent ToRun(), let caller deal with the error.
return err
Oops, something went wrong.

0 comments on commit 27a8e23

Please sign in to comment.
You can’t perform that action at this time.