Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomDirectoriesPolicies = NewPathPolicies(map[string]PathPolicy{ "/": {Deny: true}, "/etc": {}, })
CustomDirectoriesPolicies is a set of default policies for custom directories
View Source
var CustomFilesPolicies = NewPathPolicies(map[string]PathPolicy{ "/": {Deny: true}, "/etc": {}, "/root": {}, "/etc/fstab": {Deny: true}, "/etc/shadow": {Deny: true}, "/etc/passwd": {Deny: true}, "/etc/group": {Deny: true}, })
CustomFilesPolicies is a set of default policies for custom files
View Source
var MountpointPolicies = NewPathPolicies(map[string]PathPolicy{ "/": {Exact: true}, "/boot": {Exact: true}, "/var": {}, "/opt": {}, "/srv": {}, "/usr": {}, "/app": {}, "/data": {}, "/home": {}, "/tmp": {}, })
MountpointPolicies is a set of default mountpoint policies used for filesystem customizations
Functions ¶
This section is empty.
Types ¶
type PathPolicies ¶
type PathPolicies = PathTrie
func NewPathPolicies ¶
func NewPathPolicies(entries map[string]PathPolicy) *PathPolicies
Create a new PathPolicies trie from a map of path to PathPolicy
func (*PathPolicies) Check ¶
func (pol *PathPolicies) Check(fsPath string) error
Check a given path against the PathPolicies
type PathPolicy ¶
type PathTrie ¶
func NewPathTrieFromMap ¶
Construct a new trie from a map of paths to their payloads. Returns the root node of the trie.
Click to show internal directories.
Click to hide internal directories.