From owner-svn-src-head@FreeBSD.ORG Sat Jun 5 08:50:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF241065672; Sat, 5 Jun 2010 08:50:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B19D8FC15; Sat, 5 Jun 2010 08:50:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o558od9j069366; Sat, 5 Jun 2010 08:50:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o558odbn069364; Sat, 5 Jun 2010 08:50:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201006050850.o558odbn069364@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 5 Jun 2010 08:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208821 - head/bin/cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jun 2010 08:50:39 -0000 Author: trasz Date: Sat Jun 5 08:50:39 2010 New Revision: 208821 URL: http://svn.freebsd.org/changeset/base/208821 Log: Don't try to copy a socket after "xxx is a socket (not copied)." message. Previously, it would either try to copy it anyway and fail (without -R), or create fifo instead of the socket (with -R). Found with: Coverity Prevent CID: 5623 MFC after: 2 weeks Modified: head/bin/cp/cp.c Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Sat Jun 5 08:44:40 2010 (r208820) +++ head/bin/cp/cp.c Sat Jun 5 08:50:39 2010 (r208821) @@ -466,6 +466,7 @@ copy(char *argv[], enum op type, int fts case S_IFSOCK: warnx("%s is a socket (not copied).", curr->fts_path); + break; case S_IFIFO: if (Rflag) { if (copy_fifo(curr->fts_statp, !dne))