jack-ullery / AppAnvil

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

Fix 'Load Profile' page #54

Closed jack-ullery closed 11 months ago

jack-ullery commented 1 year ago

Describe the bug Currently, the Load Profile page withing the Profiles tab does not work. It allows you to select a file, but that file will never actually be loaded as a profile.

Really we need to overhaul the entire page to make it more user friendly, but this bug should (hopefully) be straightforward to fix.

To Reproduce Steps to reproduce the behavior:

  1. Create or download a profile manually on your system
  2. Open AppAnvil
  3. Go to Load Profile in the Profiles tab
  4. Select a file using the File Chooser button
  5. Click Apply profile to system
  6. Observe that nothing happens

Expected behavior There should be some sort of feedback when the Apply Profile button is pressed, regardless if it was successful or not. Furthermore, the button should actually copy and enable the profile, which it doesn't for some reason.

Honestly, I think the UI for this page needs to be overhauled, but I'll save that for a separate issue.

Additional context This issue affects all distributions I tested.

Skeevert commented 11 months ago

The problem with applying selected profile file is that set_l_button_signal_handler() is never actually called with any Glib::SignalProxyProperty::SlotType. I guess that in order to make it work we have to call it with an appropriate function. I've also noted that we have ProfileModifyController, but we don't have ProfileLoadController.

jack-ullery commented 11 months ago

Thank you for diagnosing this.

Looking at the history, it seems I deleted the controller in commit de5f8b79e8433ea305ee88601ce5f0ad9947bf14. I do not remember why I did this, and will experiment with adding it back in.