mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 02:31:18 -08:00
12 lines
277 B
Go
12 lines
277 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !windows
|
|
|
|
package tstest
|
|
|
|
import "os"
|
|
|
|
// hasSuperuserPrivileges reports whether the current process runs as root.
|
|
func hasSuperuserPrivileges() bool { return os.Getuid() == 0 }
|