docs/164699: [patch] error in cp.1

Ben Kaduk kaduk at mit.edu
Thu Feb 2 00:40:08 UTC 2012


>Number:         164699
>Category:       docs
>Synopsis:       [patch] error in cp.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 02 00:40:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ben Kaduk
>Release:        9-current
>Organization:
MIT SIPB
>Environment:
FreeBSD hysteresis.mit.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #29: Thu May 12 23:38:56 EDT 2011     kaduk at hysteresis.mit.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The cp(1) man page claims that when the -p argument is given and the uid/gid cannot be preserved, "no error message is displayed and the exit value is not altered".  However, the actual behavior is that an error message *is* displayed.

I actually encountered this while using the mv(1) command across a filesystem boundary, but the existing documentation on mv(1)'s behavior in this case probably suffices.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- cp.1.orig	2012-02-01 19:35:26.000000000 -0500
+++ cp.1	2012-02-01 19:35:45.000000000 -0500
@@ -166,7 +166,7 @@
 file in the copy: modification time, access time,
 file flags, file mode, user ID, and group ID, as allowed by permissions.
 .Pp
-If the user ID and group ID cannot be preserved, no error message
+If the user ID and group ID cannot be preserved, an error message
 is displayed and the exit value is not altered.
 .Pp
 If the source file has its set-user-ID bit on and the user ID cannot


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list