summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abrt.spec2
-rw-r--r--configure.ac1
-rw-r--r--src/daemon/Makefile.am4
-rw-r--r--src/daemon/PluginManager.cpp1
-rw-r--r--src/daemon/Settings.cpp12
-rw-r--r--src/daemon/org.fedoraproject.abrt.policy38
-rw-r--r--src/lib/Makefile.am5
-rw-r--r--src/lib/Polkit.cpp102
-rw-r--r--src/lib/Polkit.h42
-rw-r--r--src/plugins/CCpp.cpp1
10 files changed, 1 insertions, 207 deletions
diff --git a/abrt.spec b/abrt.spec
index 8406be63..e1dbdc05 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -42,7 +42,6 @@ BuildRequires: file-devel
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: libxml2-devel
-BuildRequires: polkit-devel
BuildRequires: libtar-devel, bzip2-devel, zlib-devel
BuildRequires: intltool
BuildRequires: bison
@@ -346,7 +345,6 @@ fi
%{_mandir}/man5/%{name}.conf.5.gz
# {_mandir}/man5/pyhook.conf.5.gz
%{_mandir}/man7/%{name}-plugins.7.gz
-%{_datadir}/polkit-1/actions/org.fedoraproject.abrt.policy
%{_datadir}/dbus-1/system-services/com.redhat.abrt.service
%config(noreplace) %{_sysconfdir}/%{name}/plugins/SQLite3.conf
%{_libdir}/%{name}/libSQLite3.so*
diff --git a/configure.ac b/configure.ac
index 85d9d6a8..8af09066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,6 @@ PKG_CHECK_MODULES([LIBNOTIFY], [libnotify])
#PKG_CHECK_MODULES([NSS], [nss])
PKG_CHECK_MODULES([XMLRPC], [xmlrpc])
PKG_CHECK_MODULES([XMLRPC_CLIENT], [xmlrpc_client])
-PKG_CHECK_MODULES([POLKIT], [polkit-gobject-1])
PKG_PROG_PKG_CONFIG
AC_ARG_WITH([systemdsystemunitdir],
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..d5c86c09 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;
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>
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 055d99f4..cb42abe7 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -62,8 +62,7 @@ libABRTdUtils_la_SOURCES = \
parse_release.cpp \
make_descr.cpp \
$(HEADER_DIR)/comm_layer_inner.h CommLayerInner.cpp \
- $(HEADER_DIR)/plugin.h Plugin.cpp \
- Polkit.h Polkit.cpp
+ $(HEADER_DIR)/plugin.h Plugin.cpp
libABRTdUtils_la_CPPFLAGS = \
-Wall \
-I$(srcdir)/../include \
@@ -72,12 +71,10 @@ libABRTdUtils_la_CPPFLAGS = \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
- $(POLKIT_CFLAGS) \
-D_GNU_SOURCE
libABRTdUtils_la_LDFLAGS = \
-version-info 0:1:0
libABRTdUtils_la_LIBADD = \
- $(POLKIT_LIBS) \
-ldl
libABRT_web_utils_la_SOURCES = \
diff --git a/src/lib/Polkit.cpp b/src/lib/Polkit.cpp
deleted file mode 100644
index a5e07760..00000000
--- a/src/lib/Polkit.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- Polkit.cpp - PolicyKit integration for ABRT
-
- Copyright (C) 2009 Daniel Novotny (dnovotny@redhat.com)
- Copyright (C) 2009 RedHat inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#include <polkit/polkit.h>
-#include <glib-object.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "Polkit.h"
-#include "abrtlib.h"
-
-/*number of seconds: timeout for the authorization*/
-#define POLKIT_TIMEOUT 20
-
-static gboolean do_cancel(GCancellable* cancellable)
-{
- log("Timer has expired; cancelling authorization check\n");
- g_cancellable_cancel(cancellable);
- return FALSE;
-}
-
-
-static PolkitResult do_check(PolkitSubject *subject, const char *action_id)
-{
- PolkitAuthority *authority;
- PolkitAuthorizationResult *result;
- GError *error = NULL;
- GCancellable * cancellable;
-
- authority = polkit_authority_get();
- cancellable = g_cancellable_new();
-
- guint cancel_timeout = g_timeout_add(POLKIT_TIMEOUT * 1000,
- (GSourceFunc) do_cancel,
- cancellable);
-
- result = polkit_authority_check_authorization_sync(authority,
- subject,
- action_id,
- NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
- cancellable,
- &error);
- g_object_unref(authority);
- g_source_remove(cancel_timeout);
- if (error)
- {
- g_error_free(error);
- return PolkitUnknown;
- }
-
- if (result)
- {
- if (polkit_authorization_result_get_is_challenge(result))
- {
- /* Can't happen (happens only with
- * POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE flag) */
- g_object_unref(result);
- return PolkitChallenge;
- }
- if (polkit_authorization_result_get_is_authorized(result))
- {
- g_object_unref(result);
- return PolkitYes;
- }
- g_object_unref(result);
- return PolkitNo;
- }
-
- return PolkitUnknown;
-}
-
-PolkitResult polkit_check_authorization(const char *dbus_name, const char *action_id)
-{
- g_type_init();
- PolkitSubject *subject = polkit_system_bus_name_new(dbus_name);
- return do_check(subject, action_id);
-}
-
-PolkitResult polkit_check_authorization(pid_t pid, const char *action_id)
-{
- g_type_init();
- PolkitSubject *subject = polkit_unix_process_new(pid);
- return do_check(subject, action_id);
-}
diff --git a/src/lib/Polkit.h b/src/lib/Polkit.h
deleted file mode 100644
index d9e097ac..00000000
--- a/src/lib/Polkit.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- Polkit.h - header file for PolicyKit integration
-
- Copyright (C) 2009 Daniel Novotny (dnovotny@redhat.com)
- Copyright (C) 2009 RedHat inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#ifndef ABRT_POLKIT_H
-#define ABRT_POLKIT_H
-
-#include <sys/types.h>
-#include <unistd.h>
-
-typedef enum {
-/* Authorization status is unknown */
- PolkitUnknown = 0x0,
- /* Subject is authorized for the action */
- PolkitYes = 0x01,
- /* Subject is not authorized for the action */
- PolkitNo = 0x02,
- /* Challenge is needed for this action, only when flag is
- * POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE */
- PolkitChallenge = 0x03
-} PolkitResult;
-
-PolkitResult polkit_check_authorization(const char *dbus_name, const char *action_id);
-PolkitResult polkit_check_authorization(pid_t pid, const char *action_id);
-
-#endif
diff --git a/src/plugins/CCpp.cpp b/src/plugins/CCpp.cpp
index fad9cf62..9f03d947 100644
--- a/src/plugins/CCpp.cpp
+++ b/src/plugins/CCpp.cpp
@@ -23,7 +23,6 @@
#include "CCpp.h"
#include "abrt_exception.h"
#include "comm_layer_inner.h"
-#include "Polkit.h"
using namespace std;