src/runtime/security_aix.go
raw| 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 | |
| 5 | package runtime |
| 6 | |
| 7 | // secureMode is only ever mutated in schedinit, so we don't need to worry about |
| 8 | // synchronization primitives. |
| 9 | var secureMode bool |
| 10 | |
| 11 | func initSecureMode() { |
| 12 | secureMode = !(getuid() == geteuid() && getgid() == getegid()) |
| 13 | } |
| 14 | |
| 15 | func isSecureMode() bool { |
| 16 | return secureMode |
| 17 | } |