bugzilla-daemon at bugzilla.mindrot.org
2008-Mar-17 16:25 UTC
[Bug 1448] New: Report wrong command-line options
https://bugzilla.mindrot.org/show_bug.cgi?id=1448
Summary: Report wrong command-line options
Classification: Unclassified
Product: Portable OpenSSH
Version: 4.6p1
Platform: Other
OS/Version: Linux
Status: NEW
Keywords: low-hanging-fruit
Severity: normal
Priority: P2
Component: scp
AssignedTo: bitbucket at mindrot.org
ReportedBy: bonniot at gmail.com
It seems that currently scp just silently ignores command-line options
that it does not understand. That is surprising and possibly dangerous
or damageable (since once will expect the option to have been taken
into account).
It seems pretty standard for a tool to fail on unknown options, but
since that might break existing scripts, maybe starting with reporting
a warning would be the best compromise.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-03 18:59 UTC
[Bug 1448] Report wrong command-line options
https://bugzilla.mindrot.org/show_bug.cgi?id=1448 --- Comment #1 from bonniot at gmail.com 2008-11-04 05:59:56 --- To clarify, this is the case with long options (starting with --...). Example: touch a; scp --foobarbaz a b does not report any error or warning. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2012-Mar-09 00:33 UTC
[Bug 1448] Report wrong command-line options
https://bugzilla.mindrot.org/show_bug.cgi?id=1448
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #2 from Damien Miller <djm at mindrot.org> 2012-03-09 11:33:49
EST ---
scp does report unknown options:
$ scp -X a: b:
scp: illegal option -- X
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i
identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
It also reports --options options on OpenBSD:
$ scp --blah a: b:
scp: illegal option -- -
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i
identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
I think what is happening that GNU getopt is swallowing the long
options before scp sees them. There isn't much scp could do here except
perhaps avoid the system getopt() for its own and I don't think this is
worth it.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2012-Mar-12 08:58 UTC
[Bug 1448] Report wrong command-line options
https://bugzilla.mindrot.org/show_bug.cgi?id=1448
bonniot at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |
--- Comment #3 from bonniot at gmail.com 2012-03-12 19:58:51 EST ---
I don't know scp interracts with getopt. But it seems to me that either
getopt offers a way to know that that long option was given, and scp
could fail/warn if it does not know the option. Or getopt does not
allow that, and a bug report/feature request is in order.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
Maybe Matching Threads
- [Bug 1448] Report wrong command-line options
- [PATCH] supporting a remote scp path option in scp
- [Bug 1576] New: ssh-add doesn't have --help or --version options
- [PATCH 0/4] p2v: Send ping packets, document timeout problems.
- scp host1:file1 host2:file2 -> Permission denied??????