aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-12-14 14:20:56 +0000
committerRon Yorston <rmy@pobox.com>2014-12-14 14:20:56 +0000
commit6d6d18d45c145899fce3a39553771cf0af671f30 (patch)
tree1936d18cbf61b9e0989464aad0a11c52cbeff7b7 /modutils
parent0c204dc07b718244c360e0b84df66ce0a012e14f (diff)
parentacb8be721768b54075a51d1859d390904a0f1f6c (diff)
downloadbusybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.tar.gz
busybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.tar.bz2
busybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.zip
Merge branch 'busybox' into merge
Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index f08f0850d..f0904285b 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -238,6 +238,17 @@ static void add_probe(const char *name)
238{ 238{
239 struct module_entry *m; 239 struct module_entry *m;
240 240
241 /*
242 * get_or_add_modentry() strips path from name and works
243 * on remaining basename.
244 * This would make "rmmod dir/name" and "modprobe dir/name"
245 * to work like "rmmod name" and "modprobe name",
246 * which is wrong, and can be abused via implicit modprobing:
247 * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
248 */
249 if (strchr(name, '/'))
250 bb_error_msg_and_die("malformed module name '%s'", name);
251
241 m = get_or_add_modentry(name); 252 m = get_or_add_modentry(name);
242 if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS)) 253 if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
243 && (m->flags & MODULE_FLAG_LOADED) 254 && (m->flags & MODULE_FLAG_LOADED)