Update to upstream release 0.105
- Nuke patches that are now upstream - Change 'PolicyKit' to 'polkit' in summary and descriptions
This commit is contained in:
parent
7e59d9c3e6
commit
0fee849c09
|
@ -11,3 +11,4 @@ polkit-0.98.tar.gz
|
||||||
/polkit-0.102.tar.gz
|
/polkit-0.102.tar.gz
|
||||||
/polkit-0.103.tar.gz
|
/polkit-0.103.tar.gz
|
||||||
/polkit-0.104.tar.gz
|
/polkit-0.104.tar.gz
|
||||||
|
/polkit-0.105.tar.gz
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
From 4aa6dd28476e12a5265d71b6bc19c730f1036785 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Thu, 8 Mar 2012 15:36:30 -0500
|
|
||||||
Subject: [PATCH] PolkitAgentSession: Don't leak file descriptors
|
|
||||||
|
|
||||||
This was reported here
|
|
||||||
|
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=671486
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
src/polkitagent/polkitagentsession.c | 14 ++++++++++++++
|
|
||||||
1 files changed, 14 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkitagent/polkitagentsession.c b/src/polkitagent/polkitagentsession.c
|
|
||||||
index ad3bbc3..8129cd9 100644
|
|
||||||
--- a/src/polkitagent/polkitagentsession.c
|
|
||||||
+++ b/src/polkitagent/polkitagentsession.c
|
|
||||||
@@ -130,6 +130,8 @@ G_DEFINE_TYPE (PolkitAgentSession, polkit_agent_session, G_TYPE_OBJECT);
|
|
||||||
static void
|
|
||||||
polkit_agent_session_init (PolkitAgentSession *session)
|
|
||||||
{
|
|
||||||
+ session->child_stdin = -1;
|
|
||||||
+ session->child_stdout = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void kill_helper (PolkitAgentSession *session);
|
|
||||||
@@ -395,6 +397,18 @@ kill_helper (PolkitAgentSession *session)
|
|
||||||
session->child_stdout_channel = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (session->child_stdout != -1)
|
|
||||||
+ {
|
|
||||||
+ g_warn_if_fail (close (session->child_stdout) == 0);
|
|
||||||
+ session->child_stdout = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (session->child_stdin != -1)
|
|
||||||
+ {
|
|
||||||
+ g_warn_if_fail (close (session->child_stdin) == 0);
|
|
||||||
+ session->child_stdin = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
session->helper_is_running = FALSE;
|
|
||||||
|
|
||||||
out:
|
|
||||||
--
|
|
||||||
1.7.9.1
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
From 579eb3b0f9addb832ab6aab319b5d9f7d71f2eb8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Mon, 6 Feb 2012 11:24:53 -0500
|
|
||||||
Subject: [PATCH 1/2] PolkitUnixSession: Set error if we cannot find a session
|
|
||||||
for the given pid
|
|
||||||
|
|
||||||
Also, don't treat the integer returned by sd_pid_get_session() as a
|
|
||||||
boolean because that's just confusing. Also, don't confuse memory
|
|
||||||
supposed to be freed by g_free() and free(3) with each other. See
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=787222
|
|
||||||
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
src/polkit/polkitunixsession-systemd.c | 21 ++++++++++++++++-----
|
|
||||||
1 files changed, 16 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
index e7e913f..94a7ee4 100644
|
|
||||||
--- a/src/polkit/polkitunixsession-systemd.c
|
|
||||||
+++ b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "polkitunixsession.h"
|
|
||||||
#include "polkitsubject.h"
|
|
||||||
@@ -450,9 +451,8 @@ polkit_unix_session_initable_init (GInitable *initable,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
PolkitUnixSession *session = POLKIT_UNIX_SESSION (initable);
|
|
||||||
- gboolean ret;
|
|
||||||
-
|
|
||||||
- ret = FALSE;
|
|
||||||
+ gboolean ret = FALSE;
|
|
||||||
+ char *s;
|
|
||||||
|
|
||||||
if (session->session_id != NULL)
|
|
||||||
{
|
|
||||||
@@ -461,8 +461,19 @@ polkit_unix_session_initable_init (GInitable *initable,
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!sd_pid_get_session (session->pid, &session->session_id))
|
|
||||||
- ret = TRUE;
|
|
||||||
+ if (sd_pid_get_session (session->pid, &s) == 0)
|
|
||||||
+ {
|
|
||||||
+ session->session_id = g_strdup (s);
|
|
||||||
+ free (s);
|
|
||||||
+ ret = TRUE;
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_set_error (error,
|
|
||||||
+ POLKIT_ERROR,
|
|
||||||
+ POLKIT_ERROR_FAILED,
|
|
||||||
+ "No session for pid %d",
|
|
||||||
+ (gint) session->pid);
|
|
||||||
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
--
|
|
||||||
1.7.8.4
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
From 414f38ee69155eef8badd6f938953c98ce0c1e76 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <davidz@redhat.com>
|
|
||||||
Date: Mon, 6 Feb 2012 11:26:06 -0500
|
|
||||||
Subject: [PATCH 2/2] PolkitUnixSession: Actually return TRUE if a session
|
|
||||||
exists
|
|
||||||
|
|
||||||
Also, don't treat the integer returned by sd_session_get_uid() as a
|
|
||||||
boolean because that's just confusing.
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
||||||
---
|
|
||||||
src/polkit/polkitunixsession-systemd.c | 12 +++++-------
|
|
||||||
1 files changed, 5 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
index 94a7ee4..8a8bf65 100644
|
|
||||||
--- a/src/polkit/polkitunixsession-systemd.c
|
|
||||||
+++ b/src/polkit/polkitunixsession-systemd.c
|
|
||||||
@@ -361,17 +361,15 @@ polkit_unix_session_to_string (PolkitSubject *subject)
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
polkit_unix_session_exists_sync (PolkitSubject *subject,
|
|
||||||
- GCancellable *cancellable,
|
|
||||||
- GError **error)
|
|
||||||
+ GCancellable *cancellable,
|
|
||||||
+ GError **error)
|
|
||||||
{
|
|
||||||
PolkitUnixSession *session = POLKIT_UNIX_SESSION (subject);
|
|
||||||
- gboolean ret;
|
|
||||||
+ gboolean ret = FALSE;
|
|
||||||
uid_t uid;
|
|
||||||
|
|
||||||
- ret = FALSE;
|
|
||||||
-
|
|
||||||
- if (!sd_session_get_uid (session->session_id, &uid))
|
|
||||||
- ret = FALSE;
|
|
||||||
+ if (sd_session_get_uid (session->session_id, &uid) == 0)
|
|
||||||
+ ret = TRUE;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.8.4
|
|
||||||
|
|
33
polkit.spec
33
polkit.spec
|
@ -1,10 +1,10 @@
|
||||||
Summary: PolicyKit Authorization Framework
|
Summary: polkit Authorization Framework
|
||||||
Name: polkit
|
Name: polkit
|
||||||
Version: 0.104
|
Version: 0.105
|
||||||
Release: 6%{?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://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
BuildRequires: glib2-devel >= 2.28.0
|
BuildRequires: glib2-devel >= 2.28.0
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
|
@ -26,17 +26,13 @@ Conflicts: polkit-gnome < 0.97
|
||||||
Obsoletes: polkit-desktop-policy < 0.103
|
Obsoletes: polkit-desktop-policy < 0.103
|
||||||
Provides: polkit-desktop-policy = 0.103
|
Provides: polkit-desktop-policy = 0.103
|
||||||
|
|
||||||
Patch0: 0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch
|
|
||||||
Patch1: 0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch
|
|
||||||
Patch2: 0001-PolkitAgentSession-Don-t-leak-file-descriptors.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PolicyKit is a toolkit for defining and handling authorizations.
|
polkit is a toolkit for defining and handling authorizations. It is
|
||||||
It is used for allowing unprivileged processes to speak to privileged
|
used for allowing unprivileged processes to speak to privileged
|
||||||
processes.
|
processes.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for PolicyKit
|
Summary: Development files for polkit
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %name = %{version}-%{release}
|
Requires: %name = %{version}-%{release}
|
||||||
Requires: %name-docs = %{version}-%{release}
|
Requires: %name-docs = %{version}-%{release}
|
||||||
|
@ -45,10 +41,10 @@ Obsoletes: PolicyKit-devel <= 0.10
|
||||||
Provides: PolicyKit-devel = 0.11
|
Provides: PolicyKit-devel = 0.11
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development files for PolicyKit.
|
Development files for polkit.
|
||||||
|
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Development documentation for PolicyKit
|
Summary: Development documentation for polkit
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %name-devel = %{version}-%{release}
|
Requires: %name-devel = %{version}-%{release}
|
||||||
Obsoletes: PolicyKit-docs <= 0.10
|
Obsoletes: PolicyKit-docs <= 0.10
|
||||||
|
@ -56,13 +52,10 @@ Provides: PolicyKit-docs = 0.11
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description docs
|
%description docs
|
||||||
Development documentation for PolicyKit.
|
Development documentation for polkit.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-gtk-doc \
|
%configure --enable-gtk-doc \
|
||||||
|
@ -103,6 +96,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la
|
||||||
%{_sysconfdir}/polkit-1
|
%{_sysconfdir}/polkit-1
|
||||||
%{_bindir}/pkaction
|
%{_bindir}/pkaction
|
||||||
%{_bindir}/pkcheck
|
%{_bindir}/pkcheck
|
||||||
|
%{_bindir}/pkttyagent
|
||||||
%dir %{_libexecdir}/polkit-1
|
%dir %{_libexecdir}/polkit-1
|
||||||
%{_libexecdir}/polkit-1/polkitd
|
%{_libexecdir}/polkit-1/polkitd
|
||||||
%{_libdir}/girepository-1.0/*.typelib
|
%{_libdir}/girepository-1.0/*.typelib
|
||||||
|
@ -133,6 +127,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la
|
||||||
%{_datadir}/gtk-doc
|
%{_datadir}/gtk-doc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 24 2012 David Zeuthen <davidz@redhat.com> 0.105-1%{?dist}
|
||||||
|
- Update to upstream release 0.105
|
||||||
|
- Nuke patches that are now upstream
|
||||||
|
- Change 'PolicyKit' to 'polkit' in summary and descriptions
|
||||||
|
|
||||||
* Thu Mar 08 2012 David Zeuthen <davidz@redhat.com> 0.104-6%{?dist}
|
* Thu Mar 08 2012 David Zeuthen <davidz@redhat.com> 0.104-6%{?dist}
|
||||||
- Don't leak file descriptors (bgo #671486)
|
- Don't leak file descriptors (bgo #671486)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue