mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
ssh: Update existing setups to add sudo group to allowed SSH groups
Tests: - On a setup with the patch, disable and re-enable the restricted users feature. sudo is not part of allowed users. Apply the patch and restart the service. SSH app will be updated and sudo is added to SSH allowed groups. - Add a fresh unprivileged user to sudo group. SSH using that user to the system. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
09d8ee1b8e
commit
4769c1c861
@ -30,7 +30,7 @@ class SSHApp(app_module.App):
|
||||
|
||||
app_id = 'ssh'
|
||||
|
||||
_version = 2
|
||||
_version = 3
|
||||
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
@ -73,6 +73,8 @@ class SSHApp(app_module.App):
|
||||
privileged.setup()
|
||||
if not old_version:
|
||||
self.enable()
|
||||
elif old_version == 2 and privileged.are_users_restricted():
|
||||
privileged.restrict_users(True)
|
||||
elif old_version == 1:
|
||||
privileged.restrict_users(True)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user