rpms/DeviceKit-disks/F-12 0001-Actually-inhibit-the-daemon-when-Inhibit-is-called.patch, NONE, 1.1 DeviceKit-disks.spec, 1.35, 1.36
David Zeuthen
davidz at fedoraproject.org
Mon Oct 5 19:01:43 UTC 2009
Author: davidz
Update of /cvs/pkgs/rpms/DeviceKit-disks/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9077
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-4%{?dist}
- Rebuild
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/F-12/DeviceKit-disks.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- DeviceKit-disks.spec 5 Oct 2009 18:55:35 -0000 1.35
+++ DeviceKit-disks.spec 5 Oct 2009 19:01:42 -0000 1.36
@@ -12,7 +12,7 @@
Summary: Disk Management Service
Name: DeviceKit-disks
Version: 007
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/
@@ -143,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-4%{?dist}
+- Rebuild
+
* Mon Oct 05 2009 David Zeuthen <davidz at redhat.com> - 007-3%{?dist}
- Rebuild
More information about the fedora-extras-commits
mailing list