python command detection fails

Bug #1897961 reported by Dan Streetman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sshuttle (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Medium
Dan Streetman

Bug Description

[impact]

bug 1592853 patches python command detection but is an incomplete backport, resulting in failure to correctly detect the python command, which causes sshuttle to fail if --python is not provided.

[test case]

run sshuttle without --python to any remote system:

root@lp1896299-x:~# sshuttle -r lp1896299-x.lxd 1.2.3.4/24
Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 9, in <module>
    load_entry_point('sshuttle==0.76', 'console_scripts', 'sshuttle')()
  File "/usr/lib/python3/dist-packages/sshuttle/cmdline.py", line 226, in main
    opt.daemon, opt.pidfile)
  File "/usr/lib/python3/dist-packages/sshuttle/client.py", line 701, in main
    seed_hosts, auto_nets, daemon)
  File "/usr/lib/python3/dist-packages/sshuttle/client.py", line 408, in _main
    options=dict(latency_control=latency_control))
  File "/usr/lib/python3/dist-packages/sshuttle/ssh.py", line 112, in connect
    "exec \"$P\" -c %s") % quote(pyscript)
NameError: name 'quote' is not defined

[regression potential]

regressions would likely cause the initial connection to fail

[scope]

this is needed only for x

the backport missed upstream commit 3541e4bd which was included first in v0.78.0 so this is fixed already in b and later.

Dan Streetman (ddstreet)
Changed in sshuttle (Ubuntu):
status: New → Fix Released
Changed in sshuttle (Ubuntu Xenial):
assignee: nobody → Dan Streetman (ddstreet)
importance: Undecided → Medium
status: New → In Progress
Dan Streetman (ddstreet)
description: updated
Dan Streetman (ddstreet)
description: updated
tags: added: regression-proposed
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted sshuttle into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sshuttle/0.76-1ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sshuttle (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Dan Streetman (ddstreet) wrote :

root@sshuttle-x:~# dpkg -l | grep sshuttle
ii sshuttle 0.76-1ubuntu1.1 all Transparent proxy server for VPN over SSH
root@sshuttle-x:~# sshuttle -r sshuttle-x.lxd 1.2.3.4/24
Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 9, in <module>
    load_entry_point('sshuttle==0.76', 'console_scripts', 'sshuttle')()
  File "/usr/lib/python3/dist-packages/sshuttle/cmdline.py", line 226, in main
    opt.daemon, opt.pidfile)
  File "/usr/lib/python3/dist-packages/sshuttle/client.py", line 701, in main
    seed_hosts, auto_nets, daemon)
  File "/usr/lib/python3/dist-packages/sshuttle/client.py", line 408, in _main
    options=dict(latency_control=latency_control))
  File "/usr/lib/python3/dist-packages/sshuttle/ssh.py", line 112, in connect
    "exec \"$P\" -c %s") % quote(pyscript)
NameError: name 'quote' is not defined

root@sshuttle-x:~# dpkg -l | grep sshuttle
ii sshuttle 0.76-1ubuntu1.2 all Transparent proxy server for VPN over SSH
root@sshuttle-x:~# sshuttle -r sshuttle-x.lxd 1.2.3.4/24
client: Connected.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sshuttle - 0.76-1ubuntu1.2

---------------
sshuttle (0.76-1ubuntu1.2) xenial; urgency=medium

  * d/p/lp1897987-Backward-compatibility-with-Python-2.4-server.patch:
    - Fix compatibility with remote py3.4 (LP: #1897987)
  * d/p/lp1897961-Fix-shell-quoting.patch:
    - Add missing import needed by previous commit backport
      (LP: #1897961)

sshuttle (0.76-1ubuntu1.1) xenial; urgency=medium

  [ Dan Streetman ]
  * d/p/lp1896299/0001-Add-support-for-iproute2.patch,
    d/p/lp1896299/0002-Small-refactoring-of-netstat-iproute-parsing.patch,
    d/p/lp1896299/0003-Backward-compatibility-with-Python-2.4-server.patch:
    - allow connecting to remote without netstat (LP: #1896299)
  * d/p/lp1592853-Use-versions-of-python3-greater-than-3.5-when-availa.patch:
    - detect if remote python is 'python' or 'python3' (LP: #1592853)
  * d/p/lp1873368/0001-Don-t-crash-if-we-can-t-look-up-peername.patch,
    d/p/lp1873368/0002-allow-Mux-flush-fill-to-work-with-python-3.5.patch,
    d/p/lp1873368/0003-Fix-python2-server-compatibility.patch:
    - fix interoperability with remote py2 and/or py3
      (same bug as below)

  [ Felipe Reyes ]
  * d/p/0001-compatibility-with-python38.patch:
    Backport patch to make sshuttle compatible
    with python-3.8. (LP: #1873368). Closes: #953621.

 -- Dan Streetman <email address hidden> Wed, 30 Sep 2020 20:34:45 -0400

Changed in sshuttle (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for sshuttle has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.