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
ff70f584
Unverified
Commit
ff70f584
authored
Nov 16, 2020
by
Brian May
Committed by
GitHub
Nov 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #561 from Krout0n/fix-handling-OSError
Fix handling OSError in FirewallClient#__init__
parents
6b75d62d
5ff834bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
client.py
sshuttle/client.py
+3
-7
No files found.
sshuttle/client.py
View file @
ff70f584
...
@@ -223,7 +223,6 @@ class FirewallClient:
...
@@ -223,7 +223,6 @@ class FirewallClient:
def
setup
():
def
setup
():
# run in the child process
# run in the child process
s2
.
close
()
s2
.
close
()
e
=
None
if
os
.
getuid
()
==
0
:
if
os
.
getuid
()
==
0
:
argv_tries
=
argv_tries
[
-
1
:]
# last entry only
argv_tries
=
argv_tries
[
-
1
:]
# last entry only
for
argv
in
argv_tries
:
for
argv
in
argv_tries
:
...
@@ -232,16 +231,13 @@ class FirewallClient:
...
@@ -232,16 +231,13 @@ class FirewallClient:
sys
.
stderr
.
write
(
'[local su] '
)
sys
.
stderr
.
write
(
'[local su] '
)
self
.
p
=
ssubprocess
.
Popen
(
argv
,
stdout
=
s1
,
preexec_fn
=
setup
)
self
.
p
=
ssubprocess
.
Popen
(
argv
,
stdout
=
s1
,
preexec_fn
=
setup
)
# No env: Talking to `FirewallClient.start`, which has no i18n.
# No env: Talking to `FirewallClient.start`, which has no i18n.
e
=
None
break
break
except
OSError
:
except
OSError
as
e
:
pass
log
(
'Spawning firewall manager:
%
r
\n
'
%
argv
)
raise
Fatal
(
e
)
self
.
argv
=
argv
self
.
argv
=
argv
s1
.
close
()
s1
.
close
()
self
.
pfile
=
s2
.
makefile
(
'rwb'
)
self
.
pfile
=
s2
.
makefile
(
'rwb'
)
if
e
:
log
(
'Spawning firewall manager:
%
r
\n
'
%
self
.
argv
)
raise
Fatal
(
e
)
line
=
self
.
pfile
.
readline
()
line
=
self
.
pfile
.
readline
()
self
.
check
()
self
.
check
()
if
line
[
0
:
5
]
!=
b
'READY'
:
if
line
[
0
:
5
]
!=
b
'READY'
:
...
...
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