Skip to contentSkip to conversation

busybox.inc: Fix bashism in compile, which fixes sh being suid

PATCH New Nathan Rossi 1 participant 1 message Nov 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox.inc: Fix bashism in compile, which fixes sh being suid

Fix the bashism in the suid check. This ensures that the check works correctly on hosts that default sh to e.g. dash. If this check fails the suid shell workaround does not remove sh from the suid binary and results in the target system containing a busybox.suid with sh as well as /bin/sh -> /bin/busybox.suid.

Cc Andrej Valek <[email protected]>
Cc Radovan Scasny <[email protected]>
---
 meta/recipes-core/busybox/busybox.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
index 86f0c60249..4012f921c6 100644
@@ -173,7 +173,7 @@ do_compile() {
 			done > .config.app.$s
 
 			# workaround for suid bug 10346
-			if [ "$s" == "suid" ] ; then
+			if [ "$s" = "suid" ] ; then
 				sed "s/.*CONFIG_SH_IS_NONE.*$/CONFIG_SH_IS_NONE=y/" -i .config.app.suid
 			fi
 
Signature · 1 line
2.14.2