diff options
author | Nick Kralevich <nnk@google.com> | 2013-09-10 20:18:24 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-10 20:18:24 +0200 |
commit | 5ae88e899836e7e3350db55ac47aee6f219cf126 (patch) | |
tree | 101111302b6c12bb2593f9910ee73a29389ef222 /minzip/DirUtil.c | |
parent | am 3b5a987c: recovery: fix use of init reboot method (diff) | |
parent | Revert "Update OTA installer to understand SELinux filesystem labels" (diff) | |
download | android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar.gz android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar.bz2 android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar.lz android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar.xz android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.tar.zst android_bootable_recovery-5ae88e899836e7e3350db55ac47aee6f219cf126.zip |
Diffstat (limited to 'minzip/DirUtil.c')
-rw-r--r-- | minzip/DirUtil.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/minzip/DirUtil.c b/minzip/DirUtil.c index c120fa3cd..8dd5da1da 100644 --- a/minzip/DirUtil.c +++ b/minzip/DirUtil.c @@ -23,7 +23,6 @@ #include <errno.h> #include <dirent.h> #include <limits.h> -#include <selinux/selinux.h> #include "DirUtil.h" @@ -238,7 +237,7 @@ dirUnlinkHierarchy(const char *path) int dirSetHierarchyPermissions(const char *path, - int uid, int gid, int dirMode, int fileMode, const char* secontext) + int uid, int gid, int dirMode, int fileMode) { struct stat st; if (lstat(path, &st)) { @@ -256,10 +255,6 @@ dirSetHierarchyPermissions(const char *path, return -1; } - if ((secontext != NULL) && lsetfilecon(path, secontext) && (errno != ENOTSUP)) { - return -1; - } - /* recurse over directory components */ if (S_ISDIR(st.st_mode)) { DIR *dir = opendir(path); @@ -276,7 +271,7 @@ dirSetHierarchyPermissions(const char *path, char dn[PATH_MAX]; snprintf(dn, sizeof(dn), "%s/%s", path, de->d_name); - if (!dirSetHierarchyPermissions(dn, uid, gid, dirMode, fileMode, secontext)) { + if (!dirSetHierarchyPermissions(dn, uid, gid, dirMode, fileMode)) { errno = 0; } else if (errno == 0) { errno = -1; |