libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1
[oweals/busybox.git] / libbb / copy_file.c
index 23c0f8320b86f19f5d1a478368843340bd1bf51b..be90066311fbb34c48e8c0def9d206db9c262068 100644 (file)
@@ -371,7 +371,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
                        int r = symlink(lpath, dest);
                        free(lpath);
                        if (r < 0) {
-                               bb_perror_msg("can't create symlink '%s'", dest);
+                               /* shared message */
+                               bb_perror_msg("can't create %slink '%s' to '%s'",
+                                       "sym", dest, lpath
+                               );
                                return -1;
                        }
                        if (flags & FILEUTILS_PRESERVE_STATUS)