syecl

package
v3.0.2-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package syecl implements the loading and management of the container execution control list feature. This code uses the TOML config file standard to extract the structured configuration for activating or disabling the list and for the implementation of the execution groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutConfig

func PutConfig(ecl EclConfig, confPath string) (err error)

PutConfig takes the content of an EclConfig struct and Marshals it to file

Types

type EclConfig

type EclConfig struct {
	Activated  bool        `toml:"activated"` // toggle the activation of the ECL rules
	ExecGroups []execgroup `toml:"execgroup"` // Slice of all execution groups
}

EclConfig describes the structure of an execution control list configuration file

func LoadConfig

func LoadConfig(confPath string) (ecl EclConfig, err error)

LoadConfig opens an ECL config file and unmarshals it into structures

func (*EclConfig) ShouldRun

func (ecl *EclConfig) ShouldRun(cpath string) (ok bool, err error)

ShouldRun determines if a container should run according to its execgroup rules

func (*EclConfig) ShouldRunFp

func (ecl *EclConfig) ShouldRunFp(fp *os.File) (ok bool, err error)

ShouldRunFp determines if an already opened container should run according to its execgroup rules

func (*EclConfig) ValidateConfig

func (ecl *EclConfig) ValidateConfig() (err error)

ValidateConfig makes sure paths from configs are fully resolved and that values from an execgroup are logically correct.

Jump to

Keyboard shortcuts

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