diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-06-10 17:08:22 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-07-26 13:39:46 +0200 |
commit | 9078633feeb129d679c97d900807ef2d5b253b65 (patch) | |
tree | 153f82ae904f01bcba2edd6197b7f5995a013a05 /include | |
parent | 7801148a816a2ab1c2f9437c8992c86722361147 (diff) | |
download | busybox-w32-9078633feeb129d679c97d900807ef2d5b253b65.tar.gz busybox-w32-9078633feeb129d679c97d900807ef2d5b253b65.tar.bz2 busybox-w32-9078633feeb129d679c97d900807ef2d5b253b65.zip |
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')
-rw-r--r-- | include/applets.src.h | 9 |
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: | |||
52 | # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name | 52 | # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name |
53 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name | 53 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name |
54 | 54 | ||
55 | #elif defined(MAKE_SUID) | ||
56 | # define APPLET(name,l,s) SUID s l name | ||
57 | # define APPLET_ODDNAME(name,main,l,s,name2) SUID s l name | ||
58 | # define APPLET_NOEXEC(name,main,l,s,name2) SUID s l name | ||
59 | # define APPLET_NOFORK(name,main,l,s,name2) SUID s l name | ||
60 | |||
55 | #else | 61 | #else |
56 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ | 62 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ |
57 | # define APPLET(name,l,s) { #name, #name, l, s }, | 63 | # 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)) | |||
415 | IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) | 421 | IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) |
416 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) | 422 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) |
417 | 423 | ||
418 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) | 424 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \ |
425 | && !defined(MAKE_LINKS) && !defined(MAKE_SUID) | ||
419 | }; | 426 | }; |
420 | #endif | 427 | #endif |
421 | 428 | ||