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
41f5b3e9
Commit
41f5b3e9
authored
Oct 17, 2018
by
AbbalYouness
Committed by
Brian May
Oct 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace path /dev/null by os.devnull
parent
c780597d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
client.py
sshuttle/client.py
+3
-3
hostwatch.py
sshuttle/hostwatch.py
+1
-1
ipfw.py
sshuttle/methods/ipfw.py
+1
-1
ssh.py
sshuttle/ssh.py
+2
-2
No files found.
sshuttle/client.py
View file @
41f5b3e9
...
...
@@ -33,7 +33,7 @@ except AttributeError:
except
ImportError
:
import
socket
_extra_fd
=
os
.
open
(
'/dev/null'
,
os
.
O_RDONLY
)
_extra_fd
=
os
.
open
(
os
.
devnull
,
os
.
O_RDONLY
)
def
got_signal
(
signum
,
frame
):
...
...
@@ -93,7 +93,7 @@ def daemonize():
# be deleted.
signal
.
signal
(
signal
.
SIGTERM
,
got_signal
)
si
=
open
(
'/dev/null'
,
'r+'
)
si
=
open
(
os
.
devnull
,
'r+'
)
os
.
dup2
(
si
.
fileno
(),
0
)
os
.
dup2
(
si
.
fileno
(),
1
)
si
.
close
()
...
...
@@ -355,7 +355,7 @@ def onaccept_tcp(listener, method, mux, handlers):
sock
,
srcip
=
listener
.
accept
()
sock
.
close
()
finally
:
_extra_fd
=
os
.
open
(
'/dev/null'
,
os
.
O_RDONLY
)
_extra_fd
=
os
.
open
(
os
.
devnull
,
os
.
O_RDONLY
)
return
else
:
raise
...
...
sshuttle/hostwatch.py
View file @
41f5b3e9
...
...
@@ -21,7 +21,7 @@ _smb_ok = True
hostnames
=
{}
queue
=
{}
try
:
null
=
open
(
'/dev/null'
,
'wb'
)
null
=
open
(
os
.
devnull
,
'wb'
)
except
IOError
:
_
,
e
=
sys
.
exc_info
()[:
2
]
log
(
'warning:
%
s
\n
'
%
e
)
...
...
sshuttle/methods/ipfw.py
View file @
41f5b3e9
...
...
@@ -105,7 +105,7 @@ def _fill_oldctls(prefix):
def
_sysctl_set
(
name
,
val
):
argv
=
[
'sysctl'
,
'-w'
,
'
%
s=
%
s'
%
(
name
,
val
)]
debug1
(
'>>
%
s
\n
'
%
' '
.
join
(
argv
))
return
ssubprocess
.
call
(
argv
,
stdout
=
open
(
'/dev/null'
,
'w'
))
return
ssubprocess
.
call
(
argv
,
stdout
=
open
(
os
.
devnull
,
'w'
))
_changedctls
=
[]
...
...
sshuttle/ssh.py
View file @
41f5b3e9
...
...
@@ -116,8 +116,8 @@ def connect(ssh_cmd, rhostport, python, stderr, options):
if
python
:
pycmd
=
"'
%
s' -c '
%
s'"
%
(
python
,
pyscript
)
else
:
pycmd
=
(
"P=python3; $P -V 2>
/dev/null
|| P=python; "
"exec
\"
$P
\"
-c
%
s"
)
%
quote
(
pyscript
)
pycmd
=
(
"P=python3; $P -V 2>
%
s
|| P=python; "
"exec
\"
$P
\"
-c
%
s"
)
%
(
os
.
devnull
,
quote
(
pyscript
)
)
pycmd
=
(
"exec /bin/sh -c
%
s"
%
quote
(
pycmd
))
argv
=
(
sshl
+
portl
+
...
...
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