summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2011-10-31 11:25:57 -0500
committerJesse Gilles <jgilles@multitech.com>2011-10-31 11:25:57 -0500
commitc7ffb4ee573bcf7e3539c74b08225de06437507d (patch)
treef45337c7641bc9f14ee7c6a4c6015cb63b77dbd5
parent55bfebf5b21c248cdb58f7e21bf3aef32cc864fa (diff)
busybox: install suid root if configured that way
-rw-r--r--recipes/busybox/busybox.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 519fcd6f39..da5b4e82b3 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r24"
+INC_PR = "r25"
SRC_URI = "\
http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -97,7 +97,11 @@ do_install () {
# Install /bin/busybox, and the /bin/sh link so the postinst script
# can run. Let update-alternatives handle the rest.
install -d ${D}${base_bindir}
- install -m 0755 ${S}/busybox ${D}${base_bindir}
+ if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then
+ install -m 4755 ${S}/busybox ${D}${base_bindir}
+ else
+ install -m 0755 ${S}/busybox ${D}${base_bindir}
+ fi
ln -sf busybox ${D}${base_bindir}/sh
if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then