aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-02-22 10:00:45 +0000
committerRon Yorston <rmy@pobox.com>2016-02-22 10:00:45 +0000
commit371c20c008254a36e7157df6c13dc2e4cf87d6fd (patch)
treea214c03f6617dffa60df2192b312a46c93b7c19f /modutils
parentab879a41ab674129ef1593cda181cc8b64d0dadf (diff)
parent3a5cc989025eefe03fda0552b253a4a8f015a761 (diff)
downloadbusybox-w32-371c20c008254a36e7157df6c13dc2e4cf87d6fd.tar.gz
busybox-w32-371c20c008254a36e7157df6c13dc2e4cf87d6fd.tar.bz2
busybox-w32-371c20c008254a36e7157df6c13dc2e4cf87d6fd.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index ec490b74d..997ee3c67 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -220,8 +220,16 @@ static int FAST_FUNC config_file_action(const char *filename,
220 parser_t *p; 220 parser_t *p;
221 struct module_entry *m; 221 struct module_entry *m;
222 int rc = TRUE; 222 int rc = TRUE;
223 const char *base, *ext;
223 224
224 if (bb_basename(filename)[0] == '.') 225 /* Skip files that begin with a ".". */
226 base = bb_basename(filename);
227 if (base[0] == '.')
228 goto error;
229
230 /* Skip files that do not end with a ".conf". */
231 ext = strrchr(base, '.');
232 if (ext == NULL || strcmp(ext + 1, "conf"))
225 goto error; 233 goto error;
226 234
227 p = config_open2(filename, fopen_for_read); 235 p = config_open2(filename, fopen_for_read);