mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 11:00:37 +08:00
[teleport-update] Fix SELinux warning and error breaking teleport-update remove (#59977)
* Fix selinux warning * Update selinux_linux.go
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user