mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
24 lines
508 B
Go
24 lines
508 B
Go
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
|
||
|
//go:build darwin || freebsd || openbsd
|
||
|
|
||
|
package permissions
|
||
|
|
||
|
import (
|
||
|
"golang.org/x/sys/unix"
|
||
|
"tailscale.com/types/logger"
|
||
|
)
|
||
|
|
||
|
func permissionsImpl(logf logger.Logf) error {
|
||
|
groups, _ := unix.Getgroups()
|
||
|
logf("uid=%s euid=%s gid=%s egid=%s groups=%s",
|
||
|
formatUserID(unix.Getuid()),
|
||
|
formatUserID(unix.Geteuid()),
|
||
|
formatGroupID(unix.Getgid()),
|
||
|
formatGroupID(unix.Getegid()),
|
||
|
formatGroups(groups),
|
||
|
)
|
||
|
return nil
|
||
|
}
|