spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.22k stars 3.02k forks source link

AppArmor Profiles for Electrum Tarball and AppImage #9003

Closed robertmin2 closed 2 months ago

SomberNight commented 2 months ago

Could you please provide some context what this is, and how it is supposed to be used?

robertmin1 commented 2 months ago

AppArmor is a Mandatory Access Control (MAC) system which confines programs to a limited set of resources. AppArmor confinement is provided via profiles loaded into the kernel. To load/add a profile you need to copy the profile to /etc/apparmor.d e.g for our case sudo cp -R -L profiles/* /etc/apparmor.d I can add a Readme, but I wanted to get intial feedback first More info : https://ubuntu.com/tutorials/beginning-apparmor-profile-development#1-overview

SomberNight commented 2 months ago

I see. Thanks.

Is this something that an "upstream" project should provide (e.g. are these files Linux distribution agnostic)? Do you perhaps have examples of other projects that do so? In general I have no problem with including something like this. It should probably go into a more descriptively named folder, e.g. contrib/apparmor/.

robertmin1 commented 2 months ago

Debian, Ubuntu & OpenSUSE derivatives, come preconfigured with AppArmor as the default, so it should be ready to use for these It appears that Monero was in the process of adding one, but didn't complete it Also, mysql does provide a profile

SomberNight commented 2 months ago

To load/add a profile you need to copy the profile to /etc/apparmor.d e.g for our case sudo cp -R -L profiles/* /etc/apparmor.d I can add a Readme, but I wanted to get intial feedback first

Could you add a short readme file (in same folder) saying what this is and how to use/test it?

robertmin1 commented 2 months ago

Alright! Added the Readme

SomberNight commented 2 months ago

Looks good. Thanks.

robertmin1 commented 2 months ago

Thank you for the quick feedback. I'll continue testing the profiles on various OSs in the coming weeks