Help us shape the future of Go! Take the 2026 Go Developer Survey

apparmor

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package apparmor provides AppArmor profile management.

Index

Constants

View Source
const DefaultProfileTemplate = `` /* 1840-byte string literal not displayed */

DefaultProfileTemplate is the default Doki AppArmor profile template. AE9: Restricts file access, network, capabilities, and mounts.

Variables

This section is empty.

Functions

func IsAppArmorAvailable

func IsAppArmorAvailable() bool

IsAppArmorAvailable checks specifically for AppArmor (not SELinux).

func IsEnabled

func IsEnabled() bool

IsEnabled checks if AppArmor is available on the system.

func IsSELinuxAvailable

func IsSELinuxAvailable() bool

IsSELinuxAvailable checks if SELinux is available (Android fallback).

func LoadProfile

func LoadProfile(profile *Profile) error

LoadProfile loads an AppArmor profile into the kernel.

func UnloadProfile

func UnloadProfile(name string) error

UnloadProfile removes an AppArmor profile from the kernel.

Types

type Profile

type Profile struct {
	Name    string
	Content string
}

Profile represents an AppArmor profile.

func NewProfile

func NewProfile(containerName string) (*Profile, error)

NewProfile creates a new AppArmor profile for a container.

Jump to

Keyboard shortcuts

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