From 5fcd11b568dafe4110e14f01b59e7123d4e75992 Mon Sep 17 00:00:00 2001 From: Tobias Polley Date: Thu, 17 Mar 2022 23:00:54 +0100 Subject: [PATCH] Relabel: relabel links instead of their targets Signed-off-by: Tobias Polley --- go-selinux/rchcon.go | 2 +- go-selinux/rchcon_go115.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go-selinux/rchcon.go b/go-selinux/rchcon.go index 897ecba..feb739d 100644 --- a/go-selinux/rchcon.go +++ b/go-selinux/rchcon.go @@ -12,7 +12,7 @@ import ( func rchcon(fpath, label string) error { return pwalkdir.Walk(fpath, func(p string, _ fs.DirEntry, _ error) error { - e := setFileLabel(p, label) + e := lSetFileLabel(p, label) // Walk a file tree can race with removal, so ignore ENOENT. if errors.Is(e, os.ErrNotExist) { return nil diff --git a/go-selinux/rchcon_go115.go b/go-selinux/rchcon_go115.go index 2c8b033..ecc7abf 100644 --- a/go-selinux/rchcon_go115.go +++ b/go-selinux/rchcon_go115.go @@ -11,7 +11,7 @@ import ( func rchcon(fpath, label string) error { return pwalk.Walk(fpath, func(p string, _ os.FileInfo, _ error) error { - e := setFileLabel(p, label) + e := lSetFileLabel(p, label) // Walk a file tree can race with removal, so ignore ENOENT. if errors.Is(e, os.ErrNotExist) { return nil