Documentation ¶
Index ¶
- func CanControl(username string) bool
- func Dir(path string) string
- func GetIDs(username string) (uid, gid int, gids []int, err error)
- func IsSuperuser() bool
- func JoinSlash(elem ...string) string
- func ReadPasswordFile(path string) string
- func ReadPasswordPrompt(prompt ...string) string
- func SetUser(cmd *exec.Cmd, username string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanControl ¶
check if the current user can do "something" with the selected component
just check if running as root or if a username is specified in the config that the current user matches.
this does not however change the user to match anything, so starting a process still requires a seteuid type change
func IsSuperuser ¶
func IsSuperuser() bool
func JoinSlash ¶
JoinSlash returns a file path joined but with slashes (to support Windows looking for remote paths on Linux)
func ReadPasswordFile ¶
func ReadPasswordPrompt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.