summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-09-10 14:12:42 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-09-10 14:12:42 +0200
commit289865b77fdcf4eb5e231e75cdca1c5495bfd8e7 (patch)
tree339d90bfcf91731acca1a3de71ca7aa8e07a9cc0 /src/Daemon
parent2888ad1ee804e8ef1b74f0e09d8297175ee2e7a0 (diff)
downloadabrt-289865b77fdcf4eb5e231e75cdca1c5495bfd8e7.tar.gz
abrt-289865b77fdcf4eb5e231e75cdca1c5495bfd8e7.tar.xz
abrt-289865b77fdcf4eb5e231e75cdca1c5495bfd8e7.zip
fixed polkit to remember the autorization
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/PluginManager.cpp4
-rw-r--r--src/Daemon/Settings.cpp2
-rw-r--r--src/Daemon/org.fedoraproject.abrt.policy37
3 files changed, 12 insertions, 31 deletions
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 412a1868..be14f4ba 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -233,7 +233,7 @@ void CPluginManager::RegisterPluginDBUS(const std::string& pName,
const char * pDBUSSender)
{
int polkit_result = polkit_check_authorization(pDBUSSender,
- "org.fedoraproject.abrt.register-plugin");
+ "org.fedoraproject.abrt.change-daemon-settings");
if (polkit_result == PolkitYes)
{
RegisterPlugin(pName);
@@ -263,7 +263,7 @@ void CPluginManager::UnRegisterPluginDBUS(const std::string& pName,
const char * pDBUSSender)
{
int polkit_result = polkit_check_authorization(pDBUSSender,
- "org.fedoraproject.abrt.unregister-plugin");
+ "org.fedoraproject.abrt.change-daemon-settings");
if (polkit_result == PolkitYes)
{
UnRegisterPlugin(pName);
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 436334ae..90c8916c 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -431,7 +431,7 @@ 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.save-settings");
+ "org.fedoraproject.abrt.change-daemon-settings");
if (polkit_result != PolkitYes)
{
log("user %s not authorized, returned %d", dbus_sender, polkit_result);
diff --git a/src/Daemon/org.fedoraproject.abrt.policy b/src/Daemon/org.fedoraproject.abrt.policy
index 39b0ef21..43ebf1ff 100644
--- a/src/Daemon/org.fedoraproject.abrt.policy
+++ b/src/Daemon/org.fedoraproject.abrt.policy
@@ -12,35 +12,16 @@ Copyright (c) 2009 Red Hat inc.
-->
<policyconfig>
-
- <action id="org.fedoraproject.abrt.save-settings">
- <description>Save settings</description>
- <message>Saving global settings requires authentication</message>
- <defaults>
- <allow_any>auth_admin</allow_any>
- <allow_active>auth_admin</allow_active>
- <allow_inactive>auth_admin</allow_inactive>
- </defaults>
- </action>
-
- <action id="org.fedoraproject.abrt.register-plugin">
- <description>Register plugin</description>
- <message>Registering a plugin requires authentication</message>
+ <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>auth_admin</allow_any>
- <allow_active>auth_admin</allow_active>
- <allow_inactive>auth_admin</allow_inactive>
+ <allow_any>no</allow_any>
+ <allow_active>auth_admin_keep</allow_active>
+ <allow_inactive>no</allow_inactive>
</defaults>
</action>
-
- <action id="org.fedoraproject.abrt.unregister-plugin">
- <description>Unregister plugin</description>
- <message>Unregistering a plugin requires authentication</message>
- <defaults>
- <allow_any>auth_admin</allow_any>
- <allow_active>auth_admin</allow_active>
- <allow_inactive>auth_admin</allow_inactive>
- </defaults>
- </action>
-
</policyconfig>