Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sshuttle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
sshuttle
Commits
ae5bd28d
Commit
ae5bd28d
authored
May 09, 2018
by
evitalis
Committed by
Brian May
May 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add doas support for client
parent
55bd78fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
client.py
sshuttle/client.py
+9
-4
No files found.
sshuttle/client.py
View file @
ae5bd28d
...
...
@@ -184,6 +184,12 @@ class MultiListener:
class
FirewallClient
:
def
__init__
(
self
,
method_name
):
# 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
]]
+
...
...
@@ -193,10 +199,9 @@ class FirewallClient:
if
ssyslog
.
_p
:
argvbase
+=
[
'--syslog'
]
argv_tries
=
[
[
'sudo'
,
'-p'
,
'[local sudo] Password: '
,
'/usr/bin/env'
,
(
'PYTHONPATH=
%
s'
%
python_path
)]
+
argvbase
,
argvbase
]
[
'
%(eb)
s'
,
'-p'
,
'[local
%(eb)
s] Password: '
,
'/usr/bin/env'
,
(
'PYTHONPATH=
%(pp)
s'
%
{
'eb'
:
elevbin
,
'pp'
:
python_path
})]
+
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment