mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +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:
@ -440,7 +440,10 @@ func (r *Runtime) GetRootlessNetNs(new bool) (*RootlessNetNS, error) {
|
||||
// this is important, otherwise the iptables command will fail
|
||||
err = label.Relabel(runDir, "system_u:object_r:iptables_var_run_t:s0", false)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create relabel rootless-netns run directory: %w", err)
|
||||
if !errors.Is(err, unix.ENOTSUP) {
|
||||
return nil, fmt.Errorf("could not create relabel rootless-netns run directory: %w", err)
|
||||
}
|
||||
logrus.Debugf("Labeling not supported on %q", runDir)
|
||||
}
|
||||
// create systemd run directory
|
||||
err = os.MkdirAll(filepath.Join(runDir, "systemd"), 0700)
|
||||
|
Reference in New Issue
Block a user