Resolve merge conflicts
This commit is contained in:
commit
3f5e8d36b5
|
@ -5,3 +5,4 @@ polkit-0.95.git20090913.tar.gz
|
||||||
polkit-0.95.tar.gz
|
polkit-0.95.tar.gz
|
||||||
polkit-0.96.tar.gz
|
polkit-0.96.tar.gz
|
||||||
polkit-0.97.tar.gz
|
polkit-0.97.tar.gz
|
||||||
|
polkit-0.98.tar.gz
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
From 17f0600529dc926ae4a0c85dc56c393cc09e4011 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Thu, 12 Aug 2010 20:49:25 +0000
|
|
||||||
Subject: Fix scanning of unix-process subjects
|
|
||||||
|
|
||||||
In particular accept both "unix-process:<pid>,<starttime>" and
|
|
||||||
"unix-process:<pid>". For the latter, return an error if we cannot
|
|
||||||
lookup the starttime (for example if the given pid references a
|
|
||||||
non-existing process).
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c
|
|
||||||
index 19d60b9..51e60e0 100644
|
|
||||||
--- a/src/polkit/polkitsubject.c
|
|
||||||
+++ b/src/polkit/polkitsubject.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
|
|
||||||
#include "polkitsubject.h"
|
|
||||||
#include "polkitunixprocess.h"
|
|
||||||
@@ -222,8 +223,6 @@ polkit_subject_from_string (const gchar *str,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
PolkitSubject *subject;
|
|
||||||
- guint64 val;
|
|
||||||
- gchar *endptr;
|
|
||||||
|
|
||||||
g_return_val_if_fail (str != NULL, NULL);
|
|
||||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
|
||||||
@@ -234,12 +233,15 @@ polkit_subject_from_string (const gchar *str,
|
|
||||||
|
|
||||||
if (g_str_has_prefix (str, "unix-process:"))
|
|
||||||
{
|
|
||||||
- val = g_ascii_strtoull (str + sizeof "unix-process:" - 1,
|
|
||||||
- &endptr,
|
|
||||||
- 10);
|
|
||||||
- if (*endptr == '\0')
|
|
||||||
+ gint scanned_pid;
|
|
||||||
+ guint64 scanned_starttime;
|
|
||||||
+ if (sscanf (str, "unix-process:%d:%" G_GUINT64_FORMAT, &scanned_pid, &scanned_starttime) == 2)
|
|
||||||
{
|
|
||||||
- subject = polkit_unix_process_new ((gint) val);
|
|
||||||
+ subject = polkit_unix_process_new_full (scanned_pid, scanned_starttime);
|
|
||||||
+ }
|
|
||||||
+ else if (sscanf (str, "unix-process:%d", &scanned_pid) == 1)
|
|
||||||
+ {
|
|
||||||
+ subject = polkit_unix_process_new_full (scanned_pid, 0);
|
|
||||||
if (polkit_unix_process_get_start_time (POLKIT_UNIX_PROCESS (subject)) == 0)
|
|
||||||
{
|
|
||||||
g_object_unref (subject);
|
|
||||||
@@ -247,8 +249,8 @@ polkit_subject_from_string (const gchar *str,
|
|
||||||
g_set_error (error,
|
|
||||||
POLKIT_ERROR,
|
|
||||||
POLKIT_ERROR_FAILED,
|
|
||||||
- "No process with pid %" G_GUINT64_FORMAT,
|
|
||||||
- val);
|
|
||||||
+ "Unable to determine start time for process with pid %d",
|
|
||||||
+ scanned_pid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -266,7 +268,7 @@ polkit_subject_from_string (const gchar *str,
|
|
||||||
g_set_error (error,
|
|
||||||
POLKIT_ERROR,
|
|
||||||
POLKIT_ERROR_FAILED,
|
|
||||||
- "Malformed subject string '%s'",
|
|
||||||
+ "Malformed subject string `%s'",
|
|
||||||
str);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
cgit v0.8.3-6-g21f6
|
|
16
polkit.spec
16
polkit.spec
|
@ -1,7 +1,7 @@
|
||||||
Summary: PolicyKit Authorization Framework
|
Summary: PolicyKit Authorization Framework
|
||||||
Name: polkit
|
Name: polkit
|
||||||
Version: 0.97
|
Version: 0.98
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.freedesktop.org/wiki/Software/PolicyKit
|
URL: http://www.freedesktop.org/wiki/Software/PolicyKit
|
||||||
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
|
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
|
||||||
|
@ -23,13 +23,6 @@ Provides: PolicyKit = 0.11
|
||||||
# sufficiently new polkit-gnome package
|
# sufficiently new polkit-gnome package
|
||||||
Conflicts: polkit-gnome < 0.97
|
Conflicts: polkit-gnome < 0.97
|
||||||
|
|
||||||
# upstream
|
|
||||||
Patch0: polkit-0.97-subject-scanning.patch
|
|
||||||
|
|
||||||
# Upstream fix
|
|
||||||
Patch1: 0001-Fix-ConsoleKit-interaction-bug.patch
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PolicyKit is a toolkit for defining and handling authorizations.
|
PolicyKit is a toolkit for defining and handling authorizations.
|
||||||
It is used for allowing unprivileged processes to speak to privileged
|
It is used for allowing unprivileged processes to speak to privileged
|
||||||
|
@ -72,8 +65,6 @@ Roles and default policy for desktop usage.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .subject-scanning
|
|
||||||
%patch1 -p1 -b .ck-interaction
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-gtk-doc --disable-static --libexecdir=%{_libexecdir}/polkit-1 --disable-introspection --enable-examples
|
%configure --enable-gtk-doc --disable-static --libexecdir=%{_libexecdir}/polkit-1 --disable-introspection --enable-examples
|
||||||
|
@ -191,6 +182,9 @@ EOF
|
||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 20 2010 David Zeuthen <davidz@redhat.com> - 0.98-1
|
||||||
|
- Update to upstream release 0.98
|
||||||
|
|
||||||
* Wed Aug 18 2010 Matthias Clasen <mclasen@redhat.com> - 0.97-5
|
* Wed Aug 18 2010 Matthias Clasen <mclasen@redhat.com> - 0.97-5
|
||||||
- Rebuid to work around bodhi limitations
|
- Rebuid to work around bodhi limitations
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue