libtar: don't set parent dir's context when extracting a file
Change-Id: I83e11b0119c47cb691d4e05ac1e5515aeafbdc87 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
This commit is contained in:
@@ -164,9 +164,6 @@ tar_extract_file(TAR *t, char *realname, char *prefix)
|
||||
if (lsetfilecon(realname, t->th_buf.selinux_context) < 0) {
|
||||
fprintf(stderr, "Failed to restore SELinux context %s!\n", strerror(errno));
|
||||
}
|
||||
if (lsetfilecon(dirname(realname), t->th_buf.selinux_context) < 0) {
|
||||
fprintf(stderr, "Failed to restore SELinux context %s!\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user