summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/CommLayerServerDBus.cpp48
-rw-r--r--src/daemon/Makefile.am4
-rw-r--r--src/daemon/PluginManager.cpp30
-rw-r--r--src/daemon/PluginManager.h14
-rw-r--r--src/daemon/Settings.cpp12
-rw-r--r--src/daemon/org.fedoraproject.abrt.policy38
6 files changed, 0 insertions, 146 deletions
diff --git a/src/daemon/CommLayerServerDBus.cpp b/src/daemon/CommLayerServerDBus.cpp
index ecff0920..28d6ee05 100644
--- a/src/daemon/CommLayerServerDBus.cpp
+++ b/src/daemon/CommLayerServerDBus.cpp
@@ -350,48 +350,6 @@ static int handle_GetPluginSettings(DBusMessage* call, DBusMessage* reply)
return 0;
}
-#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD
-static int handle_RegisterPlugin(DBusMessage* call, DBusMessage* reply)
-{
- int r;
- DBusMessageIter in_iter;
- dbus_message_iter_init(call, &in_iter);
- const char* PluginName;
- r = load_val(&in_iter, PluginName);
- if (r != ABRT_DBUS_LAST_FIELD)
- {
- error_msg("dbus call %s: parameter type mismatch", __func__ + 7);
- return -1;
- }
-
- const char * sender = dbus_message_get_sender(call);
- g_pPluginManager->RegisterPluginDBUS(PluginName, sender);
-
- send_flush_and_unref(reply);
- return 0;
-}
-
-static int handle_UnRegisterPlugin(DBusMessage* call, DBusMessage* reply)
-{
- int r;
- DBusMessageIter in_iter;
- dbus_message_iter_init(call, &in_iter);
- const char* PluginName;
- r = load_val(&in_iter, PluginName);
- if (r != ABRT_DBUS_LAST_FIELD)
- {
- error_msg("dbus call %s: parameter type mismatch", __func__ + 7);
- return -1;
- }
-
- const char * sender = dbus_message_get_sender(call);
- g_pPluginManager->UnRegisterPluginDBUS(PluginName, sender);
-
- send_flush_and_unref(reply);
- return 0;
-}
-#endif
-
static int handle_GetSettings(DBusMessage* call, DBusMessage* reply)
{
map_abrt_settings_t result = GetSettings();
@@ -453,12 +411,6 @@ static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg
r = handle_GetPluginsInfo(msg, reply);
else if (strcmp(member, "GetPluginSettings") == 0)
r = handle_GetPluginSettings(msg, reply);
-#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD
- else if (strcmp(member, "RegisterPlugin") == 0)
- r = handle_RegisterPlugin(msg, reply);
- else if (strcmp(member, "UnRegisterPlugin") == 0)
- r = handle_UnRegisterPlugin(msg, reply);
-#endif
else if (strcmp(member, "GetSettings") == 0)
r = handle_GetSettings(msg, reply);
else if (strcmp(member, "SetSettings") == 0)
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 86c8b3b2..c53af01b 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -93,7 +93,6 @@ abrt_action_save_package_data_CPPFLAGS = \
$(GLIB_CFLAGS) \
-D_GNU_SOURCE \
-Wall -Werror
-# polkit_check_authorization is in libABRTdUtils
abrt_action_save_package_data_LDADD = \
$(RPM_LIBS) \
../lib/libABRTdUtils.la \
@@ -108,9 +107,6 @@ dist_daemonconf_DATA = \
abrt_event.conf \
gpg_keys
-polkitconfdir = ${datadir}/polkit-1/actions
-dist_polkitconf_DATA = org.fedoraproject.abrt.policy
-
comredhatabrtservicedir = ${datadir}/dbus-1/system-services
dist_comredhatabrtservice_DATA = com.redhat.abrt.service
diff --git a/src/daemon/PluginManager.cpp b/src/daemon/PluginManager.cpp
index e54f8bc0..0f7b983d 100644
--- a/src/daemon/PluginManager.cpp
+++ b/src/daemon/PluginManager.cpp
@@ -21,7 +21,6 @@
#include <dlfcn.h>
#include "abrtlib.h"
#include "abrt_exception.h"
-#include "Polkit.h"
#include "PluginManager.h"
using namespace std;
@@ -231,35 +230,6 @@ void CPluginManager::UnLoadPlugin(const char *pName)
}
}
-#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD
-void CPluginManager::RegisterPluginDBUS(const char *pName, const char *pDBUSSender)
-{
- int polkit_result = polkit_check_authorization(pDBUSSender,
- "org.fedoraproject.abrt.change-daemon-settings");
- if (polkit_result == PolkitYes)
- {
-//TODO: report success/failure
- LoadPlugin(pName);
- } else
- {
- log("User %s not authorized, returned %d", pDBUSSender, polkit_result);
- }
-}
-
-void CPluginManager::UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender)
-{
- int polkit_result = polkit_check_authorization(pDBUSSender,
- "org.fedoraproject.abrt.change-daemon-settings");
- if (polkit_result == PolkitYes)
- {
- UnLoadPlugin(pName);
- } else
- {
- log("user %s not authorized, returned %d", pDBUSSender, polkit_result);
- }
-}
-#endif
-
CAction* CPluginManager::GetAction(const char *pName, bool silent)
{
CPlugin *plugin = LoadPlugin(pName);
diff --git a/src/daemon/PluginManager.h b/src/daemon/PluginManager.h
index ed2818b3..1d2b4bd3 100644
--- a/src/daemon/PluginManager.h
+++ b/src/daemon/PluginManager.h
@@ -83,20 +83,6 @@ class CPluginManager
* @param pName A plugin name.
*/
void UnLoadPlugin(const char *pName);
-#ifdef PLUGIN_DYNAMIC_LOAD_UNLOAD
- /**
- * A method, which registers particular plugin.
- * @param pName A plugin name.
- */
- void RegisterPluginDBUS(const char *pName, const char *pDBUSSender);
- /**
- * A method, which unregister particular plugin,
- * called via DBUS
- * @param pName A plugin name.
- * @param pDBUSSender DBUS user identification
- */
- void UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender);
-#endif
/**
* A method, which returns instance of particular action plugin.
* @param pName A plugin name.
diff --git a/src/daemon/Settings.cpp b/src/daemon/Settings.cpp
index d1cd271a..d0c44c20 100644
--- a/src/daemon/Settings.cpp
+++ b/src/daemon/Settings.cpp
@@ -18,7 +18,6 @@
*/
#include "abrtlib.h"
#include "Settings.h"
-#include "Polkit.h"
#define SECTION_COMMON "Common"
#define SECTION_CRON "Cron"
@@ -432,17 +431,6 @@ map_abrt_settings_t GetSettings()
/* dbus call to change some .conf file data */
void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender)
{
- int polkit_result;
-
- polkit_result = polkit_check_authorization(dbus_sender,
- "org.fedoraproject.abrt.change-daemon-settings");
- if (polkit_result != PolkitYes)
- {
- error_msg("user %s not authorized, returned %d", dbus_sender, polkit_result);
- return;
- }
- log("user %s succesfully authorized", dbus_sender);
-
map_abrt_settings_t::const_iterator it = pSettings.find(SECTION_COMMON);
map_abrt_settings_t::const_iterator end = pSettings.end();
if (it != end)
diff --git a/src/daemon/org.fedoraproject.abrt.policy b/src/daemon/org.fedoraproject.abrt.policy
deleted file mode 100644
index 9261acdc..00000000
--- a/src/daemon/org.fedoraproject.abrt.policy
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
-
-<!--
-PolicyKit policy definitions for ABRT
-
-Copyright (c) 2009 Daniel Novotny <dnovotny@redhat.com>
-Copyright (c) 2009 Red Hat inc.
-
--->
-
-<policyconfig>
- <vendor>The ABRT Team</vendor>
- <vendor_url>https://fedorahosted.org/abrt/</vendor_url>
-
- <action id="org.fedoraproject.abrt.change-daemon-settings">
- <description>Manage settings</description>
- <message>Changing the global settings requires authentication</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_active>auth_admin_keep</allow_active>
- <allow_inactive>no</allow_inactive>
- </defaults>
- </action>
-
- <!-- install-debuginfos: default yes, administrator can change this -->
- <action id="org.fedoraproject.abrt.install-debuginfos">
- <description>Install debuginfos</description>
- <message>Installing debuginfos requires authentication</message>
- <defaults>
- <allow_any>yes</allow_any>
- <allow_active>yes</allow_active>
- <allow_inactive>yes</allow_inactive>
- </defaults>
- </action>
-</policyconfig>