mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 19:10:31 +01:00
config: ensure nm_config_get_plugins() to return stripped values
This commit is contained in:
parent
0abb502ff3
commit
7e94785f28
2 changed files with 4 additions and 7 deletions
|
|
@ -1010,7 +1010,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -769,17 +769,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