mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-27 01:51:30 +02:00
17 lines
405 B
Go
17 lines
405 B
Go
//go:build darwin
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
// isProcessPrivileged reports whether the current process runs as root.
|
|
func isProcessPrivileged() bool { return os.Geteuid() == 0 }
|
|
|
|
// TODO(ssh-elevation): implement the osascript admin prompt.
|
|
func runElevated(_ string, _ []string) error {
|
|
return fmt.Errorf("automatic privilege elevation is not yet implemented on macOS, re-run with sudo")
|
|
}
|