mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Refactor pkg/util/selinux
This commit is contained in:
@@ -18,14 +18,16 @@ limitations under the License.
|
||||
|
||||
package selinux
|
||||
|
||||
type realSelinuxContextRunner struct{}
|
||||
|
||||
func (_ *realSelinuxContextRunner) SetContext(dir, context string) error {
|
||||
// NOP
|
||||
return nil
|
||||
// SELinuxEnabled always returns false on non-linux platforms.
|
||||
func SELinuxEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ *realSelinuxContextRunner) Getfilecon(path string) (string, error) {
|
||||
// NOP
|
||||
// realSELinuxRunner is the NOP implementation of the SELinuxRunner interface.
|
||||
type realSELinuxRunner struct{}
|
||||
|
||||
var _ SELinuxRunner = &realSELinuxRunner{}
|
||||
|
||||
func (_ *realSELinuxRunner) Getfilecon(path string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user