summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-10-05 21:42:16 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-10-05 21:42:16 +0200
commita47026057cd99a0e1eb34d51ed644cc66ae20bc6 (patch)
tree5a2b250f50aa8239ac98377817410cdae6a267e5 /src/Daemon
parenta56b047e24bbf96879e77f51867b96d515cdbfa6 (diff)
downloadabrt-a47026057cd99a0e1eb34d51ed644cc66ae20bc6.tar.gz
abrt-a47026057cd99a0e1eb34d51ed644cc66ae20bc6.tar.xz
abrt-a47026057cd99a0e1eb34d51ed644cc66ae20bc6.zip
removed unsecure reading/writting from ~HOME directory
- daemon eunning under root can't read/write from ~HOME, so reading/writting config files have been moved to client (GUI) - uses gnome keyring to store the credentials
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp12
-rw-r--r--src/Daemon/PluginManager.cpp13
2 files changed, 20 insertions, 5 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index 22dc2e6..1085d80 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -253,14 +253,19 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
}
+ const char * sender = dbus_message_get_sender(call);
if (!user_conf_data.empty())
{
-#if DEBUG
+ std::string PluginName;
+ map_plugin_settings_t plugin_settings;
map_map_string_t::const_iterator it_user_conf_data;
for (it_user_conf_data = user_conf_data.begin(); it_user_conf_data != user_conf_data.end(); it_user_conf_data++)
{
map_string_t::const_iterator it_plugin_config;
map_string_t plugin_config = it_user_conf_data->second;
+ PluginName = it_user_conf_data->first;
+ plugin_settings = it_user_conf_data->second;
+#if DEBUG
std::cout << "plugin name: " << it_user_conf_data->first;
for (it_plugin_config = it_user_conf_data->second.begin();
it_plugin_config != it_user_conf_data->second.end();
@@ -268,10 +273,9 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
{
std::cout << " key: " << it_plugin_config->first << " value: " << it_plugin_config->second << std::endl;
}
- }
#endif
- const char * sender = dbus_message_get_sender(call);
- SetSettings(user_conf_data, sender);
+ g_pPluginManager->SetPluginSettings(PluginName, sender, plugin_settings);
+ }
}
//so far, user_conf_data is unused
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 4c1dae5..bd5727e 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -420,12 +420,18 @@ void CPluginManager::SetPluginSettings(const std::string& pName,
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 %u:%u", confPath.c_str(), (int)uid, (int)gid);
return;
}
+ */
}
}
}
@@ -443,7 +449,11 @@ map_plugin_settings_t CPluginManager::GetPluginSettings(const std::string& pName
if (plugin != m_mapPlugins.end())
{
ret = plugin->second->GetSettings();
-
+ /** we don't want to load 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
+ */
+ /*
if (abrt_plugin->second->GetType() == REPORTER)
{
std::string home = get_home_dir(atoi(pUID.c_str()));
@@ -452,6 +462,7 @@ map_plugin_settings_t CPluginManager::GetPluginSettings(const std::string& pName
LoadPluginSettings(home + "/.abrt/" + pName + "."PLUGINS_CONF_EXTENSION, ret);
}
}
+ */
return ret;
}
}