Files
ctrld/discover_user_others.go
Codescribe 9b2e51f53a feat: robust username detection and CI updates
Add platform-specific username detection for Control D metadata:
- macOS: directory services (dscl) with console user fallback
- Linux: systemd loginctl, utmp, /etc/passwd traversal
- Windows: WTS session enumeration, registry, token lookup
2026-03-03 14:29:58 +07:00

14 lines
399 B
Go

//go:build !windows && !linux && !darwin
package ctrld
import "context"
// DiscoverMainUser returns "unknown" for unsupported platforms.
// This is a stub implementation for platforms where username detection
// is not yet implemented.
func DiscoverMainUser(ctx context.Context) string {
ProxyLogger.Load().Debug().Msg("username discovery not implemented for this platform")
return "unknown"
}