Write access is given anyway with the /var/{,lib,log}/** rw, rule.
Feel free to add them to the dangerous-files abstraction.
Btw, some rules in that abstraction break some apt upgrades e.g. deny /**/initramfs-tools/** w, breaks adding new files to that directory during upgrades so it’s commented out in the apt profile.
etc/initramfs-tools/hooks/apparmor can I rename to apparmor-profile-everything? Reason: the name “apparmor” might be used by some other package (apparmor?) in the future and thereby break things. apparmor-profile-everything is more unique and very very unlikely being used by anyone else in future.
How do we get rid of the init-systemd//null-/ profiles?
If you look at aa-status, you see there’s a bunch of them. These are problematic as the ptrace and signal restrictions only apply to the init-systemd profile and not the init-systemd//null-/ profiles so I get a bunch of errors.
I did add ptrace and signal rules for some of those profiles but I keep getting more errors so I want to find the cause of these profiles and fix it.
haveged.service, onion-grater.service, proc-hidepid.service and kloak.service are failing for some reason. I can’t figure out why. onion-grater, haveged and kloak even have their own apparmor profiles that should suit them.
These hats are the result of a profile in complain mode. They will accumulate, but you can clear them with a restart. Once the profile is in enforce mode, they will stop being created.
Continuing to eat my dog food since I’m the only tester. I get this harmless error whenever typing any command in the terminal. It doesn’t seem relevant to anything I do, but it is annoying and probably alarming to noobs:
sudo su
mkdir: cannot create directory '/var/cache/security-misc': Permission denied
/usr/lib/security-misc/permission-lockdown: chmod o-rwx "/home/user"
touch: cannot touch '/var/cache/security-misc/state-files/user': No such file or directory
The base abstraction isn’t needed if it’s just a few files causing errors. Just add those files to it.
I never added it as it might cause conflicts with the /usr/lib/security-misc/permission-lockdown rule in usr.lib.security-misc.permission-lockdown and the /usr/lib/security-misc/permission-lockdown rule in the base abstraction.