diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-11-16 15:44:53 +0100 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-11-16 17:23:23 +0100 |
commit | a585af78aee0f6f57d30a2ba261644d05155f4e6 (patch) | |
tree | 7a2ca48cf7ed182cfc5f2bc40212e7da47759b69 /src/daemon/PluginManager.cpp | |
parent | d2c60a8a6cb9c02c959f283a370abff780016b07 (diff) | |
download | abrt-a585af78aee0f6f57d30a2ba261644d05155f4e6.tar.gz abrt-a585af78aee0f6f57d30a2ba261644d05155f4e6.tar.xz abrt-a585af78aee0f6f57d30a2ba261644d05155f4e6.zip |
remove unused SetPluginSettings(...)
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/daemon/PluginManager.cpp')
-rw-r--r-- | src/daemon/PluginManager.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/daemon/PluginManager.cpp b/src/daemon/PluginManager.cpp index 583b665e..f2501057 100644 --- a/src/daemon/PluginManager.cpp +++ b/src/daemon/PluginManager.cpp @@ -333,75 +333,3 @@ plugin_type_t CPluginManager::GetPluginType(const char *pName) map_loaded_module_t::iterator it_module = m_mapLoadedModules.find(pName); return it_module->second->GetType(); } - -void CPluginManager::SetPluginSettings(const char *pName, - const char *pUID, - const map_plugin_settings_t& pSettings) -{ - map_loaded_module_t::iterator it_module = m_mapLoadedModules.find(pName); - if (it_module == m_mapLoadedModules.end()) - { - return; - } - map_plugin_t::iterator it_plugin = m_mapPlugins.find(pName); - if (it_plugin == m_mapPlugins.end()) - { - return; - } - it_plugin->second->SetSettings(pSettings); - -#if 0 /* Writing to ~user/.abrt/ is bad wrt security */ - if (it_module->second->GetType() != REPORTER) - { - return; - } - - const char *home = get_home_dir(xatoi_u(pUID.c_str())); - if (home == NULL || strlen(home) == 0) - return; - - string confDir = home + "/.abrt"; - string confPath = confDir + "/" + pName + "."PLUGINS_CONF_EXTENSION; - uid_t uid = xatoi_u(pUID.c_str()); - struct passwd* pw = getpwuid(uid); - gid_t gid = pw ? pw->pw_gid : uid; - - struct stat buf; - if (stat(confDir.c_str(), &buf) != 0) - { - if (mkdir(confDir.c_str(), 0700) == -1) - { - perror_msg("Can't create dir '%s'", confDir.c_str()); - return; - } - if (chmod(confDir.c_str(), 0700) == -1) - { - perror_msg("Can't change mod of dir '%s'", confDir.c_str()); - return; - } - if (chown(confDir.c_str(), uid, gid) == -1) - { - perror_msg("Can't change '%s' ownership to %lu:%lu", confPath.c_str(), (long)uid, (long)gid); - return; - } - } - else if (!S_ISDIR(buf.st_mode)) - { - perror_msg("'%s' is not a directory", confDir.c_str()); - return; - } - - /** we don't want to save it from daemon if it's running under root - but wi might get back to this once we make the daemon to not run - with root privileges - */ - /* - SavePluginSettings(confPath, pSettings); - if (chown(confPath.c_str(), uid, gid) == -1) - { - perror_msg("Can't change '%s' ownership to %lu:%lu", confPath.c_str(), (long)uid, (long)gid); - return; - } - */ -#endif -} |