[teleport-update] Fix SELinux warning and error breaking teleport-update remove (#59977)

* Fix selinux warning

* Update selinux_linux.go
This commit is contained in:
Stephen Levine
2025-10-06 22:35:19 +00:00
committed by GitHub
parent cc53b695c7
commit 14c0da1bfb
+4
View File
@@ -22,6 +22,7 @@ import (
"bytes"
"context"
_ "embed"
"errors"
"log/slog"
"os"
"path/filepath"
@@ -226,6 +227,9 @@ func diagnoseWrongDomain(procCtx *selinuxContext, logger *slog.Logger) error {
// ModuleInstalled returns true if the SSH SELinux module is installed.
func ModuleInstalled() (bool, error) {
selinuxType, err := readConfig(selinuxTypeTag)
if errors.Is(err, os.ErrNotExist) {
return false, nil
}
if err != nil {
return false, trace.Wrap(err, "failed to find SELinux type")
}