system

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCapability

func ApplyCapability(cred *syscall.Credential) error

func ChangePermission

func ChangePermission(u string, file string) (err error)

func CreateDirectory

func CreateDirectory(directoryPath string, perm os.FileMode) error

func CreateDirectoryNested

func CreateDirectoryNested(directoryPath string, perm os.FileMode) error

func CreateStateDirs

func CreateStateDirs(path string, uid int, gid int) error

func DBusTimeToUsec

func DBusTimeToUsec(prop *sdbus.Property) (time.Time, error)

func DisableKeepCapability

func DisableKeepCapability() error

func EnableKeepCapability

func EnableKeepCapability() error

func ExecAndCapture

func ExecAndCapture(cmd string, args ...string) (string, error)

func ExecAndDisplay

func ExecAndDisplay(w io.Writer, cmd string, args ...string) error

func ExecAndRenounce

func ExecAndRenounce(cmds ...string) error

func ExecAndShowProgess

func ExecAndShowProgess(cmd string, args ...string) error

func ExecInteractive

func ExecInteractive(cmd string, args ...string) error

func ExecRun

func ExecRun(cmd string, args ...string) error

func GetGroupCredentials

func GetGroupCredentials(grp string) (*user.Group, error)

func GetUserCredentials

func GetUserCredentials(usr string) (*syscall.Credential, error)

func GetUserCredentialsByUid

func GetUserCredentialsByUid(uid uint32) (*user.User, error)

func PathExists

func PathExists(path string) bool

func ReadFullFile

func ReadFullFile(path string) ([]string, error)

func ReadOneLineFile

func ReadOneLineFile(path string) (string, error)

func SwitchUser

func SwitchUser(c *syscall.Credential) (err error)

func TLSFilePathExits

func TLSFilePathExits() bool

func UnixMicro

func UnixMicro(usec int64) time.Time

func WriteFullFile

func WriteFullFile(path string, lines []string) error

func WriteOneLineFile

func WriteOneLineFile(path string, line string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL