feat: safely control Shell Target

This commit is contained in:
proxyctl coordinator
2026-07-17 02:59:41 +08:00
parent 4e3f780eba
commit 12e857932b
15 changed files with 1552 additions and 16 deletions
+10
View File
@@ -112,6 +112,16 @@ func (systemIdentityEnvironment) LookupEnv(name string) (string, bool) {
return os.LookupEnv(name)
}
// SystemCurrentUser and SystemLookupUser expose the same injectable identity model
// to user-scoped Target configuration without duplicating OS account parsing.
func SystemCurrentUser() (UserIdentity, error) {
return systemIdentityEnvironment{}.CurrentUser()
}
func SystemLookupUser(name string) (UserIdentity, error) {
return systemIdentityEnvironment{}.LookupUser(name)
}
func ConfigPath() (string, error) {
configuration, err := ResolveConfigurationForCurrentProcess()
return configuration.Path, err