]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox.inc: Fix bashism in compile, which fixes sh being suid
authorNathan Rossi <nathan@nathanrossi.com>
Thu, 9 Nov 2017 11:09:25 +0000 (21:09 +1000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Nov 2017 11:49:03 +0000 (11:49 +0000)
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.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Andrej Valek <andrej.valek@siemens.com>
Cc: Radovan Scasny <radovan.scasny@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc

index 86f0c602490911fc9850cbb4e6243eee803b0689..4012f921c6194d3cf474d593ccc5d0513e7726db 100644 (file)
@@ -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