summaryrefslogtreecommitdiffstats
path: root/libtar
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2014-01-06 00:13:43 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2014-02-07 01:56:25 +0100
commit6b600f964471cef977821689185db687f67d2c19 (patch)
tree37f0383b94fa5052b9c060f4078ad539bc3110a0 /libtar
parentDisable alpha blending for non-transparent bitmaps (diff)
downloadandroid_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar.gz
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar.bz2
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar.lz
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar.xz
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.tar.zst
android_bootable_recovery-6b600f964471cef977821689185db687f67d2c19.zip
Diffstat (limited to 'libtar')
-rw-r--r--libtar/extract.c5
-rw-r--r--libtar/wrapper.c6
2 files changed, 4 insertions, 7 deletions
diff --git a/libtar/extract.c b/libtar/extract.c
index 8081aa2b9..d9ab7882f 100644
--- a/libtar/extract.c
+++ b/libtar/extract.c
@@ -159,11 +159,14 @@ tar_extract_file(TAR *t, char *realname, char *prefix)
if((t->options & TAR_STORE_SELINUX) && t->th_buf.selinux_context != NULL)
{
#ifdef DEBUG
- printf(" Restoring SELinux context %s to file %s\n", t->th_buf.selinux_context, realname);
+ printf(" Restoring SELinux context %s to file %s\n", t->th_buf.selinux_context, realname);
#endif
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
diff --git a/libtar/wrapper.c b/libtar/wrapper.c
index dab7e0076..708c845b9 100644
--- a/libtar/wrapper.c
+++ b/libtar/wrapper.c
@@ -80,12 +80,6 @@ tar_extract_all(TAR *t, char *prefix)
"\"%s\")\n", buf);
#endif
printf("item name: '%s'\n", filename);
- /*
- if (strcmp(filename, "/") == 0) {
- printf("skipping /\n");
- continue;
- }
- */
if (tar_extract_file(t, buf, prefix) != 0)
return -1;
}