mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Add correct selinux label at plugin socket directory
This commit is contained in:
committed by
Vikas Choudhary
parent
b9631a881f
commit
58d1b4d564
@@ -50,3 +50,8 @@ func (_ *realSELinuxRunner) Getfilecon(path string) (string, error) {
|
||||
}
|
||||
return selinux.FileLabel(path)
|
||||
}
|
||||
|
||||
// SetFileLabel applies the SELinux label on the path or returns an error.
|
||||
func SetFileLabel(path string, label string) error {
|
||||
return selinux.SetFileLabel(path, label)
|
||||
}
|
||||
|
||||
@@ -31,3 +31,8 @@ var _ SELinuxRunner = &realSELinuxRunner{}
|
||||
func (_ *realSELinuxRunner) Getfilecon(path string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// FileLabel returns the SELinux label for this path or returns an error.
|
||||
func SetFileLabel(path string, label string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user