rpms/polkit/devel 0001-Fix-process-start-time-when-using-polkit_unix_proces.patch, NONE, 1.1 polkit.spec, 1.11, 1.12

David Zeuthen davidz at fedoraproject.org
Mon Sep 14 17:41:42 UTC 2009


Author: davidz

Update of /cvs/pkgs/rpms/polkit/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29595

Modified Files:
	polkit.spec 
Added Files:
	0001-Fix-process-start-time-when-using-polkit_unix_proces.patch 
Log Message:
* Mon Sep 14 2009 David Zeuthen <davidz at redhat.com> - 0.95-0.git20090913.1
- Add bugfix for polkit_unix_process_new_full() (thanks Bastien Nocera)
- Obsolete old PolicyKit packages



0001-Fix-process-start-time-when-using-polkit_unix_proces.patch:
 polkitunixprocess.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE 0001-Fix-process-start-time-when-using-polkit_unix_proces.patch ---
>From 50385761decb0a5a79c6cdc975b427c5918d7de3 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Mon, 14 Sep 2009 13:10:27 -0400
Subject: [PATCH] Fix process start time when using polkit_unix_process_new_full()

When using polkit_unix_process_new_full() the start-time
wasn't being set from the process' PID if it wasn't
passed to the function.

Signed-off-by: David Zeuthen <davidz at redhat.com>
---
 src/polkit/polkitunixprocess.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c
index c690077..e132387 100644
--- a/src/polkit/polkitunixprocess.c
+++ b/src/polkit/polkitunixprocess.c
@@ -157,7 +157,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass)
                                    g_param_spec_int ("pid",
                                                      "Process ID",
                                                      "The UNIX process ID",
-                                                     0,
+                                                     -1,
                                                      G_MAXINT,
                                                      0,
                                                      G_PARAM_CONSTRUCT |
@@ -323,7 +323,10 @@ polkit_unix_process_new_full (gint pid,
 
   process = POLKIT_UNIX_PROCESS (polkit_unix_process_new ((gint) -1));
   process->pid = pid;
-  process->start_time = start_time;
+  if (start_time != 0)
+    process->start_time = start_time;
+  else
+    process->start_time = get_start_time_for_pid (pid, NULL);
 
   return POLKIT_SUBJECT (process);
 }
-- 
1.6.4.2



Index: polkit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/polkit/devel/polkit.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- polkit.spec	13 Sep 2009 19:52:31 -0000	1.11
+++ polkit.spec	14 Sep 2009 17:41:41 -0000	1.12
@@ -1,7 +1,7 @@
 Summary: PolicyKit Authorization Framework
 Name: polkit
 Version: 0.95
-Release: 0.git20090913%{?dist}
+Release: 0.git20090913.1%{?dist}
 License: LGPLv2+
 URL: http://www.freedesktop.org/wiki/Software/PolicyKit
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.git20090913.tar.gz
@@ -18,6 +18,10 @@ BuildRequires: gobject-introspection-dev
 Requires: ConsoleKit
 Requires: dbus
 
+Obsoletes: PolicyKit
+
+Patch0: 0001-Fix-process-start-time-when-using-polkit_unix_proces.patch
+
 %description
 PolicyKit is a toolkit for defining and handling authorizations.
 It is used for allowing unprivileged processes to speak to privileged
@@ -56,6 +60,7 @@ Roles and default policy for desktop usa
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --enable-gtk-doc --disable-static --libexecdir=%{_libexecdir}/polkit-1 --enable-introspection --enable-examples
@@ -178,6 +183,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Mon Sep 14 2009 David Zeuthen <davidz at redhat.com> - 0.95-0.git20090913.1
+- Add bugfix for polkit_unix_process_new_full() (thanks Bastien Nocera)
+- Obsolete old PolicyKit packages
+
 * Sun Sep 13 2009 David Zeuthen <davidz at redhat.com> - 0.95-0.git20090913
 - Update to git snapshot
 - Drop upstreamed patches




More information about the fedora-extras-commits mailing list