mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 05:40:11 +01:00
config: ensure nm_config_get_plugins() to return stripped values
(cherry picked from commit 7e94785f28)
This commit is contained in:
parent
df1cd73128
commit
e713fb5e99
2 changed files with 4 additions and 7 deletions
|
|
@ -1008,7 +1008,8 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
|||
else
|
||||
priv->no_auto_default_file = g_strdup (DEFAULT_NO_AUTO_DEFAULT_FILE);
|
||||
|
||||
priv->plugins = g_key_file_get_string_list (keyfile, NM_CONFIG_KEYFILE_GROUP_MAIN, "plugins", NULL, NULL);
|
||||
priv->plugins = _nm_utils_strv_cleanup (g_key_file_get_string_list (keyfile, NM_CONFIG_KEYFILE_GROUP_MAIN, "plugins", NULL, NULL),
|
||||
TRUE, TRUE, TRUE);
|
||||
if (!priv->plugins)
|
||||
priv->plugins = g_new0 (char *, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -685,17 +685,13 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
|
|||
GModule *plugin;
|
||||
gs_free char *full_name = NULL;
|
||||
gs_free char *path = NULL;
|
||||
gs_free char *pname = NULL;
|
||||
const char *pname;
|
||||
GObject *obj;
|
||||
GObject * (*factory_func) (void);
|
||||
struct stat st;
|
||||
int errsv;
|
||||
|
||||
pname = g_strdup (*iter);
|
||||
g_strstrip (pname);
|
||||
|
||||
if (!*pname)
|
||||
continue;
|
||||
pname = *iter;
|
||||
|
||||
if (!*pname || strchr (pname, '/')) {
|
||||
LOG (LOGL_WARN, "ignore invalid plugin \"%s\"", pname);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue