From d7d898f3ffd54bb0579d1d9f7d048f0606068ea0 Mon Sep 17 00:00:00 2001 From: juodumas Date: Tue, 5 Apr 2022 01:21:54 +0300 Subject: [PATCH] firewall log_error: handle all exceptions, allow runuser to be in /sbin (cherry picked from commit 3f20f864b374b122309dcda9d37e79b8fc227368) --- qubesagent/firewall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubesagent/firewall.py b/qubesagent/firewall.py index 952bcc1b0..94c14ab96 100755 --- a/qubesagent/firewall.py +++ b/qubesagent/firewall.py @@ -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)