From 49fcfcdfae02bcca2e7a062bb5e8b7ba33998c46 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 21 Jun 2016 17:22:12 +0200 Subject: [PATCH] config: skip shadowed run-config files in read_entire_config() https://bugzilla.gnome.org/show_bug.cgi?id=773069 --- src/nm-config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nm-config.c b/src/nm-config.c index 78c59a5410..229c2e85a5 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -959,8 +959,9 @@ read_entire_config (const NMConfigCmdLineOptions *cli, for (i = 0; i < system_confs->len; ) { const char *filename = system_confs->pdata[i]; - /* if a same named file exists in config_dir, skip it. */ - if (_nm_utils_strv_find_first ((char **) confs->pdata, confs->len, filename) >= 0) { + /* if a same named file exists in config_dir or RUN_CONFIG_DIR, skip it. */ + if (_nm_utils_strv_find_first ((char **) confs->pdata, confs->len, filename) >= 0 || + _nm_utils_strv_find_first ((char **) run_confs->pdata, run_confs->len, filename) >= 0) { g_ptr_array_remove_index (system_confs, i); continue; }