aboutsummaryrefslogtreecommitdiff
path: root/include/applets.src.h
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-06-10 17:08:22 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-07-26 13:39:46 +0200
commit9078633feeb129d679c97d900807ef2d5b253b65 (patch)
tree153f82ae904f01bcba2edd6197b7f5995a013a05 /include/applets.src.h
parent7801148a816a2ab1c2f9437c8992c86722361147 (diff)
downloadbusybox-9078633feeb129d679c97d900807ef2d5b253b65.tar.gz
buildsys: Add helper to list suid applets
Add a helper script that lists all applets that - do or may require SUID provileges (busybox.cfg.suid) - do not require SUID provileges (busybox.cfg.nosuid) Some setups prefer to build two busybox binaries, one that is suid which contains all applets that do or may require suid privileges, and a second one for all the rest (which drops suid). To ease splitting these two binaries, generate a list of CONFIG_ items for the suid binary. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'include/applets.src.h')
-rw-r--r--include/applets.src.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index 00172b1bc..aa319bbc9 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -52,6 +52,12 @@ s - suid type:
# define APPLET_NOEXEC(name,main,l,s,name2) LINK l name
# define APPLET_NOFORK(name,main,l,s,name2) LINK l name
+#elif defined(MAKE_SUID)
+# define APPLET(name,l,s) SUID s l name
+# define APPLET_ODDNAME(name,main,l,s,name2) SUID s l name
+# define APPLET_NOEXEC(name,main,l,s,name2) SUID s l name
+# define APPLET_NOFORK(name,main,l,s,name2) SUID s l name
+
#else
static struct bb_applet applets[] = { /* name, main, location, need_suid */
# define APPLET(name,l,s) { #name, #name, l, s },
@@ -415,7 +421,8 @@ IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))
IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat))
IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
-#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
+#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \
+ && !defined(MAKE_LINKS) && !defined(MAKE_SUID)
};
#endif