[client] Ask the OS for privileges when a guarded SSH setting is changed (#7066)

This commit is contained in:
Viktor Liu
2026-08-25 20:15:16 +02:00
committed by GitHub
parent 15fff4c164
commit ccf8f43cb1
57 changed files with 4075 additions and 523 deletions
+9
View File
@@ -8,6 +8,7 @@ import (
"flag"
"io/fs"
"log"
"os"
"runtime"
"strings"
@@ -79,6 +80,14 @@ func init() {
}
func main() {
// The one-shot that applies the settings the daemon restricts to
// root/administrator, which this binary runs itself as under the platform's
// elevation prompt. Handled before anything GUI so no window, tray or
// single-instance lock is involved.
if services.IsPrivilegedSettingsRun(os.Args[1:]) {
os.Exit(runPrivilegedSettings(os.Args[1:]))
}
daemonAddr, userSetLogFile := parseFlagsAndInitLog()
conn := NewConn(daemonAddr)