Compare commits

...

3 Commits
rawhide ... f25

Author SHA1 Message Date
Richard Hughes 8c7032c5ca Add the its files from upstream 2017-04-14 15:06:39 +01:00
Miloslav Trmač 0b21e639ef Fix memory leaks when calling authentication agents 2017-04-14 15:06:35 +01:00
Fedora Release Engineering f4668001e4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-04-14 15:06:29 +01:00
3 changed files with 151 additions and 2 deletions

View File

@ -0,0 +1,89 @@
commit 7ecf29a9db86f7161e2ff48e7bb8ea46a90f954f
Author: Miloslav Trmač <mitr@redhat.com>
Date: Wed Feb 8 22:57:21 2017 +0100
Fix a memory leak in server_handle_authentication_agent_response{,2}
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c
index 2bcad62..cad3f74 100644
--- a/src/polkitbackend/polkitbackendauthority.c
+++ b/src/polkitbackend/polkitbackendauthority.c
@@ -1054,6 +1054,7 @@ server_handle_authentication_agent_response (Server *server,
g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
out:
+ g_variant_unref (identity_gvariant);
if (identity != NULL)
g_object_unref (identity);
}
@@ -1104,6 +1105,7 @@ server_handle_authentication_agent_response2 (Server *server,
g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
out:
+ g_variant_unref (identity_gvariant);
if (identity != NULL)
g_object_unref (identity);
}
commit d9efd2673d73214e7990e3e67cdddfa77c6a8226
Author: Miloslav Trmač <mitr@redhat.com>
Date: Wed Feb 8 22:55:10 2017 +0100
Fix a memory leak in server_handle_unregister_authentication_agent
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c
index 7e08e57..2bcad62 100644
--- a/src/polkitbackend/polkitbackendauthority.c
+++ b/src/polkitbackend/polkitbackendauthority.c
@@ -1003,6 +1003,7 @@ server_handle_unregister_authentication_agent (Server *server,
g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
out:
+ g_variant_unref (subject_gvariant);
if (subject != NULL)
g_object_unref (subject);
}
commit af4566e1a7e9031b9a05f49c7d27bf379d822016
Author: Miloslav Trmač <mitr@redhat.com>
Date: Thu Feb 9 19:53:54 2017 +0100
Fix a memory leak per agent authentication
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
index bf0ee48..b8096b3 100644
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
@@ -1906,15 +1906,15 @@ authentication_agent_begin_cb (GDBusProxy *proxy,
AuthenticationSession *session = user_data;
gboolean gained_authorization;
gboolean was_dismissed;
+ GVariant *result;
GError *error;
was_dismissed = FALSE;
gained_authorization = FALSE;
error = NULL;
- if (!g_dbus_proxy_call_finish (proxy,
- res,
- &error))
+ result = g_dbus_proxy_call_finish (proxy, res, &error);
+ if (result == NULL)
{
g_printerr ("Error performing authentication: %s (%s %d)\n",
error->message,
@@ -1926,6 +1926,7 @@ authentication_agent_begin_cb (GDBusProxy *proxy,
}
else
{
+ g_variant_unref (result);
gained_authorization = session->is_authenticated;
g_debug ("Authentication complete, is_authenticated = %d", session->is_authenticated);
}

View File

@ -0,0 +1,42 @@
diff --git a/data/Makefile.am b/data/Makefile.am
index fe0f1d5..18693fe 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -36,6 +36,11 @@ pkgconfig_DATA = polkit-gobject-1.pc polkit-agent-1.pc
# ----------------------------------------------------------------------------------------------------
+itsdir = $(datadir)/gettext/its
+its_DATA = polkit.loc polkit.its
+
+# ----------------------------------------------------------------------------------------------------
+
systemdservice_in_files = polkit.service.in
if HAVE_SYSTEMD
diff --git a/data/polkit.its b/data/polkit.its
new file mode 100644
index 0000000..1c37e6b
--- /dev/null
+++ b/data/polkit.its
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
+ version="2.0">
+ <its:translateRule selector="//*" translate="no"/>
+ <its:translateRule selector="//action/description |
+ //action/message"
+ translate="yes"/>
+</its:rules>
diff --git a/data/polkit.loc b/data/polkit.loc
new file mode 100644
index 0000000..c7427ec
--- /dev/null
+++ b/data/polkit.loc
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<locatingRules>
+ <locatingRule name="polkit policy" pattern="*.policy">
+ <documentRule localName="policyconfig" target="polkit.its"/>
+ </locatingRule>
+</locatingRules>

View File

@ -1,16 +1,20 @@
# Only enable if using patches that touches configure.ac,
# Makefile.am or other build system related files
#
#define enable_autoreconf 1
%define enable_autoreconf 1
Summary: An authorization framework
Name: polkit
Version: 0.113
Release: 5%{?dist}
Release: 8%{?dist}
License: LGPLv2+
URL: http://www.freedesktop.org/wiki/Software/polkit
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz.sign
# https://bugs.freedesktop.org/show_bug.cgi?id=99741
Patch0: polkit-0.113-agent-leaks.patch
# already upstream
Patch2: polkit-0.113-itstool.patch
Group: System Environment/Libraries
BuildRequires: glib2-devel >= 2.30.0
BuildRequires: expat-devel
@ -89,6 +93,8 @@ Libraries files for polkit.
%prep
%setup -q
%patch0 -p1 -b .agent-leaks
%patch2 -p1 -b .itstool
%build
%if 0%{?enable_autoreconf}
@ -161,6 +167,8 @@ exit 0
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir
%{_includedir}/*
%{_datadir}/gettext/its/polkit.its
%{_datadir}/gettext/its/polkit.loc
%files docs
%defattr(-,root,root,-)
@ -174,6 +182,16 @@ exit 0
%{_libdir}/girepository-1.0/*.typelib
%changelog
* Thu Apr 13 2017 Richard Hughes <rhughes@redhat.com> - 0.113-8
- Add the its files from upstream.
* Mon Feb 13 2017 Miloslav Trmač <mitr@redhat.com> - 0.113-7
- Fix memory leaks when calling authentication agents
Resolves: #1380166
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.113-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.113-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild