Documentation
¶
Overview ¶
Psckage daemon has a few handy utility functions for server software.
Drop privileges.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotRoot = errors.New("not running as root, so can't drop privileges to specified user")
ErrorNotRoot is returned when the user doesn't have root privileges.
Functions ¶
func BreakChannel ¶
func BreakChannel() chan bool
BreakChannel generates a goroutine which waits for ctrl-C to be pressed, and returns a channel to wait on. Using it can be as simple as:
<-daemon.BreakChannel()
func DegradeToUser ¶
DegradeToUser drops down to a specific user and its primary group if run by root.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.