build: root -> share.

This commit is contained in:
Alexandre Pujol 2024-10-11 22:31:06 +01:00
parent 116272b8ad
commit ebdeef152c
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
7 changed files with 6 additions and 5 deletions

View file

@ -0,0 +1,25 @@
#compdef aa-log
#autoload
_aa-log() {
local IFS=$'\n'
_arguments : \
{-f,--file}'[set a logfile or a suffix to the default log file]:FILE:__aa_files' \
{-s,--systemd}'[parse systemd logs from journalctl]' \
{-r,--rules}'[convert the log into AppArmor rules]' \
{-R,--raw}'[print the raw log without any formatting]' \
{-h,--help}'[display help information]'
_values -C 'profile names' ${$(__aa_profiles):-""}
}
__aa_files() {
find /var/log/audit/ -type f -printf '%P\n' | cut -d '.' -f 3
_files
}
__aa_profiles() {
find -L /etc/apparmor.d -maxdepth 1 -type f -printf '%P\n' | sort
}
_aa-log