diff options
author | Ivan Shvedunov <ishvedunov@mirantis.com> | 2018-05-13 13:00:35 +0300 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2018-05-13 20:35:18 +1000 |
commit | 2bb92cd6d421458ddb41af9a9d58a4d3cafb5014 (patch) | |
tree | 4a7565707e85ff30dc9dd2764bc556208953d0c6 /sshuttle | |
parent | ae5bd28dcfe92502551da9ae902c26d98c71ec3c (diff) |
Fix sudo/doas
Fixes #227
Diffstat (limited to 'sshuttle')
-rw-r--r-- | sshuttle/client.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sshuttle/client.py b/sshuttle/client.py index 6b16530..4422e0e 100644 --- a/sshuttle/client.py +++ b/sshuttle/client.py @@ -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. |