Index: contrib/libarchive/libarchive/archive_write_disk_posix.c =================================================================== --- contrib/libarchive/libarchive/archive_write_disk_posix.c (revision 308208) +++ contrib/libarchive/libarchive/archive_write_disk_posix.c (working copy) @@ -2026,10 +2026,6 @@ create_filesystem_object(struct archive_ const char *linkname; mode_t final_mode, mode; int r; - /* these for check_symlinks_fsobj */ - char *linkname_copy; /* non-const copy of linkname */ - struct archive_string error_string; - int error_number; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -2038,27 +2034,6 @@ create_filesystem_object(struct archive_ #if !HAVE_LINK return (EPERM); #else - archive_string_init(&error_string); - linkname_copy = strdup(linkname); - if (linkname_copy == NULL) { - return (EPERM); - } - /* TODO: consider using the cleaned-up path as the link target? */ - r = cleanup_pathname_fsobj(linkname_copy, &error_number, &error_string, a->flags); - if (r != ARCHIVE_OK) { - archive_set_error(&a->archive, error_number, "%s", error_string.s); - free(linkname_copy); - /* EPERM is more appropriate than error_number for our callers */ - return (EPERM); - } - r = check_symlinks_fsobj(linkname_copy, &error_number, &error_string, a->flags); - if (r != ARCHIVE_OK) { - archive_set_error(&a->archive, error_number, "%s", error_string.s); - free(linkname_copy); - /* EPERM is more appropriate than error_number for our callers */ - return (EPERM); - } - free(linkname_copy); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries