mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-03-13 10:26:06 +00:00
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
14 lines
399 B
Go
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 {
|
|
LoggerFromCtx(ctx).Debug().Msg("username discovery not implemented for this platform")
|
|
return "unknown"
|
|
}
|