diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-18 15:01:53 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-18 17:08:46 -0500 |
commit | 8cf929c0950e985880b268ae4c8ad08d98bc4073 (patch) | |
tree | c7cdbd76bed38d32073a91913f5fda37630ef197 /vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go | |
parent | 37002ad549fc6bd5dd7cb126433d3a9580451a70 (diff) | |
download | podman-8cf929c0950e985880b268ae4c8ad08d98bc4073.tar.gz podman-8cf929c0950e985880b268ae4c8ad08d98bc4073.tar.bz2 podman-8cf929c0950e985880b268ae4c8ad08d98bc4073.zip |
Vendor in latest opencontainers/selinux
This will now verify labels passed in by the user.
Will also prevent users from accidently relabeling their homedir.
podman run -ti -v ~/home/user:Z fedora sh
Is not a good idea.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go')
-rw-r--r-- | vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go index 99efa155a..9497acbd0 100644 --- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go +++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go @@ -115,9 +115,9 @@ func (c Context) Get() string { } // NewContext creates a new Context struct from the specified label -func NewContext(label string) Context { +func NewContext(label string) (Context, error) { c := make(Context) - return c + return c, nil } // ClearLabels clears all reserved MLS/MCS levels @@ -195,8 +195,8 @@ func Chcon(fpath string, label string, recurse bool) error { // DupSecOpt takes an SELinux process label and returns security options that // can be used to set the SELinux Type and Level for future container processes. -func DupSecOpt(src string) []string { - return nil +func DupSecOpt(src string) ([]string, error) { + return nil, nil } // DisableSecOpt returns a security opt that can be used to disable SELinux |