From a47026057cd99a0e1eb34d51ed644cc66ae20bc6 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 5 Oct 2009 21:42:16 +0200 Subject: 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 --- src/Daemon/CommLayerServerDBus.cpp | 12 ++++++++---- src/Daemon/PluginManager.cpp | 13 ++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'src/Daemon') 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; } } -- cgit From 3441533d3bf93bec4d6d6a1826bb3d053f337b2f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 6 Oct 2009 15:34:19 +0200 Subject: rename abrt.8 to abrtd.8 Signed-off-by: Denys Vlasenko --- src/Daemon/Makefile.am | 2 +- src/Daemon/abrt.8 | 38 -------------------------------------- src/Daemon/abrtd.8 | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 src/Daemon/abrt.8 create mode 100644 src/Daemon/abrtd.8 (limited to 'src/Daemon') diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index b41f8ec..29c7f1b 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -42,7 +42,7 @@ dist_polkitconf_DATA = org.fedoraproject.abrt.policy comredhatabrtservicedir = ${datadir}/dbus-1/system-services dist_comredhatabrtservice_DATA = com.redhat.abrt.service -man_MANS = abrt.8 abrt.conf.5 +man_MANS = abrtd.8 abrt.conf.5 EXTRA_DIST = $(man_MANS) DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ diff --git a/src/Daemon/abrt.8 b/src/Daemon/abrt.8 deleted file mode 100644 index b106041..0000000 --- a/src/Daemon/abrt.8 +++ /dev/null @@ -1,38 +0,0 @@ -.TH abrt "8" "28 May 2009" "" -.SH NAME -abrt \- an automated bug-reporting tool -.SH SYNOPSIS -.B abrt [ -d ] -.SH DESCRIPTION -.I abrt -is a daemon that watches for application crashes. When a crash occurs, -it collects the crash data (core file, application's command line etc.) -and takes action according to the type of application that -crashed and according to the configuration in the -.I abrt.conf -config file. There are plugins for various actions: for example to report -the crash to Bugzilla, to mail the report, or to transfer the -report via FTP or SCP. See the manual pages for the -respective plugins. -.SH OPTIONS - -.TP - -.B "\-d" - -This option causes -.I abrt -to print more debugging information when the daemon is started. -.SH CAVEATS -When you use some other crash-catching tool, specific for an application -or an application type (for example BugBuddy for GNOME applications), -crashes of this type will be handled by that tool and -not by \fIabrt\fP. If you want \fIabrt\fP to handle these crashes, -turn off the higher-level crash-catching tool. -.SH "SEE ALSO" -.IR abrt.conf (5), -.IR abrt-plugins (7) -.SH AUTHOR -Written by Zdeněk Přikryl and -Jiří Moskovčák . Manual page written by Daniel -Novotný . diff --git a/src/Daemon/abrtd.8 b/src/Daemon/abrtd.8 new file mode 100644 index 0000000..b106041 --- /dev/null +++ b/src/Daemon/abrtd.8 @@ -0,0 +1,38 @@ +.TH abrt "8" "28 May 2009" "" +.SH NAME +abrt \- an automated bug-reporting tool +.SH SYNOPSIS +.B abrt [ -d ] +.SH DESCRIPTION +.I abrt +is a daemon that watches for application crashes. When a crash occurs, +it collects the crash data (core file, application's command line etc.) +and takes action according to the type of application that +crashed and according to the configuration in the +.I abrt.conf +config file. There are plugins for various actions: for example to report +the crash to Bugzilla, to mail the report, or to transfer the +report via FTP or SCP. See the manual pages for the +respective plugins. +.SH OPTIONS + +.TP + +.B "\-d" + +This option causes +.I abrt +to print more debugging information when the daemon is started. +.SH CAVEATS +When you use some other crash-catching tool, specific for an application +or an application type (for example BugBuddy for GNOME applications), +crashes of this type will be handled by that tool and +not by \fIabrt\fP. If you want \fIabrt\fP to handle these crashes, +turn off the higher-level crash-catching tool. +.SH "SEE ALSO" +.IR abrt.conf (5), +.IR abrt-plugins (7) +.SH AUTHOR +Written by Zdeněk Přikryl and +Jiří Moskovčák . Manual page written by Daniel +Novotný . -- cgit