Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dropbear scp -o behave correctly #41

Closed
wants to merge 1 commit into from
Closed

Make dropbear scp -o behave correctly #41

wants to merge 1 commit into from

Commits on Jan 12, 2017

  1. Make dropbear scp -o behave correctly

    This bug has existed since at least 2012.  I sent mkj an Email on
    2013/02/24 that contained the fix.  Below is that Email in full (with
    an added reference to the thread in question):
    
    I found this while helping a Tomato/TomatoUSB user today:
    http://www.linksysinfo.org/index.php?threads/scp-wont-run-in-startup-script.68197/#post-223474
    
    scp's -o flag is supposed to pass the optarg (and only that) on to ssh.
    However presently it treats it the same as -c, -i, or -F, which is
    incorrect.
    
    The test case I found: "scp -oy" gets turned into "ssh -oy" when it
    should get turned into "ssh -y".
    
    Below is a patch.  I don't know if there are any security implications
    by doing this.
    
    An alternate workaround would be to add a -y flag to scp.c (i.e. treated
    the same as the existing -[1246C] flags in scp.c).
    
    Also, I must say something because this really frustrated me when trying
    to find usage syntaxes and so on (particularly that there is no scp.1
    man page or equivalent):
    
    The scp.c usage() function should really be rewritten to look more like
    printhelp().  Furthermore, there are options in scp.c which aren't
    documented (such as -d, -f, and -t, which are passed on to a server
    command as arguments when calling ssh).
    
    If you agree but don't have the time let me know and I'll gladly provide
    a patch for both printhelp() (to clean up formatting/make it look
    prettier) and for usage().
    
    I'd also suggest changing the -o description from "ssh_option" to
    "ssh_flag"; when I saw "ssh_option" I assumed that it took the same kind
    of long option names as OpenSSH (e.g. -oStrictHostKeyChecking=no).  If I
    ended up cleaning up usage() I would simply add a line at the bottom
    that explain that -o just passes on whatever flag you give it to the ssh
    client.
    
    Thank you!
    koitsu committed Jan 12, 2017
    Configuration menu
    Copy the full SHA
    57c6246 View commit details
    Browse the repository at this point in the history