From nobody@FreeBSD.org  Thu Feb  2 00:39:07 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 38DD5106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  2 Feb 2012 00:39:07 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2884F8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  2 Feb 2012 00:39:07 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q120d6tZ071004
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 2 Feb 2012 00:39:06 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q120d6CF071003;
	Thu, 2 Feb 2012 00:39:06 GMT
	(envelope-from nobody)
Message-Id: <201202020039.q120d6CF071003@red.freebsd.org>
Date: Thu, 2 Feb 2012 00:39:06 GMT
From: Ben Kaduk <kaduk@mit.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] error in cp.1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164699
>Category:       docs
>Synopsis:       [patch] error in cp.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 02 00:40:07 UTC 2012
>Closed-Date:    Thu Feb 02 16:56:40 UTC 2012
>Last-Modified:  Thu Feb 02 16:56:40 UTC 2012
>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@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:
State-Changed-From-To: open->closed 
State-Changed-By: eadler 
State-Changed-When: Thu Feb 2 16:56:39 UTC 2012 
State-Changed-Why:  
see bin/1375 - yes really 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164699 
>Unformatted:
