aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-12-26 08:51:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-12-26 08:51:34 +0000
commit94e6f6ed7ffcb05189d9302a3404cad801408e5e (patch)
tree22ce471457104a062818284cb8321016cbee41a4 /main/busybox
parent76fa1ee7a87c721702a4cca4300d5d7f7bcb7972 (diff)
downloadaports-94e6f6ed7ffcb05189d9302a3404cad801408e5e.tar.bz2
aports-94e6f6ed7ffcb05189d9302a3404cad801408e5e.tar.xz
main/busybox: fix coldplug with modprobe -a
We call 'modprobe -a <alias> ...' from initramfs init for coldplugging. The upstream commit 4e314faa0a (modprobe,rmmod: reject module names with slashes) introduce a check for slashes in the modprobe name. This broke loading of module aliases with slashes which are often found in dmi modalias. We fix this by allowing slashes when -a option is given.
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch52
-rw-r--r--main/busybox/APKBUILD6
2 files changed, 57 insertions, 1 deletions
diff --git a/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch b/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
new file mode 100644
index 0000000000..5d76f47325
--- /dev/null
+++ b/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
@@ -0,0 +1,52 @@
+From a1aa214134b2843ab30f5fbe9a71321984bd3120 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 26 Dec 2014 09:32:59 +0100
+Subject: [PATCH] modprobe: allow slashes in modaliases with 'modprobe -a'
+
+---
+ modutils/modprobe.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/modutils/modprobe.c b/modutils/modprobe.c
+index f090428..6ccc18e 100644
+--- a/modutils/modprobe.c
++++ b/modutils/modprobe.c
+@@ -238,17 +238,6 @@ static void add_probe(const char *name)
+ {
+ struct module_entry *m;
+
+- /*
+- * get_or_add_modentry() strips path from name and works
+- * on remaining basename.
+- * This would make "rmmod dir/name" and "modprobe dir/name"
+- * to work like "rmmod name" and "modprobe name",
+- * which is wrong, and can be abused via implicit modprobing:
+- * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
+- */
+- if (strchr(name, '/'))
+- bb_error_msg_and_die("malformed module name '%s'", name);
+-
+ m = get_or_add_modentry(name);
+ if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
+ && (m->flags & MODULE_FLAG_LOADED)
+@@ -617,6 +606,17 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
+ } else {
+ /* First argument is module name, rest are parameters */
+ DBG("probing just module %s", *argv);
++ /*
++ * get_or_add_modentry() strips path from name and works
++ * on remaining basename.
++ * This would make "rmmod dir/name" and "modprobe dir/name"
++ * to work like "rmmod name" and "modprobe name",
++ * which is wrong, and can be abused via implicit modprobing:
++ * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
++ */
++ if (strchr(argv[0], '/'))
++ bb_error_msg_and_die("malformed module name '%s'", argv[0]);
++
+ add_probe(argv[0]);
+ G.cmdline_mopts = parse_cmdline_module_options(argv, /*quote_spaces:*/ 1);
+ }
+--
+2.2.1
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index af2c88fcf4..aeaddb2911 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.23.0
-pkgrel=1
+pkgrel=2
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -33,6 +33,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
0001-Revert-ash-make-var-unicode-aware.patch
+ 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
busyboxconfig
glibc.patch"
@@ -130,6 +131,7 @@ e1c183cbe1ca18a0fa0d9597314076c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.
b56d306ccba574da78dff060b7330806 1001-fbsplash-support-console-switching.patch
4fe5f9e973674c7db3d07f295c363a7c 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
387da51492382fa190bab9fa1302a310 0001-Revert-ash-make-var-unicode-aware.patch
+0d7a945ae3ffe754c2b324b8c0de2a19 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
3cff842a3618c84465d7ef5425c8749b busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
sha256sums="483ab594dd962ddbb332fd24e36ffdd6e36ac2182fbff055c56e1ca49fda09e4 busybox-1.23.0.tar.bz2
@@ -148,6 +150,7 @@ ac2cd5fed91bfaec22ed1f2766396d0feb29b9b96f20b2c12d5d8ac8769afae9 0001-linedit-d
b8b0b16ed67b0159256193b1d2108b8ef9aa8a334ab81e463bb970c71257da9a 1001-fbsplash-support-console-switching.patch
e1f3fad8e21dfd72cfcae7ab3ba31d7938e964e0f9ec08b2da0b14d462435424 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
e470de005aab40c1e68c35080a63f0f5e48d9cdf02cb869991a24e69fe9b7240 0001-Revert-ash-make-var-unicode-aware.patch
+ae265e9027b053a4401d3e7e72cc26787fb9b207a47dddc6ce4b44d93763f71c 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
342bb69c144a1e63d7a7fe4c24578ce5b483c09751ac16bb36d1b88929068141 busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
sha512sums="02c8f9dd9e47ad67b417fa58ba952bbdda6e79bad5399fba3d8217803053c2fd045228bd76d56e97d40c98296841dc66e4fa829887c05378a83bdeabafeb7f72 busybox-1.23.0.tar.bz2
@@ -166,5 +169,6 @@ a35b66cd28b79ccc14b47315ac94677fdf8c14d8a6e8956707e71fb50d453dfc5b4b822832cd1fae
a181dd54e8e11cf1199edb1b1fcd4b7402bbf142593b6014f32c6815bb7093b56899ad0fcc9f73c382f56203ac5274fb3d51fa070feb541436f23c31680f1a69 1001-fbsplash-support-console-switching.patch
c33073416f7da2805a20f3f456f869217171c8fbfdef85f4ae481307aeb1e1b5717084bbbc619010fa5500c3f3f49b6468d5c122024fcc49d637c82427a3f553 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
ea6bb04b2a16399a6c193a118e11a33595df95d0a3be612ea650ed7d4a3f58d0ae5c3e7d19925fc723d8da75ff0c437902ac0e13153df6e9252591366a1741ef 0001-Revert-ash-make-var-unicode-aware.patch
+6cff50ebea720d7ccdb07bf8ca52ead07f357b33a77587103c850ba3c3fb0c9e20d95fa4e6080723f9e90d38a2a5fc8067a5dc997835af20f260be026ad85b42 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
2efb13f23c48a4dc3e2eb6343256694719c3425fe8ddd36ce9fb1837e45fafa3326c2630a08d731abc6bbc104536218d095b2d997861c5b35a7f7907177d2e66 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"