summaryrefslogtreecommitdiffstats
path: root/bin/cp
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-06-05 08:50:39 +0000
committertrasz <trasz@FreeBSD.org>2010-06-05 08:50:39 +0000
commit0bb05a5f0f0a755e886190a45ec1c2d9164f9a2d (patch)
treee13436fa40f524f90f3e12d6f7097e0706aa9e0b /bin/cp
parent0f3a1006c261164953bc6a55848fbd55cb4d6a77 (diff)
downloadFreeBSD-src-0bb05a5f0f0a755e886190a45ec1c2d9164f9a2d.zip
FreeBSD-src-0bb05a5f0f0a755e886190a45ec1c2d9164f9a2d.tar.gz
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
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/cp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 0ae57eb..86dbb3c 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -466,6 +466,7 @@ copy(char *argv[], enum op type, int fts_options)
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))
OpenPOWER on IntegriCloud