All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix busybox SUID support
@ 2010-02-23 19:02 Tom Rini
  2010-02-23 19:51 ` Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Tom Rini @ 2010-02-23 19:02 UTC (permalink / raw)
  To: openembedded-devel

I was about to just push this and I noticed that a number of
distributions (SlugOS, Angstrom, Kaelios, micro) currently set
FEATURE_SUID=y, but it's not actually install SUID.  And since I recall
some way-back-when's of "busybox SUID is dangerous / crap!", I thought
it best to post the patch first and let folks speak up / ask me to drop
FEATURE_SUID=y when I do this.  So, here's the patch:

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 5f52850..b165d0f 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 = "\
   file://busybox-cron \
@@ -96,7 +96,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


-- 
Tom Rini <tom_rini@mentor.com>
Mentor Graphics Corporation



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-02-26 23:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 19:02 [PATCH] Fix busybox SUID support Tom Rini
2010-02-23 19:51 ` Khem Raj
2010-02-23 20:14   ` Tom Rini
2010-02-23 20:23     ` Chris Larson
2010-02-23 21:37 ` Phil Blundell
2010-02-23 22:52 ` Michael 'Mickey' Lauer
2010-02-23 23:01   ` Tom Rini
2010-02-24 10:19 ` Marcin Juszkiewicz
2010-02-24 16:10   ` Tom Rini
2010-02-26 15:43 ` Mike Westerhof
2010-02-26 18:20   ` Koen Kooi
2010-02-26 20:21     ` C Michael Sundius
2010-02-26 22:26       ` Bernhard Reutner-Fischer
2010-02-26 22:42         ` Phil Blundell
2010-02-26 23:06           ` Bernhard Reutner-Fischer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.