mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
searx: Ensure that socket is only reachable by Apache and root
When the security access restrictions are removed from /etc/security/access.d, we don't want users to bypass Apache access control and directly access the app. Tests: - Without the patch, the uwsgi socket file is with permissions 666 in /run/uwsgi/apps/searx/socket. nc -U <socket> succeeds as non-admin user on the system. - Apply the patch and restart FreedomBox. searx set is run and uwsgi service is restarted and permissions are 660 on /run/uwsgi/apps/searx/socket. nc -U <socket> fails as non-admin user on the system. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
39aac9228b
commit
a8400d07a6
@ -28,7 +28,7 @@ class SearxApp(app_module.App):
|
|||||||
|
|
||||||
app_id = 'searx'
|
app_id = 'searx'
|
||||||
|
|
||||||
_version = 4
|
_version = 5
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Create components for the app."""
|
"""Create components for the app."""
|
||||||
|
|||||||
@ -44,6 +44,8 @@ def _update_uwsgi_configuration():
|
|||||||
aug.load()
|
aug.load()
|
||||||
aug.set('/files/etc/uwsgi/apps-available/searx.ini/uwsgi/autoload',
|
aug.set('/files/etc/uwsgi/apps-available/searx.ini/uwsgi/autoload',
|
||||||
'false')
|
'false')
|
||||||
|
aug.set('/files/etc/uwsgi/apps-available/searx.ini/uwsgi/chmod-socket',
|
||||||
|
'660')
|
||||||
aug.save()
|
aug.save()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user