Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd74108c authored by Kenny Root's avatar Kenny Root
Browse files

resolved conflicts for merge of 78afed1c to jb-mr1-dev-plus-aosp

Change-Id: I861e3a6aa07c448909b2ae54618bba178bd6e457
parents d0d4d44d 78afed1c
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ LOCAL_STATIC_LIBRARIES := \
    libpixelflinger_static \
    libpng \
    libcutils \
    libselinux \
    libstdc++ \
    libm \
    libc
@@ -56,12 +57,6 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
    LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
endif

ifeq ($(HAVE_SELINUX), true)
  LOCAL_C_INCLUDES += external/libselinux/include
  LOCAL_STATIC_LIBRARIES += libselinux
  LOCAL_CFLAGS += -DHAVE_SELINUX
endif # HAVE_SELINUX

# This binary is in the recovery ramdisk, which is otherwise a copy of root.
# It gets copied there in config/Makefile.  LOCAL_MODULE_TAGS suppresses
# a (redundant) copy of the binary in /system/bin for user builds.
@@ -74,12 +69,6 @@ else
  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif

ifeq ($(HAVE_SELINUX),true)
  LOCAL_C_INCLUDES += external/libselinux/include
  LOCAL_STATIC_LIBRARIES += libselinux
  LOCAL_CFLAGS += -DHAVE_SELINUX
endif # HAVE_SELINUX

LOCAL_C_INCLUDES += system/extras/ext4_utils

include $(BUILD_EXECUTABLE)
+2 −6
Original line number Diff line number Diff line
@@ -8,15 +8,11 @@ LOCAL_SRC_FILES := \
	Inlines.c \
	Zip.c

LOCAL_C_INCLUDES += \
LOCAL_C_INCLUDES := \
	external/zlib \
	external/safe-iop/include

ifeq ($(HAVE_SELINUX),true)
LOCAL_C_INCLUDES += external/libselinux/include
LOCAL_STATIC_LIBRARIES += libselinux
LOCAL_CFLAGS += -DHAVE_SELINUX
endif
LOCAL_STATIC_LIBRARIES := libselinux

LOCAL_MODULE := libminzip

+0 −5
Original line number Diff line number Diff line
@@ -145,24 +145,19 @@ dirCreateHierarchy(const char *path, int mode,
        } else if (ds == DMISSING) {
            int err;

#ifdef HAVE_SELINUX
            char *secontext = NULL;

            if (sehnd) {
                selabel_lookup(sehnd, &secontext, cpath, mode);
                setfscreatecon(secontext);
            }
#endif

            err = mkdir(cpath, mode);

#ifdef HAVE_SELINUX

            if (secontext) {
                freecon(secontext);
                setfscreatecon(NULL);
            }
#endif

            if (err != 0) {
                free(cpath);
+0 −4
Original line number Diff line number Diff line
@@ -24,12 +24,8 @@
extern "C" {
#endif

#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#include <selinux/label.h>
#else
struct selabel_handle;
#endif

/* Like "mkdir -p", try to guarantee that all directories
 * specified in path are present, creating as many directories
+0 −4
Original line number Diff line number Diff line
@@ -1115,23 +1115,19 @@ bool mzExtractRecursive(const ZipArchive *pArchive,
                 * Open the target for writing.
                 */

#ifdef HAVE_SELINUX
                char *secontext = NULL;

                if (sehnd) {
                    selabel_lookup(sehnd, &secontext, targetFile, UNZIP_FILEMODE);
                    setfscreatecon(secontext);
                }
#endif

                int fd = creat(targetFile, UNZIP_FILEMODE);

#ifdef HAVE_SELINUX
                if (secontext) {
                    freecon(secontext);
                    setfscreatecon(NULL);
                }
#endif

                if (fd < 0) {
                    LOGE("Can't create target file \"%s\": %s\n",
Loading