Documentation
¶
Index ¶
- Constants
- Variables
- func CheckSettingsOverRide()
- func ReapChildProcs(log *logging.Logger, callback func(int, syscall.WaitStatus)) chan os.Signal
- type AudioMode
- type BlacklistItem
- type Config
- type DNSMode
- type EnvVar
- type ExternalForwarder
- type FWRule
- type NetworkProfile
- type Profile
- type Profiles
- type SeccompConf
- type SeccompMode
- type ShutdownMode
- type VPNConf
- type WhitelistItem
- type XServerConf
Constants ¶
View Source
const OzVersion = "0.0.1"
Variables ¶
View Source
var DefaultConfigPath = "/etc/oz/oz.conf"
View Source
var DefaultEtcIncludes = []string{
"/etc/alternatives/",
"/etc/ssl/certs/",
"/etc/console-setup/",
"/etc/dbus-1/",
"/etc/default/locale",
"/etc/fonts/",
"/etc/gnome/defaults.list",
"/etc/group",
"/etc/gtk-2.0/",
"/etc/gtk-3.0/",
"/etc/host.conf",
"/etc/inputrc",
"/etc/locale.alias",
"/etc/localtime",
"/etc/magic",
"/etc/magic.mime",
"/etc/mailcap",
"/etc/mailcap.order",
"/etc/mime.types",
"/etc/passwd",
"/etc/protocols",
"/etc/pulse/",
"/etc/resolvconf/run/resolv.conf",
"/etc/services",
"/etc/shells",
"/etc/terminfo/",
"/etc/timezone",
"/etc/vconsole.conf",
"/etc/xdg/-mimeapps.list",
"/etc/xdg/user-dirs.conf",
"/etc/xdg/user-dirs.defaults",
"/etc/xpra/",
"/etc/X11/",
}
Functions ¶
func CheckSettingsOverRide ¶
func CheckSettingsOverRide()
func ReapChildProcs ¶
Types ¶
type BlacklistItem ¶
type Config ¶
type Config struct {
ProfileDir string `json:"profile_dir" desc:"Directory containing the sandbox profiles"`
ShellPath string `json:"shell_path" desc:"Path of the shell used when entering a sandbox"`
PrefixPath string `json:"prefix_path" desc:"Prefix path containing the oz executables"`
EtcPrefix string `json:"etc_prefix" desc:"Prefix for configuration files"`
SandboxPath string `json:"sandbox_path" desc:"Path of the sandboxes base"`
OpenVPNRunPath string `json:"openvpn_run_path" desc: "Path for OpenVPN run state"`
OpenVPNConfDir string `json:"openvpn_conf_dir" desc: "Path for OpenVPN conf files"`
OpenVPNGroup string `json:"openvpn_group" desc: "GID for OpenVPN process"`
RouteTableBase int `json:"route_table_base" desc: "Base for routing table"`
DivertSuffix string `` /* 127-byte string literal not displayed */
DivertPath bool `json:"divert_path" desc:"Whether the diverted executable should be moved out of the path"`
NMIgnoreFile string `json:"nm_ignore_file" desc:"Path to the NetworkManager ignore config file, disables the warning if empty"`
UseFullDev bool `json:"use_full_dev" desc:"Give sandboxes full access to devices instead of a restricted set"`
AllowRootShell bool `json:"allow_root_shell" desc:"Allow entering a sandbox shell as root"`
LogXpra bool `json:"log_xpra" desc:"Log output of Xpra"`
EnableEphemerals bool `json:"enable_ephemerals" desc:"Enable prompting to launch sandbox in ephemeral mode"`
EnvironmentVars []string `json:"environment_vars" desc:"Default environment variables passed to sandboxes"`
DefaultGroups []string `json:"default_groups" desc:"List of default group names that can be used inside the sandbox"`
EtcIncludes []string `json:"etc_includes" desc:"Elements to include in the etc directory in the sandbox"`
}
func LoadConfig ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type ExternalForwarder ¶
type NetworkProfile ¶
type NetworkProfile struct {
// One of empty, host, bridge
Nettype network.NetType `json:"type"`
// Name of the bridge to attach to
Bridge string
// VPN type
VPNConf VPNConf `json:"vpn"`
// List of Sockets we want to attach to the jail
// Applies to Nettype: bridge and empty only
Sockets []network.ProxyConfig
// Hardcoded least significant byte of the IP address
// Applies to Nettype: bridge only
IpByte uint `json:"ip_byte"`
// DNS Mode one of: pass, none, dhcp
// Applies to Nettype: bridge only
DNSMode DNSMode `json:"dns_mode"`
// Additional data for the hosts file
Hosts string
}
Sandbox network definition
type Profile ¶
type Profile struct {
// Name of this profile
Name string
// Path to binary to launch
Path string
// List of path to binaries matching this sandbox
Paths []string
// Path of the config file
ProfilePath string `json:"-"`
// Default parameters to pass to the program
DefaultParams []string `json:"default_params"`
// Pass command-line arguments
RejectUserArgs bool `json:"reject_user_args"`
// Autoshutdown the sandbox when the process exits. One of (no, yes, soft), defaults to yes
AutoShutdown ShutdownMode `json:"auto_shutdown"`
// Optional list of executable names to watch for exit in case initial command spawns and exit
Watchdog []string
// Optional wrapper binary to use when launching command (ex: tsocks)
Wrapper string
// If true launch one sandbox per instance, otherwise run all instances in same sandbox
Multi bool
// Disable mounting of sys and proc inside the sandbox
NoSysProc bool
// Disable bind mounting of default directories (etc,usr,bin,lib,lib64)
// Also disables default blacklist items (/sbin, /usr/sbin, /usr/bin/sudo)
// Normally not used
NoDefaults bool
// Allow bind mounting of files passed as arguments inside the sandbox
AllowFiles bool `json:"allow_files"`
AllowedGroups []string `json:"allowed_groups"`
// Optional directory where per-process logs will be output
LogDir string `json:"log_dir"`
// List of paths to bind mount inside jail
Whitelist []WhitelistItem
// List of paths to blacklist inside jail
Blacklist []BlacklistItem
SharedFolders []string `json:"shared_folders"`
// Optional XServer config
XServer XServerConf
// List of environment variables
Environment []EnvVar
// Networking
Networking NetworkProfile
// Firewall
Firewall []FWRule
// Seccomp
Seccomp SeccompConf
// External Forwarders
ExternalForwarders []ExternalForwarder `json:"external_forwarders"`
}
func NewDefaultProfile ¶
func NewDefaultProfile() *Profile
type SeccompConf ¶
type SeccompMode ¶
type SeccompMode string
const ( PROFILE_SECCOMP_TRAIN SeccompMode = "train" PROFILE_SECCOMP_WHITELIST SeccompMode = "whitelist" PROFILE_SECCOMP_BLACKLIST SeccompMode = "blacklist" PROFILE_SECCOMP_DISABLED SeccompMode = "disabled" )
type ShutdownMode ¶
type ShutdownMode string
const ( PROFILE_SHUTDOWN_NO ShutdownMode = "no" PROFILE_SHUTDOWN_YES ShutdownMode = "yes" )
type WhitelistItem ¶
type XServerConf ¶
type XServerConf struct {
Enabled bool
TrayIcon string `json:"tray_icon"`
WindowIcon string `json:"window_icon"`
EnableTray bool `json:"enable_tray"`
EnableNotifications bool `json:"enable_notifications"`
DisableClipboard bool `json:"disable_clipboard"`
AudioMode AudioMode `json:"audio_mode"`
PulseAudio bool `json:"pulseaudio"`
Border bool `json:"border"`
Environment []EnvVar `json:"env"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
oz-daemon
command
|
|
|
oz-init
command
|
|
|
oz-mount
command
|
|
|
oz-ovpn-route-down
command
|
|
|
oz-ovpn-route-up
command
|
|
|
oz-seccomp
command
|
|
|
oz-seccomp-tracer
command
|
|
|
oz-setup
command
|
|
|
oz-umount
command
|
|
|
+build linux,!gccgo
|
+build linux,!gccgo |
Click to show internal directories.
Click to hide internal directories.