FreeBSD Bugzilla – Attachment 176698 Details for
Bug 213255
libarchive: tar -P cannot extract hardlinks through symlinks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
libarchive.patch (text/plain), 1.71 KB, created by
Tijl Coosemans
on 2016-11-06 19:31:52 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2016-11-06 19:31:52 UTC
Size:
1.71 KB
patch
obsolete
>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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 213255
: 176698