From b0678ca050bf03222cb7cbfac3f29195d86218da Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 14 Nov 2012 14:15:33 -0500 Subject: [PATCH] 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 --- .gitignore | 1 + ...initializing-the-server-object-fails.patch | 32 ------------ ...uid0-if-no-admin-users-are-available.patch | 52 ------------------- polkit.spec | 39 +++++++++++--- sources | 2 +- 5 files changed, 34 insertions(+), 92 deletions(-) delete mode 100644 polkit-0.107-avoid-crashing-if-initializing-the-server-object-fails.patch delete mode 100644 polkit-0.107-fall-back-to-uid0-if-no-admin-users-are-available.patch diff --git a/.gitignore b/.gitignore index 392e1a9..315fd32 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ polkit-0.98.tar.gz /polkit-0.105.tar.gz /polkit-0.106.tar.gz /polkit-0.107.tar.gz +/polkit-0.108.tar.gz diff --git a/polkit-0.107-avoid-crashing-if-initializing-the-server-object-fails.patch b/polkit-0.107-avoid-crashing-if-initializing-the-server-object-fails.patch deleted file mode 100644 index b8c412a..0000000 --- a/polkit-0.107-avoid-crashing-if-initializing-the-server-object-fails.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 59f2d96ce3ac63173669f299a9453a7bf5e70a70 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -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 ---- -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 diff --git a/polkit-0.107-fall-back-to-uid0-if-no-admin-users-are-available.patch b/polkit-0.107-fall-back-to-uid0-if-no-admin-users-are-available.patch deleted file mode 100644 index 37c0bfe..0000000 --- a/polkit-0.107-fall-back-to-uid0-if-no-admin-users-are-available.patch +++ /dev/null @@ -1,52 +0,0 @@ -From fa04223240d46641b0773dbf9f7d72f529046bea Mon Sep 17 00:00:00 2001 -From: David Zeuthen -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 ---- - 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 - diff --git a/polkit.spec b/polkit.spec index e811e84..7cfc73f 100644 --- a/polkit.spec +++ b/polkit.spec @@ -1,7 +1,7 @@ Summary: polkit Authorization Framework Name: polkit -Version: 0.107 -Release: 4%{?dist} +Version: 0.108 +Release: 1%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/polkit 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 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 polkit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged @@ -60,10 +57,17 @@ BuildArch: noarch %description docs 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 %setup -q -%patch0 -p1 -b .fall-back-to-uid-0 -%patch1 -p1 -b .crash-fix %build %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}/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 %pre @@ -131,7 +141,22 @@ exit 0 %defattr(-,root,root,-) %{_datadir}/gtk-doc +%files js-engine +%defattr(-,root,root,-) +%{_datadir}/doc/polkit-js-engine-%{version}/README + %changelog +* Wed Nov 14 2012 David Zeuthen 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 0.107-4 - Don't crash if initializing the server object fails diff --git a/sources b/sources index b923bae..965689a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0e4f9c53f43fd1b25ac3f0d2e09b2ae1 polkit-0.107.tar.gz +55cd17b20030d895a7ecf1b9c9b32fb6 polkit-0.108.tar.gz