mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-28 07:19:08 +01:00
WIP: acl interceptor and named pipe ui
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build windows
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"os/user"
|
||||
|
||||
"github.com/netbirdio/netbird/client/internal/ipcauth"
|
||||
)
|
||||
|
||||
// usernameForIdentity resolves a Windows caller's SID to its account name.
|
||||
func usernameForIdentity(id ipcauth.Identity) (string, error) {
|
||||
u, err := user.LookupId(id.SID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return u.Username, nil
|
||||
}
|
||||
Reference in New Issue
Block a user