2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2021-03-18 17:23:56 +00:00
|
|
|
|
2022-02-03 00:25:57 +00:00
|
|
|
//go:build !windows
|
|
|
|
|
2021-03-18 17:23:56 +00:00
|
|
|
package winutil
|
|
|
|
|
2022-11-24 22:51:19 +00:00
|
|
|
import (
|
2023-09-26 17:15:11 +00:00
|
|
|
"errors"
|
2022-11-24 22:51:19 +00:00
|
|
|
"fmt"
|
|
|
|
"os/user"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
2022-02-02 17:55:32 +00:00
|
|
|
const regBase = ``
|
2023-10-23 17:54:53 +00:00
|
|
|
const regPolicyBase = ``
|
2022-02-02 17:55:32 +00:00
|
|
|
|
2023-09-26 17:15:11 +00:00
|
|
|
var ErrNoValue = errors.New("no value because registry is unavailable on this OS")
|
2022-01-10 20:10:02 +00:00
|
|
|
|
2023-09-26 17:15:11 +00:00
|
|
|
func getPolicyString(name string) (string, error) { return "", ErrNoValue }
|
2022-01-10 20:10:02 +00:00
|
|
|
|
2023-09-26 17:15:11 +00:00
|
|
|
func getPolicyInteger(name string) (uint64, error) { return 0, ErrNoValue }
|
2021-03-18 17:23:56 +00:00
|
|
|
|
2024-04-24 05:23:48 +00:00
|
|
|
func getPolicyStringArray(name string) ([]string, error) { return nil, ErrNoValue }
|
|
|
|
|
2023-09-26 17:15:11 +00:00
|
|
|
func getRegString(name string) (string, error) { return "", ErrNoValue }
|
|
|
|
|
|
|
|
func getRegInteger(name string) (uint64, error) { return 0, ErrNoValue }
|
2021-09-28 22:29:47 +00:00
|
|
|
|
2022-02-02 17:55:32 +00:00
|
|
|
func isSIDValidPrincipal(uid string) bool { return false }
|
2022-11-24 22:51:19 +00:00
|
|
|
|
|
|
|
func lookupPseudoUser(uid string) (*user.User, error) {
|
|
|
|
return nil, fmt.Errorf("unimplemented on %v", runtime.GOOS)
|
|
|
|
}
|
2023-01-05 05:31:26 +00:00
|
|
|
|
|
|
|
func IsCurrentProcessElevated() bool { return false }
|
2023-08-17 20:47:01 +00:00
|
|
|
|
|
|
|
func registerForRestart(opts RegisterForRestartOpts) error { return nil }
|