util/syspolicy/source: put EnvPolicyStore env keys in their own namespace

... all prefixed with TS_DEBUGSYSPOLICY_*.

Updates #13193
Updates #12687
Updates #13855

Change-Id: Ia8024946f53e2b3afda4456a7bb85bbcf6d12bfc
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2024-10-30 09:48:12 -07:00
committed by Brad Fitzpatrick
parent 540e4c83d0
commit f81348a16b
2 changed files with 46 additions and 41 deletions

View File

@@ -114,7 +114,7 @@ func keyToEnvVarName(key setting.Key) (string, error) {
isDigit := func(c byte) bool { return '0' <= c && c <= '9' }
words := make([]string, 0, 8)
words = append(words, "TS")
words = append(words, "TS_DEBUGSYSPOLICY")
var currentWord strings.Builder
for i := 0; i < len(key); i++ {
c := key[i]