From 294aea489af9ee61dd120cbbcc0e0864b73f2df6 Mon Sep 17 00:00:00 2001 From: "vijay.rayabarapu" <vijay.rayabarapu@codeaurora.org> Date: Fri, 31 Mar 2017 19:54:31 +0530 Subject: [PATCH] b2g: renabling selinux which was removed from earlier commit removed the patch which will remove the usage of libselinux Change-Id: Id0461768f63a9b94ea7cddba3fa5ba80cd3d1551 --- .../0001-toybox-Remove-libselinux-usage.patch | 144 ------------------ 1 file changed, 144 deletions(-) delete mode 100644 patch/all/external/toybox/0001-toybox-Remove-libselinux-usage.patch diff --git a/patch/all/external/toybox/0001-toybox-Remove-libselinux-usage.patch b/patch/all/external/toybox/0001-toybox-Remove-libselinux-usage.patch deleted file mode 100644 index 8192926..0000000 --- a/patch/all/external/toybox/0001-toybox-Remove-libselinux-usage.patch +++ /dev/null @@ -1,144 +0,0 @@ -From a1fb6728a53aada02986bc4aa1c4cd214062ff4b Mon Sep 17 00:00:00 2001 -From: Philippe Gravel <pgravel@codeaurora.org> -Date: Fri, 25 Mar 2016 14:05:34 -0700 -Subject: [PATCH] Remove libselinux usage - -Change-Id: Ic7ec64be3179288d9c6f793dc22f4bbfbe8af807 ---- - Android.mk | 12 +----------- - generated/config.h | 2 +- - generated/newtoys.h | 5 ----- - toys/posix/ls.c | 2 ++ - 4 files changed, 4 insertions(+), 17 deletions(-) - -diff --git a/Android.mk b/Android.mk -index 645da6d..1867683 100644 ---- a/Android.mk -+++ b/Android.mk -@@ -60,10 +60,6 @@ LOCAL_SRC_FILES := \ - main.c \ - toys/android/getenforce.c \ - toys/android/getprop.c \ -- toys/android/load_policy.c \ -- toys/android/restorecon.c \ -- toys/android/runcon.c \ -- toys/android/setenforce.c \ - toys/android/setprop.c \ - toys/lsb/dmesg.c \ - toys/lsb/hostname.c \ -@@ -81,7 +77,6 @@ LOCAL_SRC_FILES := \ - toys/other/blkid.c \ - toys/other/blockdev.c \ - toys/other/bzcat.c \ -- toys/other/chcon.c \ - toys/other/chroot.c \ - toys/other/clear.c \ - toys/other/dos2unix.c \ -@@ -211,7 +206,7 @@ LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"' - - LOCAL_CLANG := true - --LOCAL_SHARED_LIBRARIES := libcutils libselinux -+LOCAL_SHARED_LIBRARIES := libcutils - - LOCAL_MODULE := toybox - -@@ -228,7 +223,6 @@ ALL_TOOLS := \ - bzcat \ - cal \ - cat \ -- chcon \ - chgrp \ - chmod \ - chown \ -@@ -263,7 +257,6 @@ ALL_TOOLS := \ - inotifyd \ - insmod \ - kill \ -- load_policy \ - ln \ - logname \ - losetup \ -@@ -294,15 +287,12 @@ ALL_TOOLS := \ - pwd \ - readlink \ - realpath \ -- restorecon \ - rm \ - rmdir \ - rmmod \ - route \ -- runcon \ - sed \ - seq \ -- setenforce \ - setprop \ - setsid \ - sha1sum \ -diff --git a/generated/config.h b/generated/config.h -index cc1ac50..0e7a893 100644 ---- a/generated/config.h -+++ b/generated/config.h -@@ -520,7 +520,7 @@ - #define USE_TOYBOX_SUID(...) __VA_ARGS__ - #define CFG_TOYBOX_LSM_NONE 0 - #define USE_TOYBOX_LSM_NONE(...) --#define CFG_TOYBOX_SELINUX 1 -+#define CFG_TOYBOX_SELINUX 0 - #define USE_TOYBOX_SELINUX(...) __VA_ARGS__ - #define CFG_TOYBOX_SMACK 0 - #define USE_TOYBOX_SMACK(...) -diff --git a/generated/newtoys.h b/generated/newtoys.h -index ebc449d..2089025 100644 ---- a/generated/newtoys.h -+++ b/generated/newtoys.h -@@ -17,7 +17,6 @@ USE_CAT(NEWTOY(cat, "u"USE_CAT_V("vte"), TOYFLAG_BIN)) - USE_CATV(NEWTOY(catv, USE_CATV("vte"), TOYFLAG_USR|TOYFLAG_BIN)) - USE_SH(NEWTOY(cd, NULL, TOYFLAG_NOFORK)) - USE_CHATTR(NEWTOY(chattr, NULL, TOYFLAG_BIN)) --USE_CHCON(NEWTOY(chcon, "<2hvR", TOYFLAG_USR|TOYFLAG_BIN)) - USE_CHGRP(NEWTOY(chgrp, "<2hPLHRfv[-HLP]", TOYFLAG_BIN)) - USE_CHMOD(NEWTOY(chmod, "<2?vRf[-vf]", TOYFLAG_BIN)) - USE_CHOWN(OLDTOY(chown, chgrp, TOYFLAG_BIN)) -@@ -108,7 +107,6 @@ USE_KLOGD(NEWTOY(klogd, "c#<1>8n", TOYFLAG_SBIN)) - USE_LAST(NEWTOY(last, "f:W", TOYFLAG_BIN)) - USE_LINK(NEWTOY(link, "<2>2", TOYFLAG_USR|TOYFLAG_BIN)) - USE_LN(NEWTOY(ln, "<1vnfs", TOYFLAG_BIN)) --USE_LOAD_POLICY(NEWTOY(load_policy, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_LOGGER(NEWTOY(logger, "st:p:", TOYFLAG_USR|TOYFLAG_BIN)) - USE_LOGIN(NEWTOY(login, ">1fph:", TOYFLAG_BIN)) - USE_LOGNAME(NEWTOY(logname, ">0", TOYFLAG_USR|TOYFLAG_BIN)) -@@ -169,17 +167,14 @@ USE_REALPATH(NEWTOY(realpath, "<1", TOYFLAG_USR|TOYFLAG_BIN)) - USE_REBOOT(NEWTOY(reboot, "n", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) - USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_USR|TOYFLAG_BIN)) - USE_RESET(NEWTOY(reset, 0, TOYFLAG_USR|TOYFLAG_BIN)) --USE_RESTORECON(NEWTOY(restorecon, "<1DFnRrv", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_REV(NEWTOY(rev, NULL, TOYFLAG_USR|TOYFLAG_BIN)) - USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_RM(NEWTOY(rm, "fiRr[-fi]", TOYFLAG_BIN)) - USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN)) - USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) - USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN)) --USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_SED(NEWTOY(sed, "(version)e*f*inEr[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE)) - USE_SEQ(NEWTOY(seq, "<1>3?f:s:", TOYFLAG_USR|TOYFLAG_BIN)) --USE_SETENFORCE(NEWTOY(setenforce, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_SETPROP(NEWTOY(setprop, "<2>2", TOYFLAG_USR|TOYFLAG_SBIN)) - USE_SETSID(NEWTOY(setsid, "^<1t", TOYFLAG_USR|TOYFLAG_BIN)) - USE_SH(NEWTOY(sh, "c:i", TOYFLAG_BIN)) -diff --git a/toys/posix/ls.c b/toys/posix/ls.c -index 35d1034..1722fc9 100644 ---- a/toys/posix/ls.c -+++ b/toys/posix/ls.c -@@ -164,6 +164,8 @@ static unsigned seclabel(struct dirtree *dt, int pad) - if (pad) printf(" %*s "+(pad>0), pad, buf); - - return len; -+ } else { -+ return 0; - } - } - --- -1.8.2.1 - -- GitLab