Bug 6915 - Reject passing an argument to an option that doesn't take one
Summary: Reject passing an argument to an option that doesn't take one
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P3 minor (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 17:43 UTC by Matt McCutchen
Modified: 2010-08-21 16:51 UTC (History)
0 users

See Also:


Attachments
Patch for rsync's included popt (1.52 KB, patch)
2009-11-20 20:47 UTC, Matt McCutchen
no flags Details
Better patch (catch --quiet) (1.93 KB, patch)
2009-11-20 21:57 UTC, Matt McCutchen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt McCutchen 2009-11-20 17:43:51 UTC
Rsync should reject an attempt to pass an argument to a command-line option that doesn't take an argument.  For example, this incorrect attempt to disable --perms should be rejected:

$ rsync -a --perms=off ...

Currently it works just like --perms.

The above example was seen on the rsnapshot list:

http://sourceforge.net/mailarchive/message.php?msg_name=op.u3o0ozeqijpzuf%40arch.che.intra.net
Comment 1 Wayne Davison 2009-11-20 18:09:47 UTC
I'd imagine that this is a bug for the popt library.
Comment 2 Matt McCutchen 2009-11-20 20:43:36 UTC
Reported upstream:

http://rpm5.org/cvs/tktview?tn=54

But don't bother trying to comment there: their bug tracker doesn't allow non-developers to comment.  That's ridiculous.  I complained about that too:

http://rpm5.org/cvs/tktview?tn=55
Comment 3 Matt McCutchen 2009-11-20 20:47:27 UTC
Created attachment 4974 [details]
Patch for rsync's included popt

For now, here's a patch applicable to rsync's included popt.
Comment 4 Matt McCutchen 2009-11-20 21:57:23 UTC
Created attachment 4975 [details]
Better patch (catch --quiet)
Comment 5 Wayne Davison 2010-08-21 16:51:16 UTC
This is now fixed in rsync and upstream.