aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-06 15:22:24 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-06 15:23:26 +0200
commit4f0b540d08f5912b273c427218cc665512b12de5 (patch)
tree061a0c4a01fccfe31c88e01e5d50616f5e6b96cb /modutils
parent0d6e3ad663adc327597f07fdcabd6ac545864d41 (diff)
downloadbusybox-w32-4f0b540d08f5912b273c427218cc665512b12de5.tar.gz
busybox-w32-4f0b540d08f5912b273c427218cc665512b12de5.tar.bz2
busybox-w32-4f0b540d08f5912b273c427218cc665512b12de5.zip
modprobe: do not descend into /etc/modprobe.d/DIR/. Closes 8686
Also expanded comments in recursive_action.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index c82eaa8d8..51ede9204 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -252,6 +252,15 @@ static int FAST_FUNC config_file_action(const char *filename,
252 if (base[0] == '.') 252 if (base[0] == '.')
253 goto error; 253 goto error;
254 254
255 /* "man modprobe.d" from kmod version 22 suggests
256 * that we shouldn't recurse into /etc/modprobe.d/dir/
257 * _subdirectories_:
258 */
259 if (depth > 1)
260 return SKIP; /* stop recursing */
261//TODO: instead, can use dirAction in recursive_action() to SKIP dirs
262//on depth == 1 level. But that's more code...
263
255 /* In dir recursion, skip files that do not end with a ".conf" 264 /* In dir recursion, skip files that do not end with a ".conf"
256 * depth==0: read_config("modules.{symbols,alias}") must work, 265 * depth==0: read_config("modules.{symbols,alias}") must work,
257 * "include FILE_NOT_ENDING_IN_CONF" must work too. 266 * "include FILE_NOT_ENDING_IN_CONF" must work too.