diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-27 16:38:46 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-10-27 16:38:46 +0100 |
commit | 7ea8ba5370fd03965737cba133ccb31571821050 (patch) | |
tree | 5424ebaa8e4686559cabce6fbe25481fd8f2ec2f | |
parent | 6ca416f2b6d8cff02d90795aed05d4b30c54e4e4 (diff) | |
download | NetworkManager-th/bgo738611_load_setting_plugins.tar.gz |
fixup! settings: check file permissions when loading settings pluginsth/bgo738611_load_setting_plugins
-rw-r--r-- | src/settings/nm-settings.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index b4f4b6c7f4..64a39a3de0 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -669,6 +669,10 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) LOG (LOGL_WARN, "Could not load plugin '%s' from file '%s': %s", pname, path, strerror (errsv)); continue; } + if (!S_ISREG (st.st_mode)) { + LOG (LOGL_WARN, "Could not load plugin '%s' from file '%s': not a file", pname, path); + continue; + } if (st.st_uid != 0) { LOG (LOGL_WARN, "Could not load plugin '%s' from file '%s': file must be owned by root", pname, path); continue; |