tar: fix files skipped with --strip_components not resetting selinux context
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 22 Oct 2015 11:38:09 +0000 (13:38 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 22 Oct 2015 11:38:09 +0000 (13:38 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/data_extract_all.c

index cf821c9de0deaa5f50b9eb9722dbdb6b89de7809..bd034afdca5ed795c37f32f3e2bb03d18cb8a771 100644 (file)
@@ -8,7 +8,6 @@
 
 void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
 {
-
        file_header_t *file_header = archive_handle->file_header;
        int dst_fd;
        int res;
@@ -44,7 +43,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
                        dst_name = strchr(dst_name, '/');
                        if (!dst_name || dst_name[1] == '\0') {
                                data_skip(archive_handle);
-                               return;
+                               goto ret;
                        }
                        dst_name++;
                        /*
@@ -60,7 +59,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
                                hard_link = strchr(hard_link, '/');
                                if (!hard_link || hard_link[1] == '\0') {
                                        data_skip(archive_handle);
-                                       return;
+                                       goto ret;
                                }
                                hard_link++;
                        }