resolved conflicts for merge of 44f4f8a4 to jb-mr1-dev-plus-aosp
Change-Id: I66988d8e87a8110ca9ab3da19870b80bbaf06eba
This commit is contained in:
commit
20f5daa865
4 changed files with 6 additions and 32 deletions
|
|
@ -57,9 +57,7 @@ LOCAL_STATIC_LIBRARIES := \
|
||||||
libz
|
libz
|
||||||
|
|
||||||
ifneq ($(HOST_OS),windows)
|
ifneq ($(HOST_OS),windows)
|
||||||
ifeq ($(HAVE_SELINUX), true)
|
|
||||||
LOCAL_STATIC_LIBRARIES += libselinux
|
LOCAL_STATIC_LIBRARIES += libselinux
|
||||||
endif # HAVE_SELINUX
|
|
||||||
endif # HOST_OS != windows
|
endif # HOST_OS != windows
|
||||||
|
|
||||||
include $(BUILD_HOST_EXECUTABLE)
|
include $(BUILD_HOST_EXECUTABLE)
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,7 @@ TOOLS := \
|
||||||
touch \
|
touch \
|
||||||
lsof \
|
lsof \
|
||||||
du \
|
du \
|
||||||
md5
|
md5 \
|
||||||
|
|
||||||
ifeq ($(HAVE_SELINUX),true)
|
|
||||||
|
|
||||||
TOOLS += \
|
|
||||||
getenforce \
|
getenforce \
|
||||||
setenforce \
|
setenforce \
|
||||||
chcon \
|
chcon \
|
||||||
|
|
@ -71,9 +67,6 @@ TOOLS += \
|
||||||
setsebool \
|
setsebool \
|
||||||
load_policy
|
load_policy
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
||||||
TOOLS += r
|
TOOLS += r
|
||||||
endif
|
endif
|
||||||
|
|
@ -90,17 +83,13 @@ LOCAL_SRC_FILES := \
|
||||||
cp/cp.c cp/utils.c \
|
cp/cp.c cp/utils.c \
|
||||||
grep/grep.c grep/fastgrep.c grep/file.c grep/queue.c grep/util.c
|
grep/grep.c grep/fastgrep.c grep/file.c grep/queue.c grep/util.c
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := libcutils libc libusbhost
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := bionic/libc/bionic
|
LOCAL_C_INCLUDES := bionic/libc/bionic
|
||||||
|
|
||||||
ifeq ($(HAVE_SELINUX),true)
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
|
libcutils \
|
||||||
LOCAL_CFLAGS += -DHAVE_SELINUX
|
libc \
|
||||||
LOCAL_SHARED_LIBRARIES += libselinux
|
libusbhost \
|
||||||
LOCAL_C_INCLUDES += external/libselinux/include
|
libselinux
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
LOCAL_MODULE := toolbox
|
LOCAL_MODULE := toolbox
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
#include <selinux/selinux.h>
|
#include <selinux/selinux.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
static void print_uid(uid_t uid)
|
static void print_uid(uid_t uid)
|
||||||
{
|
{
|
||||||
|
|
@ -34,9 +31,7 @@ int id_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
gid_t list[64];
|
gid_t list[64];
|
||||||
int n, max;
|
int n, max;
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
char *secctx;
|
char *secctx;
|
||||||
#endif
|
|
||||||
|
|
||||||
max = getgroups(64, list);
|
max = getgroups(64, list);
|
||||||
if (max < 0) max = 0;
|
if (max < 0) max = 0;
|
||||||
|
|
@ -53,12 +48,10 @@ int id_main(int argc, char **argv)
|
||||||
print_gid(list[n]);
|
print_gid(list[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
if (getcon(&secctx) == 0) {
|
if (getcon(&secctx) == 0) {
|
||||||
printf(" context=%s", secctx);
|
printf(" context=%s", secctx);
|
||||||
free(secctx);
|
free(secctx);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
#include <selinux/selinux.h>
|
#include <selinux/selinux.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -260,11 +258,7 @@ static int listfile_maclabel(const char *path, int flags)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
lgetfilecon(path, &maclabel);
|
lgetfilecon(path, &maclabel);
|
||||||
#else
|
|
||||||
maclabel = strdup("-");
|
|
||||||
#endif
|
|
||||||
if (!maclabel) {
|
if (!maclabel) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue