mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
Ignore SELinux relabel on unsupported file systems
We were ignoreing relabel requests on certain unsupported file systems and not on others, this changes to consistently logrus.Debug ENOTSUP file systems. Fixes: https://github.com/containers/podman/discussions/20745 Still needs some work on the Buildah side. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
package libpod
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -146,7 +147,7 @@ func LabelVolumePath(path, mountLabel string) error {
|
||||
}
|
||||
|
||||
if err := lvpRelabel(path, mountLabel, true); err != nil {
|
||||
if err == syscall.ENOTSUP {
|
||||
if errors.Is(err, unix.ENOTSUP) {
|
||||
logrus.Debugf("Labeling not supported on %q", path)
|
||||
} else {
|
||||
return fmt.Errorf("setting selinux label for %s to %q as shared: %w", path, mountLabel, err)
|
||||
|
Reference in New Issue
Block a user