Skip to content

Commit 58b8e82

Browse files
AdrianDCCaptainThrowback
authored andcommitted
busybox: libarchive: Fix matchpathcon_init use of libselinux
* Provide the /file_contexts path to libselinux * Avoids a SIGSEGV upon cpio extraction due to a NULL file_contexts input, which fails down the layers of libselinux upon strdup of the path Change-Id: Ic8a8e8a461c0433144af15d48d2ce7299be84152 Signed-off-by: Adrian DC <[email protected]>
1 parent 70e5dd9 commit 58b8e82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

archival/libarchive/data_extract_all.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
1515
#if ENABLE_FEATURE_TAR_SELINUX
1616
char *sctx = archive_handle->tar__sctx[PAX_NEXT_FILE];
1717
#ifdef __BIONIC__
18-
matchpathcon_init(NULL);
18+
matchpathcon_init("/file_contexts");
1919
#endif
2020
if (!sctx)
2121
sctx = archive_handle->tar__sctx[PAX_GLOBAL];

0 commit comments

Comments
 (0)