diff options
author | trasz <trasz@FreeBSD.org> | 2010-06-05 08:50:39 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2010-06-05 08:50:39 +0000 |
commit | 0bb05a5f0f0a755e886190a45ec1c2d9164f9a2d (patch) | |
tree | e13436fa40f524f90f3e12d6f7097e0706aa9e0b /bin/cp | |
parent | 0f3a1006c261164953bc6a55848fbd55cb4d6a77 (diff) | |
download | FreeBSD-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.c | 1 |
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)) |