Skip to content

Commit

Permalink
firewall log_error: handle all exceptions, allow runuser to be in /sbin
Browse files Browse the repository at this point in the history
  • Loading branch information
juodumas committed Apr 4, 2022
1 parent d450dc5 commit 3f20f86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubesagent/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ def log_error(self, msg):
['runuser', '-u', user, '--', 'notify-send', '-t', '8000',
'--icon=network-error', msg],
env={'DISPLAY': ':0',
'PATH': '/usr/sbin:/usr/bin',
'PATH': '/usr/sbin:/usr/bin:/sbin:/bin',
#dbus address is needed on fedora, but optional on debian
'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/{}/bus'.format(
uid)},
stderr=subprocess.STDOUT,
)
except subprocess.SubprocessError as e:
except Exception as e:
self.log.error(
'Failed to notify the user about: {} ({})'.format(
msg, str(e)
Expand Down

0 comments on commit 3f20f86

Please sign in to comment.