Merge pull request #1853 from safing/feature/ui-security

UI process authentication
This commit is contained in:
Alexandr Stelnykovych
2025-04-14 10:03:24 +03:00
committed by GitHub
9 changed files with 1536 additions and 690 deletions

View File

@@ -2,6 +2,7 @@ package process
import (
"errors"
"runtime"
"sync/atomic"
"github.com/safing/portmaster/base/log"
@@ -21,7 +22,12 @@ func (pm *ProcessModule) Manager() *mgr.Manager {
}
func (pm *ProcessModule) Start() error {
file, err := pm.instance.BinaryUpdates().GetFile("portmaster")
identifier := "portmaster"
if runtime.GOOS == "windows" {
identifier += ".exe"
}
file, err := pm.instance.BinaryUpdates().GetFile(identifier)
if err != nil {
log.Errorf("process: failed to get path of ui: %s", err)
} else {

View File

@@ -72,7 +72,7 @@ type Profile struct { //nolint:maligned // not worth the effort
// Icons holds a list of icons to represent the application.
Icons []binmeta.Icon
// Deprecated: LinkedPath used to point to the executableis this
// Deprecated: LinkedPath used to point to the executables this
// profile was created for.
// Until removed, it will be added to the Fingerprints as an exact path match.
LinkedPath string // constant