Update to upstream release 0.108
- Drop upstreamed patches - This release dynamically loads the JavaScript interpreter and can cope with it not being available. In this case, polkit authorization rules are not processed and the defaults for an action - as defined in its .policy file - are used for authorization decisions. - Add new meta-package, polkit-js-engine, that pulls in the required JavaScript bits to make polkit authorization rules work. The default install - not the minimal install - should include this package
This commit is contained in:
parent
b885f75196
commit
b0678ca050
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ polkit-0.98.tar.gz
|
|||||||
/polkit-0.105.tar.gz
|
/polkit-0.105.tar.gz
|
||||||
/polkit-0.106.tar.gz
|
/polkit-0.106.tar.gz
|
||||||
/polkit-0.107.tar.gz
|
/polkit-0.107.tar.gz
|
||||||
|
/polkit-0.108.tar.gz
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From 59f2d96ce3ac63173669f299a9453a7bf5e70a70 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Jackson <ajax@nwnk.net>
|
|
||||||
Date: Tue, 09 Oct 2012 18:08:24 +0000
|
|
||||||
Subject: PolkitAgent: Avoid crashing if initializing the server object fails
|
|
||||||
|
|
||||||
Note that otherwise we return a freed server object. Since later in
|
|
||||||
polkit_agent_listener_register_with_options we check against NULL to
|
|
||||||
determine failure, this makes for sad times later when we call
|
|
||||||
server_free() on it again.
|
|
||||||
|
|
||||||
https://bugs.freedesktop.org/show_bug.cgi?id=55776
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
|
|
||||||
---
|
|
||||||
diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c
|
|
||||||
index 0d97501..5bddd03 100644
|
|
||||||
--- a/src/polkitagent/polkitagentlistener.c
|
|
||||||
+++ b/src/polkitagent/polkitagentlistener.c
|
|
||||||
@@ -260,10 +260,9 @@ server_new (PolkitSubject *subject,
|
|
||||||
if (!server_init_sync (server, cancellable, error))
|
|
||||||
{
|
|
||||||
server_free (server);
|
|
||||||
- goto out;
|
|
||||||
+ return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- out:
|
|
||||||
return server;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
cgit v0.9.0.2-2-gbebe
|
|
@ -1,52 +0,0 @@
|
|||||||
From fa04223240d46641b0773dbf9f7d72f529046bea Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Zeuthen <zeuthen@gmail.com>
|
|
||||||
Date: Tue, 18 Sep 2012 14:47:06 -0400
|
|
||||||
Subject: [PATCH] Fall back to authenticating as uid 0 if the list of admin
|
|
||||||
identities is empty
|
|
||||||
|
|
||||||
For example, this can happen if the wheel group has no members. This
|
|
||||||
was reported in Red Hat bug 834494, see
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=834494
|
|
||||||
|
|
||||||
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
|
|
||||||
---
|
|
||||||
src/polkitbackend/polkitbackendinteractiveauthority.c | 12 ++++++------
|
|
||||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
|
|
||||||
index 1d4a555..3bd2f0b 100644
|
|
||||||
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
|
|
||||||
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
|
|
||||||
@@ -1293,15 +1293,11 @@ polkit_backend_interactive_authority_get_admin_identities (PolkitBackendInteract
|
|
||||||
PolkitDetails *details)
|
|
||||||
{
|
|
||||||
PolkitBackendInteractiveAuthorityClass *klass;
|
|
||||||
- GList *ret;
|
|
||||||
+ GList *ret = NULL;
|
|
||||||
|
|
||||||
klass = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_CLASS (authority);
|
|
||||||
|
|
||||||
- if (klass->get_admin_identities == NULL)
|
|
||||||
- {
|
|
||||||
- ret = g_list_prepend (NULL, polkit_unix_user_new (0));
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
+ if (klass->get_admin_identities != NULL)
|
|
||||||
{
|
|
||||||
ret = klass->get_admin_identities (authority,
|
|
||||||
caller,
|
|
||||||
@@ -2257,6 +2253,10 @@ authentication_agent_initiate_challenge (AuthenticationAgent *agent,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Fall back to uid 0 if no users are available (rhbz #834494) */
|
|
||||||
+ if (user_identities == NULL)
|
|
||||||
+ user_identities = g_list_prepend (NULL, polkit_unix_user_new (0));
|
|
||||||
+
|
|
||||||
session = authentication_session_new (agent,
|
|
||||||
cookie,
|
|
||||||
subject,
|
|
||||||
--
|
|
||||||
1.7.12
|
|
||||||
|
|
39
polkit.spec
39
polkit.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: polkit Authorization Framework
|
Summary: polkit Authorization Framework
|
||||||
Name: polkit
|
Name: polkit
|
||||||
Version: 0.107
|
Version: 0.108
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.freedesktop.org/wiki/Software/polkit
|
URL: http://www.freedesktop.org/wiki/Software/polkit
|
||||||
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
|
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
|
||||||
@ -29,9 +29,6 @@ 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: polkit-0.107-fall-back-to-uid0-if-no-admin-users-are-available.patch
|
|
||||||
Patch1: polkit-0.107-avoid-crashing-if-initializing-the-server-object-fails.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
polkit is a toolkit for defining and handling authorizations. It is
|
polkit is a toolkit for defining and handling authorizations. It is
|
||||||
used for allowing unprivileged processes to speak to privileged
|
used for allowing unprivileged processes to speak to privileged
|
||||||
@ -60,10 +57,17 @@ BuildArch: noarch
|
|||||||
%description docs
|
%description docs
|
||||||
Development documentation for polkit.
|
Development documentation for polkit.
|
||||||
|
|
||||||
|
%package js-engine
|
||||||
|
Summary: Meta-package for JavaScript engine used by polkit
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %name = %{version}-%{release}
|
||||||
|
Requires: js
|
||||||
|
|
||||||
|
%description js-engine
|
||||||
|
Meta-package for JavaScript engine used by polkit.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .fall-back-to-uid-0
|
|
||||||
%patch1 -p1 -b .crash-fix
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-gtk-doc \
|
%configure --enable-gtk-doc \
|
||||||
@ -79,6 +83,12 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la
|
rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/polkit-js-engine-%{version}
|
||||||
|
cat > $RPM_BUILD_ROOT%{_datadir}/doc/polkit-js-engine-%{version}/README << EOF
|
||||||
|
This is a meta-package to pull in the required JavaScript packages to
|
||||||
|
make polkit authorization rules work.
|
||||||
|
EOF
|
||||||
|
|
||||||
%find_lang polkit-1
|
%find_lang polkit-1
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -131,7 +141,22 @@ exit 0
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_datadir}/gtk-doc
|
%{_datadir}/gtk-doc
|
||||||
|
|
||||||
|
%files js-engine
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_datadir}/doc/polkit-js-engine-%{version}/README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 14 2012 David Zeuthen <davidz@redhat.com> 0.108-1%{?dist}
|
||||||
|
- Update to upstream release 0.108
|
||||||
|
- Drop upstreamed patches
|
||||||
|
- This release dynamically loads the JavaScript interpreter and can
|
||||||
|
cope with it not being available. In this case, polkit authorization
|
||||||
|
rules are not processed and the defaults for an action - as defined
|
||||||
|
in its .policy file - are used for authorization decisions.
|
||||||
|
- Add new meta-package, polkit-js-engine, that pulls in the required
|
||||||
|
JavaScript bits to make polkit authorization rules work. The default
|
||||||
|
install - not the minimal install - should include this package
|
||||||
|
|
||||||
* Wed Oct 10 2012 Adam Jackson <ajax@redhat.com> 0.107-4
|
* Wed Oct 10 2012 Adam Jackson <ajax@redhat.com> 0.107-4
|
||||||
- Don't crash if initializing the server object fails
|
- Don't crash if initializing the server object fails
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user