Documentation ¶
Overview ¶
Package security manages:
- Cache clearing (cache.go)
- Privilege manipulation (privileges.go)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropFilesystemCache ¶ added in v0.2.2
func DropFilesystemCache() error
DropFilesystemCache instructs the kernel to free the reclaimable inodes and dentries. This has the effect of making encrypted directories whose keys are not present no longer accessible. Requires root privileges.
func SetProcessPrivileges ¶ added in v0.2.4
func SetProcessPrivileges(privs *Privileges) error
SetProcessPrivileges sets the privileges of the current process to have those specified by privs. The original privileges can be obtained by first saving the output of ProcessPrivileges, calling SetProcessPrivileges with the desired privs, then calling SetProcessPrivileges with the saved privs.
Types ¶
type Privileges ¶
type Privileges struct {
// contains filtered or unexported fields
}
Privileges encapsulate the effective uid/gid and groups of a process.
func ProcessPrivileges ¶ added in v0.2.4
func ProcessPrivileges() (*Privileges, error)
ProcessPrivileges returns the process's current effective privileges.
func UserPrivileges ¶ added in v0.2.4
func UserPrivileges(user *user.User) (*Privileges, error)
UserPrivileges returns the default privileges for the specified user.