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

This commit is contained in:
Viktor Liu
2026-08-26 03:15:16 +09:00
committed by GitHub
parent 15fff4c164
commit ccf8f43cb1
57 changed files with 4075 additions and 523 deletions

View File

@@ -9,6 +9,8 @@ import (
"strings"
log "github.com/sirupsen/logrus"
"github.com/netbirdio/netbird/client/internal/getent"
)
var (
@@ -18,8 +20,8 @@ var (
// Dependency injection variables for testing - allows mocking dynamic runtime checks
var (
getCurrentUser = currentUserWithGetent
lookupUser = lookupWithGetent
getCurrentUser = getent.CurrentUser
lookupUser = getent.LookupUser
getCurrentOS = func() string { return runtime.GOOS }
getIsProcessPrivileged = isCurrentProcessPrivileged