summaryrefslogtreecommitdiffstats
path: root/libtar/extract.c
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-10-23 21:28:57 +0200
committerGerrit Code Review <gerrit2@build1>2013-10-23 21:28:57 +0200
commit14ca0259f9dbdd8cc9a02c6adfc394126b417ea5 (patch)
tree891df97429b1c72eeba6f7b2ac4c26a997ab88b4 /libtar/extract.c
parentMerge "Remove trailing spaces on auto generated backup names" into android-4.3 (diff)
parentfix getting and setting contexts in selinux (diff)
downloadandroid_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar.gz
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar.bz2
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar.lz
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar.xz
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.tar.zst
android_bootable_recovery-14ca0259f9dbdd8cc9a02c6adfc394126b417ea5.zip
Diffstat (limited to 'libtar/extract.c')
-rw-r--r--libtar/extract.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libtar/extract.c b/libtar/extract.c
index d19ba859d..8081aa2b9 100644
--- a/libtar/extract.c
+++ b/libtar/extract.c
@@ -161,8 +161,9 @@ tar_extract_file(TAR *t, char *realname, char *prefix)
#ifdef DEBUG
printf(" Restoring SELinux context %s to file %s\n", t->th_buf.selinux_context, realname);
#endif
- if(setfilecon(realname, t->th_buf.selinux_context) < 0)
+ if (lsetfilecon(realname, t->th_buf.selinux_context) < 0) {
fprintf(stderr, "Failed to restore SELinux context %s!\n", strerror(errno));
+ }
}
#endif