summaryrefslogtreecommitdiff
path: root/source/l/polkit
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/polkit')
-rw-r--r--source/l/polkit/0001-Fix-a-memory-leak-of-PolkitAgentListener-s-Server-ob.patch27
-rw-r--r--source/l/polkit/0004-polkit-Add-g_autoptr-support-for-GObject-derived-pol.patch49
-rw-r--r--source/l/polkit/0005-data-Set-GIO_USE_VFS-local-in-the-environment.patch127
-rw-r--r--source/l/polkit/0015-polkitpermission-Fix-a-memory-leak-on-authority-chan.patch28
-rwxr-xr-xsource/l/polkit/polkit.SlackBuild9
5 files changed, 2 insertions, 238 deletions
diff --git a/source/l/polkit/0001-Fix-a-memory-leak-of-PolkitAgentListener-s-Server-ob.patch b/source/l/polkit/0001-Fix-a-memory-leak-of-PolkitAgentListener-s-Server-ob.patch
deleted file mode 100644
index 1d319fd6..00000000
--- a/source/l/polkit/0001-Fix-a-memory-leak-of-PolkitAgentListener-s-Server-ob.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f529fa4ac03f491678c7520d7a2d1c05491feab1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= <mitr@redhat.com>
-Date: Sat, 12 Mar 2016 03:40:20 +0100
-Subject: [PATCH 01/16] Fix a memory leak of PolkitAgentListener's Server
- object
-
-https://bugs.freedesktop.org/show_bug.cgi?id=94506
----
- src/polkitagent/polkitagentlistener.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c
-index 491e4b9..4704b03 100644
---- a/src/polkitagent/polkitagentlistener.c
-+++ b/src/polkitagent/polkitagentlistener.c
-@@ -129,6 +129,8 @@ server_free (Server *server)
- g_object_unref (server->subject);
-
- g_free (server->object_path);
-+
-+ g_free (server);
- }
-
- static gboolean
---
-2.13.0
-
diff --git a/source/l/polkit/0004-polkit-Add-g_autoptr-support-for-GObject-derived-pol.patch b/source/l/polkit/0004-polkit-Add-g_autoptr-support-for-GObject-derived-pol.patch
deleted file mode 100644
index b3bf1056..00000000
--- a/source/l/polkit/0004-polkit-Add-g_autoptr-support-for-GObject-derived-pol.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 004bd37d0b33eb39372bd0e0bed8ab9c1ac2c50c Mon Sep 17 00:00:00 2001
-From: Philip Withnall <philip.withnall@collabora.co.uk>
-Date: Fri, 22 Apr 2016 12:34:18 +0100
-Subject: [PATCH 04/16] polkit: Add g_autoptr() support for GObject-derived
- polkit types
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Add G_DEFINE_AUTOPTR_CLEANUP_FUNC calls to polkittypes.h, so that
-g_autoptr() can be used with polkit objects.
-
-This is conditional on GLib ≥ 2.44.0 being available. It does not bump
-polkit’s dependency on GLib.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=95065
----
- src/polkit/polkittypes.h | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/src/polkit/polkittypes.h b/src/polkit/polkittypes.h
-index 3de1778..e0cf653 100644
---- a/src/polkit/polkittypes.h
-+++ b/src/polkit/polkittypes.h
-@@ -64,4 +64,21 @@ typedef struct _PolkitTemporaryAuthorization PolkitTemporaryAuthorization;
- struct _PolkitPermission;
- typedef struct _PolkitPermission PolkitPermission;
-
-+#if GLIB_CHECK_VERSION(2, 44, 0)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAuthority, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitActionDescription, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitSubject, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitUnixProcess, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitUnixSession, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitSystemBusName, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitIdentity, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitUnixUser, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitUnixGroup, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitUnixNetgroup, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAuthorizationResult, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitDetails, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitTemporaryAuthorization, g_object_unref)
-+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitPermission, g_object_unref)
-+#endif
-+
- #endif /* __POLKIT_TYPES_H */
---
-2.13.0
-
diff --git a/source/l/polkit/0005-data-Set-GIO_USE_VFS-local-in-the-environment.patch b/source/l/polkit/0005-data-Set-GIO_USE_VFS-local-in-the-environment.patch
deleted file mode 100644
index b5d8ae0f..00000000
--- a/source/l/polkit/0005-data-Set-GIO_USE_VFS-local-in-the-environment.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From daf3d5c2d15466a267221fcb099c59c870098e03 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <philip.withnall@collabora.co.uk>
-Date: Thu, 19 May 2016 10:08:08 +0100
-Subject: [PATCH 05/16] data: Set GIO_USE_VFS=local in the environment
-
-There is no need for polkit to ever use GVFS to load files from
-non-local sources, so it's best to avoid loading GVFS code, and to just
-rely on the local implementation in GIO instead. This reduces the attack
-surface of polkit.
-
-Implemented for the daemon, pkaction, pkcheck, pkexec and pkttyagent,
-because none of them need remote file access.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=95487
----
- src/polkitbackend/polkitd.c | 4 ++++
- src/programs/pkaction.c | 4 ++++
- src/programs/pkcheck.c | 4 ++++
- src/programs/pkexec.c | 3 +++
- src/programs/pkttyagent.c | 4 ++++
- 5 files changed, 19 insertions(+)
-
-diff --git a/src/polkitbackend/polkitd.c b/src/polkitbackend/polkitd.c
-index d1527fb..8d54ed7 100644
---- a/src/polkitbackend/polkitd.c
-+++ b/src/polkitbackend/polkitd.c
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <signal.h>
-+#include <stdlib.h>
-
- #include <glib-unix.h>
-
-@@ -169,6 +170,9 @@ main (int argc,
- sigint_id = 0;
- registration_id = NULL;
-
-+ /* Disable remote file access from GIO. */
-+ setenv ("GIO_USE_VFS", "local", 1);
-+
- g_type_init ();
-
- opt_context = g_option_context_new ("polkit system daemon");
-diff --git a/src/programs/pkaction.c b/src/programs/pkaction.c
-index f17a7dc..221662a 100644
---- a/src/programs/pkaction.c
-+++ b/src/programs/pkaction.c
-@@ -24,6 +24,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <glib/gi18n.h>
- #include <polkit/polkit.h>
-
-@@ -121,6 +122,9 @@ main (int argc, char *argv[])
- actions = NULL;
- ret = 1;
-
-+ /* Disable remote file access from GIO. */
-+ setenv ("GIO_USE_VFS", "local", 1);
-+
- g_type_init ();
-
- opt_show_version = FALSE;
-diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c
-index 5781893..33db128 100644
---- a/src/programs/pkcheck.c
-+++ b/src/programs/pkcheck.c
-@@ -24,6 +24,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <glib/gi18n.h>
- #include <polkit/polkit.h>
- #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
-@@ -362,6 +363,9 @@ main (int argc, char *argv[])
- local_agent_handle = NULL;
- ret = 126;
-
-+ /* Disable remote file access from GIO. */
-+ setenv ("GIO_USE_VFS", "local", 1);
-+
- g_type_init ();
-
- details = polkit_details_new ();
-diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
-index 50de92c..3b29b24 100644
---- a/src/programs/pkexec.c
-+++ b/src/programs/pkexec.c
-@@ -503,6 +503,9 @@ main (int argc, char *argv[])
- opt_user = NULL;
- local_agent_handle = NULL;
-
-+ /* Disable remote file access from GIO. */
-+ setenv ("GIO_USE_VFS", "local", 1);
-+
- /* check for correct invocation */
- if (geteuid () != 0)
- {
-diff --git a/src/programs/pkttyagent.c b/src/programs/pkttyagent.c
-index 423b728..8aac7dd 100644
---- a/src/programs/pkttyagent.c
-+++ b/src/programs/pkttyagent.c
-@@ -24,6 +24,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <glib/gi18n.h>
- #include <polkit/polkit.h>
- #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
-@@ -74,6 +75,9 @@ main (int argc, char *argv[])
- guint ret = 126;
- GVariantBuilder builder;
-
-+ /* Disable remote file access from GIO. */
-+ setenv ("GIO_USE_VFS", "local", 1);
-+
- g_type_init ();
-
- error = NULL;
---
-2.13.0
-
diff --git a/source/l/polkit/0015-polkitpermission-Fix-a-memory-leak-on-authority-chan.patch b/source/l/polkit/0015-polkitpermission-Fix-a-memory-leak-on-authority-chan.patch
deleted file mode 100644
index 24e4bc46..00000000
--- a/source/l/polkit/0015-polkitpermission-Fix-a-memory-leak-on-authority-chan.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From df6488c0a5b2a6c7a2d4f6a55008263635c5571b Mon Sep 17 00:00:00 2001
-From: Rui Matos <tiagomatos@gmail.com>
-Date: Thu, 2 Mar 2017 14:50:31 +0100
-Subject: [PATCH 15/16] polkitpermission: Fix a memory leak on authority
- changes
-
-Signed-off-by: Rui Matos <tiagomatos@gmail.com>
-
-https://bugs.freedesktop.org/show_bug.cgi?id=99741
----
- src/polkit/polkitpermission.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/polkit/polkitpermission.c b/src/polkit/polkitpermission.c
-index f8a666e..f264094 100644
---- a/src/polkit/polkitpermission.c
-+++ b/src/polkit/polkitpermission.c
-@@ -454,6 +454,7 @@ changed_check_cb (GObject *source_object,
- if (result != NULL)
- {
- process_result (permission, result);
-+ g_object_unref (result);
- }
- else
- {
---
-2.13.0
-
diff --git a/source/l/polkit/polkit.SlackBuild b/source/l/polkit/polkit.SlackBuild
index 372a5d60..97f1218b 100755
--- a/source/l/polkit/polkit.SlackBuild
+++ b/source/l/polkit/polkit.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=polkit
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -82,12 +82,6 @@ find . \
zcat $CWD/dont-set-wheel-group-as-admin.diff.gz | patch -p1 || exit 1
-# Add some patches from git
-zcat $CWD/0001-Fix-a-memory-leak-of-PolkitAgentListener-s-Server-ob.patch | patch -p1 || exit 1
-zcat $CWD/0004-polkit-Add-g_autoptr-support-for-GObject-derived-pol.patch | patch -p1 || exit 1
-zcat $CWD/0005-data-Set-GIO_USE_VFS-local-in-the-environment.patch | patch -p1 || exit 1
-zcat $CWD/0015-polkitpermission-Fix-a-memory-leak-on-authority-chan.patch | patch -p1 || exit 1
-
# If we get here and don't have a polkitd user/group, add one.
# Otherwise a few directories in the package will have wrong permissions.
if ! grep -q "^polkitd:" /etc/passwd ; then
@@ -110,6 +104,7 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-examples \
--enable-introspection \
--enable-libsystemd-login=no \
+ --enable-libelogind=no \
--with-authfw=shadow \
--enable-verbose-mode \
--with-os-type=Slackware \