mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
monkeysphere: Allow non-root cancel of publishing
Implement killing the publish process from within the action. Don't let the killing be too generic to avoid potential security issues. Kill process only if it appears as expected.
This commit is contained in:
1 parent
f9bea39483
commit
3454abdc43
2 files changed
+28
-1
No files matched your search
@@ -86,7 +86,8 @@ def cancel(request):
|
||||
"""Cancel ongoing process."""
|
||||
global publish_process
|
||||
if publish_process:
|
||||
publish_process.terminate()
|
||||
actions.superuser_run(
|
||||
'monkeysphere', ['host-cancel-publish', str(publish_process.pid)])
|
||||
publish_process = None
|
||||
messages.info(request, _('Cancelled key publishing.'))
|
||||
|
||||
|
||||
Reference in new issue
Block a user