Documentation
¶
Overview ¶
Package groups checks the group memberships that let a user open USB serial ports and sound cards, and reports whether each reaches the places that matter: the account, the current login, and the background user manager that actually runs hamstack's services.
Index ¶
Constants ¶
const AudioGroupName = "audio"
AudioGroupName is the group that owns sound devices. A logged-in desktop session gets access through logind regardless; services running with nobody logged in need real membership.
Variables ¶
This section is empty.
Functions ¶
func ManagerGIDs ¶
ManagerGIDs returns the supplementary groups of the user's systemd service manager.
func ParseStatusGroups ¶
ParseStatusGroups reads the "Groups:" line of /proc/<pid>/status.
Types ¶
type Info ¶
type Info struct {
Name string
Exists bool
GID int
Member bool // listed for the account (/etc/group): effective at the next login
Session bool // this process has it: the current login already includes it
Manager bool // the user's service manager has it (what hamstack's services run under)
ManagerKnown bool // false when the manager could not be inspected
}
Info is one group's state for the current user.