Bug 39318

Summary: /bin/mv executes /bin/cp and /bin/rm without --
Product: Base System Reporter: Serge van den Boom <svdb>
Component: binAssignee: Tim Robbins <tjr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.5-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Serge van den Boom 2002-06-15 03:20:01 UTC
When moving a directory to another filesystem, /bin/mv executes /bin/cp
and /bin/mv, without '--', so that filenames starting with '-' are
interpreted as options to /bin/cp and /bin/mv.

How-To-Repeat: mkdir -- -v
mv -- -v /tmp  # where /tmp is on another filesystem
Comment 1 Doug Barton freebsd_committer freebsd_triage 2002-06-15 20:09:10 UTC
Responsible Changed
From-To: freebsd-bugs->tjr


This seems reasonable to me, but I'm wondering if the standards 
have anything to say about it.
Comment 2 Tim Robbins freebsd_committer freebsd_triage 2002-06-16 05:07:20 UTC
State Changed
From-To: open->patched

Patch committed to -CURRENT, I will MFC it after 7 days (if RELENG_4 has 
been unfrozen by then). Thanks for the report and patch.
Comment 3 Tim Robbins freebsd_committer freebsd_triage 2002-06-22 09:01:21 UTC
State Changed
From-To: patched->closed

Change has been MFC'd.