mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-01 03:29:38 +01:00
Use prompt for sudo, not needed for doas
This commit is contained in:
parent
71f2248b07
commit
a765aa3235
@ -185,12 +185,6 @@ class MultiListener:
|
||||
class FirewallClient:
|
||||
|
||||
def __init__(self, method_name, sudo_pythonpath):
|
||||
|
||||
# Default to sudo unless on OpenBSD in which case use built in `doas`
|
||||
elevbin = 'sudo'
|
||||
if platform.platform().startswith('OpenBSD'):
|
||||
elevbin = 'doas'
|
||||
|
||||
self.auto_nets = []
|
||||
python_path = os.path.dirname(os.path.dirname(__file__))
|
||||
argvbase = ([sys.executable, sys.argv[0]] +
|
||||
@ -199,9 +193,11 @@ class FirewallClient:
|
||||
['--firewall'])
|
||||
if ssyslog._p:
|
||||
argvbase += ['--syslog']
|
||||
elev_prefix = [part % {'eb': elevbin}
|
||||
for part in ['%(eb)s', '-p',
|
||||
'[local %(eb)s] Password: ']]
|
||||
# Default to sudo unless on OpenBSD in which case use built in `doas`
|
||||
if platform.platform().startswith('OpenBSD'):
|
||||
elev_prefix = ['doas']
|
||||
else:
|
||||
elev_prefix = ['sudo', '-p', '[local %(eb)s] Password: ']
|
||||
if sudo_pythonpath:
|
||||
elev_prefix += ['/usr/bin/env',
|
||||
'PYTHONPATH=%s' % python_path]
|
||||
|
Loading…
Reference in New Issue
Block a user