mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-30 02:00:19 +00:00
c4f79d455f
As kubernetes 1.24.0 is released, updating kubernetes dependencies to 1.24.0 updates: #3086 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
22 lines
396 B
Go
22 lines
396 B
Go
// +build linux,!go1.16
|
|
|
|
package selinux
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
|
|
"github.com/opencontainers/selinux/pkg/pwalk"
|
|
)
|
|
|
|
func rchcon(fpath, label string) error {
|
|
return pwalk.Walk(fpath, func(p string, _ os.FileInfo, _ error) error {
|
|
e := setFileLabel(p, label)
|
|
// Walk a file tree can race with removal, so ignore ENOENT.
|
|
if errors.Is(e, os.ErrNotExist) {
|
|
return nil
|
|
}
|
|
return e
|
|
})
|
|
}
|