1// Copyright 2023 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package runtime
6
7// secureMode is only ever mutated in schedinit, so we don't need to worry about
8// synchronization primitives.
9var secureMode bool
10
11func initSecureMode() {
12	secureMode = !(getuid() == geteuid() && getgid() == getegid())
13}
14
15func isSecureMode() bool {
16	return secureMode
17}
18