mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
actions: Drop sudo based privileged actions
Tests: - /usr/share/plinth/actions/actions is not installed. - Code check works on plinth directory and container script only - Provisioning a container does not add sudo configuration for actions. 'fbx' user can perform 'sudo' operations. - Make install does not install actions based sudo configuration. Admin users can perform sudo operations. - Exporting backup archive works. Validating a transmission directory works. Some of the privileged operations works. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
1 parent
a580437de2
commit
7b2acf247e
5 files changed
+9
-225
No files matched your search
@@ -927,11 +927,7 @@ def _setup_users(image_file: pathlib.Path):
|
||||
str(gid), 'plinth'], stdout=subprocess.DEVNULL)
|
||||
|
||||
logger.info('In image: Setting up sudo for users "fbx" and "plinth"')
|
||||
sudo_config = 'Cmnd_Alias FREEDOMBOX_ACTION_DEV = /usr/share/plinth/' \
|
||||
'actions/actions, /freedombox/actions/actions\n' \
|
||||
'Defaults!FREEDOMBOX_ACTION_DEV closefrom_override\n' \
|
||||
'plinth ALL=(ALL:ALL) NOPASSWD:SETENV : FREEDOMBOX_ACTION_DEV\n' \
|
||||
'fbx ALL=(ALL:ALL) NOPASSWD : ALL\n'
|
||||
sudo_config = 'fbx ALL=(ALL:ALL) NOPASSWD : ALL\n'
|
||||
_runc(image_file, ['tee', '/etc/sudoers.d/01-freedombox-development'],
|
||||
input=sudo_config.encode(), stdout=subprocess.DEVNULL)
|
||||
|
||||
|
||||
Reference in new issue
Block a user