rpms/DeviceKit-disks/devel 0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch, NONE, 1.1 DeviceKit-disks.spec, 1.33, 1.34

David Zeuthen davidz at fedoraproject.org
Mon Oct 5 18:42:20 UTC 2009


Author: davidz

Update of /cvs/pkgs/rpms/DeviceKit-disks/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28025

Modified Files:
	DeviceKit-disks.spec 
Added Files:
	0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch 
Log Message:
* Mon Oct 05 2009 David Zeuthen <davidz at redhat.com> - 007-2%{?dist}
- Actually inhibit the daemon (#527091)



0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch:
 devkit-disks-daemon.c |   10 ++++++++--
 devkit-disks-daemon.h |    3 +--
 2 files changed, 9 insertions(+), 4 deletions(-)

--- NEW FILE 0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch ---
>From e672ccb6917772f2e7f0f4294eb2828193eaa89f Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz at redhat.com>
Date: Mon, 5 Oct 2009 14:31:22 -0400
Subject: [PATCH] Actually inhibit the daemon when Inhibit() is called

Guess this was forgotten with the polkit-1 porting effort.
---
 src/devkit-disks-daemon.c |   10 ++++++++--
 src/devkit-disks-daemon.h |    2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/devkit-disks-daemon.c b/src/devkit-disks-daemon.c
index b8c933b..e3f5bc6 100644
--- a/src/devkit-disks-daemon.c
+++ b/src/devkit-disks-daemon.c
@@ -1288,7 +1288,13 @@ devkit_disks_daemon_local_check_auth (DevkitDisksDaemon            *daemon,
         }
         va_end (va_args);
 
-        if (action_id != NULL) {
+        if (devkit_disks_daemon_local_is_inhibited (daemon)) {
+                throw_error (data->context,
+                             DEVKIT_DISKS_ERROR_INHIBITED,
+                             "Daemon is inhibited");
+                check_auth_data_free (data);
+
+        } else if (action_id != NULL) {
                 PolkitSubject *subject;
                 PolkitDetails *details;
                 PolkitCheckAuthorizationFlags flags;
@@ -1783,7 +1789,7 @@ daemon_inhibitor_disconnected_cb (DevkitDisksInhibitor *inhibitor,
 }
 
 gboolean
-devkit_disks_daemon_local_has_inhibitors (DevkitDisksDaemon *daemon)
+devkit_disks_daemon_local_is_inhibited (DevkitDisksDaemon *daemon)
 {
         return daemon->priv->inhibitors != NULL;
 }
diff --git a/src/devkit-disks-daemon.h b/src/devkit-disks-daemon.h
index dd0a4f0..3164734 100644
--- a/src/devkit-disks-daemon.h
+++ b/src/devkit-disks-daemon.h
@@ -123,7 +123,7 @@ void               devkit_disks_daemon_local_update_spindown     (DevkitDisksDae
 
 gboolean           devkit_disks_daemon_local_has_polling_inhibitors (DevkitDisksDaemon       *daemon);
 
-gboolean           devkit_disks_daemon_local_has_inhibitors (DevkitDisksDaemon       *daemon);
+gboolean           devkit_disks_daemon_local_is_inhibited (DevkitDisksDaemon       *daemon);
 
 DevkitDisksMountMonitor *devkit_disks_daemon_local_get_mount_monitor (DevkitDisksDaemon *daemon);
 
-- 
1.6.5.rc2



Index: DeviceKit-disks.spec
===================================================================
RCS file: /cvs/pkgs/rpms/DeviceKit-disks/devel/DeviceKit-disks.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- DeviceKit-disks.spec	18 Sep 2009 23:55:24 -0000	1.33
+++ DeviceKit-disks.spec	5 Oct 2009 18:42:18 -0000	1.34
@@ -12,7 +12,7 @@
 Summary: Disk Management Service
 Name: DeviceKit-disks
 Version: 007
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: System Environment/Libraries
 URL: http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/
@@ -55,6 +55,8 @@ Requires: mtools
 Requires: ntfsprogs
 %endif
 
+Patch0: 0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch
+
 # for /proc/self/mountinfo, only available in 2.6.26 or higher
 Conflicts: kernel < 2.6.26
 
@@ -74,6 +76,7 @@ D-Bus interface definitions for DeviceKi
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --enable-gtk-doc
@@ -140,6 +143,9 @@ rm -rf $RPM_BUILD_ROOT
 
 # Note: please don't forget the %{?dist} in the changelog. Thanks
 %changelog
+* Mon Oct 05 2009 David Zeuthen <davidz at redhat.com> - 007-2%{?dist}
+- Actually inhibit the daemon (#527091)
+
 * Fri Sep 18 2009 David Zeuthen <davidz at redhat.com> - 007-1%{?dist}
 - Update to release 007
 




More information about the scm-commits mailing list