jack-ullery / AppAnvil

Graphical user interface for the AppArmor security module (in-progress)
GNU General Public License v3.0
16 stars 12 forks source link

Support for modifying Snaps #46

Closed jack-ullery closed 1 year ago

jack-ullery commented 1 year ago

Previously, there would be errors when changing the confinement of an AppArmor profile for a snap. This was because these profiles are at /var/lib/snapd/apparmor/profiles, which is not the default place for AppArmor profiles.

I updated CommandCaller, to also look for profiles in this location, before attempting to change their status, and modifying the command appropriately.

Furthermore, I set the CMake script to add a few symbolic links to the /var/lib/snapd/apparmor/profiles directory, to help ensure that future calls to aa-enforce, aa-complain, etc would be successful. If I did not do this, then there would not be the subdirectory abstractions in /var/lib/snapd/apparmor/profiles, and aa-enforce would fail when attempting to change a snap profile's confinement