Options (11)
-a, --addbooleanLoad a profile into the kernel
sudo apparmor_parser {{[-a|--add]}} {{profile_file}}-r, --replacebooleanReplace an existing profile
sudo apparmor_parser {{[-r|--replace]}} {{profile_file}}-R, --removebooleanRemove a profile from the kernel
sudo apparmor_parser {{[-R|--remove]}} {{profile_name}}-C, --complainbooleanLoad a profile in complain mode (logs violations but doesn't block)
sudo apparmor_parser {{[-C|--complain]}} {{[-r|--replace]}} {{path/to/profile}}-p, --preprocessbooleanPreprocess a profile (resolve includes) and write binary cache to file
apparmor_parser {{[-p|--preprocess]}} {{[-o|--ofile]}} {{path/to/output.cache}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}-o, --ofilebooleanPreprocess a profile (resolve includes) and write binary cache to file
apparmor_parser {{[-p|--preprocess]}} {{[-o|--ofile]}} {{path/to/output.cache}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}-Q, --skip-kernel-loadbooleanPreprocess a profile (resolve includes) and write binary cache to file
apparmor_parser {{[-p|--preprocess]}} {{[-o|--ofile]}} {{path/to/output.cache}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}-S, --stdoutbooleanPreprocess and print binary profile to `stdout` without loading
apparmor_parser {{[-p|--preprocess]}} {{[-S|--stdout]}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}-T, --skip-read-cachebooleanReplace a profile while skipping cache reads
sudo apparmor_parser {{[-r|--replace]}} {{[-T|--skip-read-cache]}} {{path/to/profile}}-W, --write-cachebooleanReplace a profile, rebuild cache, and write it to a custom directory
sudo apparmor_parser {{[-r|--replace]}} {{[-W|--write-cache]}} {{[-L|--cache-loc]}} /{{path/to/cache}} {{path/to/profile}}-L, --cache-locbooleanReplace a profile, rebuild cache, and write it to a custom directory
sudo apparmor_parser {{[-r|--replace]}} {{[-W|--write-cache]}} {{[-L|--cache-loc]}} /{{path/to/cache}} {{path/to/profile}}Examples (8)
Load a profile into the kernel
sudo apparmor_parser [-a|--add] profile_fileReplace an existing profile
sudo apparmor_parser [-r|--replace] profile_fileRemove a profile from the kernel
sudo apparmor_parser [-R|--remove] profile_nameLoad a profile in complain mode (logs violations but doesn't block)
sudo apparmor_parser [-C|--complain] [-r|--replace] path/to/profilePreprocess a profile (resolve includes) and write binary cache to file
apparmor_parser [-p|--preprocess] [-o|--ofile] path/to/output.cache [-Q|--skip-kernel-load] path/to/profilePreprocess and print binary profile to `stdout` without loading
apparmor_parser [-p|--preprocess] [-S|--stdout] [-Q|--skip-kernel-load] path/to/profileReplace a profile while skipping cache reads
sudo apparmor_parser [-r|--replace] [-T|--skip-read-cache] path/to/profileReplace a profile, rebuild cache, and write it to a custom directory
sudo apparmor_parser [-r|--replace] [-W|--write-cache] [-L|--cache-loc] /path/to/cache path/to/profile