OSDN Git Service

Set CONFIG_TOYBOX_NORECURSE.
authorElliott Hughes <enh@google.com>
Tue, 19 Jan 2016 18:14:21 +0000 (10:14 -0800)
committerElliott Hughes <enh@google.com>
Tue, 19 Jan 2016 18:14:21 +0000 (10:14 -0800)
CONFIG_TOYBOX_NORECURSE means that toybox avoids re-execing where possible.
Unfortunately, this breaks runcon, which requires an exec(2) to have any
effect. Note that this only breaks runcon for toybox commands, and even then
only if you use the bare name (such as "id" rather than "/system/bin/id"),
which is why this went undetected for so long.

Change-Id: Ia02254346800c2c16ac6fc692dc8a79b1ac67f58

.config
generated/config.h

diff --git a/.config b/.config
index 6af4866..15a8ea8 100644 (file)
--- a/.config
+++ b/.config
@@ -327,7 +327,7 @@ CONFIG_TOYBOX_HELP=y
 CONFIG_TOYBOX_HELP_DASHDASH=y
 CONFIG_TOYBOX_I18N=y
 # CONFIG_TOYBOX_FREE is not set
-# CONFIG_TOYBOX_NORECURSE is not set
+CONFIG_TOYBOX_NORECURSE=y
 CONFIG_TOYBOX_DEBUG=y
 CONFIG_TOYBOX_UID_SYS=100
 CONFIG_TOYBOX_UID_USR=500
index 92eacc3..cec190b 100644 (file)
 #define USE_TOYBOX_I18N(...) __VA_ARGS__
 #define CFG_TOYBOX_FREE 0
 #define USE_TOYBOX_FREE(...)
-#define CFG_TOYBOX_NORECURSE 0
-#define USE_TOYBOX_NORECURSE(...)
+#define CFG_TOYBOX_NORECURSE 1
+#define USE_TOYBOX_NORECURSE(...) __VA_ARGS__
 #define CFG_TOYBOX_DEBUG 1
 #define USE_TOYBOX_DEBUG(...) __VA_ARGS__
 #define CFG_TOYBOX_UID_SYS 100