mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
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
This commit is contained in:
committed by
Cuong Manh Le
parent
0a7bbb99e8
commit
023969ff6d
@@ -0,0 +1,13 @@
|
||||
//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"
|
||||
}
|
||||
Reference in New Issue
Block a user