Commit 2bb92cd6 authored by Ivan Shvedunov's avatar Ivan Shvedunov Committed by Brian May

Fix sudo/doas

Fixes #227
parent ae5bd28d
......@@ -198,10 +198,11 @@ class FirewallClient:
['--firewall'])
if ssyslog._p:
argvbase += ['--syslog']
argv_tries = [
['%(eb)s', '-p', '[local %(eb)s] Password: ', '/usr/bin/env',
('PYTHONPATH=%(pp)s' % {'eb': elevbin, 'pp': python_path})] +
argvbase, argvbase]
elev_prefix = [part % {'eb': elevbin, 'pp': python_path}
for part in ['%(eb)s', '-p',
'[local %(eb)s] Password: ',
'/usr/bin/env', 'PYTHONPATH=%(pp)s']]
argv_tries = [elev_prefix + argvbase, argvbase]
# we can't use stdin/stdout=subprocess.PIPE here, as we normally would,
# because stupid Linux 'su' requires that stdin be attached to a tty.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment