svn commit: r208821 - head/bin/cp

Edward Tomasz Napierala trasz at FreeBSD.org
Sat Jun 5 08:50:39 UTC 2010


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))


More information about the svn-src-all mailing list