From 0ea3be665acfb3d041e252e59d8f4d51346942c0 Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Fri, 6 Jun 2014 16:15:52 +0200 Subject: libtar: don't set parent dir's context when extracting a file Change-Id: I83e11b0119c47cb691d4e05ac1e5515aeafbdc87 Signed-off-by: Vojtech Bocek --- libtar/extract.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libtar/extract.c b/libtar/extract.c index d9ab7882f..4526c98ee 100644 --- a/libtar/extract.c +++ b/libtar/extract.c @@ -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 -- cgit v1.2.3