summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-18 11:33:29 +0100
committerSam James <sam@gentoo.org>2023-08-18 11:33:29 +0100
commit5c7a27dabebe91c15498ac0c652087576cac36ef (patch)
tree50452d975d950ca5ef98ba5a7b4d44f8d21a2528 /sys-auth/polkit/files
parentsys-cluster/galera: depend on check (diff)
downloadgentoo-5c7a27dabebe91c15498ac0c652087576cac36ef.tar.gz
gentoo-5c7a27dabebe91c15498ac0c652087576cac36ef.tar.bz2
gentoo-5c7a27dabebe91c15498ac0c652087576cac36ef.zip
sys-auth/polkit: add 123
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-auth/polkit/files')
-rw-r--r--sys-auth/polkit/files/polkit-123-mozjs-JIT.patch36
-rw-r--r--sys-auth/polkit/files/polkit-123-pkexec-uninitialized.patch35
2 files changed, 71 insertions, 0 deletions
diff --git a/sys-auth/polkit/files/polkit-123-mozjs-JIT.patch b/sys-auth/polkit/files/polkit-123-mozjs-JIT.patch
new file mode 100644
index 000000000000..5b3f2c4a3641
--- /dev/null
+++ b/sys-auth/polkit/files/polkit-123-mozjs-JIT.patch
@@ -0,0 +1,36 @@
+https://gitlab.freedesktop.org/polkit/polkit/-/commit/4b7a5c35fb3dd439e490f8fd6b1265d17c6d4bcb
+
+From 4b7a5c35fb3dd439e490f8fd6b1265d17c6d4bcb Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Sat, 29 Jul 2023 17:44:58 +0800
+Subject: [PATCH] jsauthority: mozjs: Disable JIT
+
+The JIT compiling of mozjs needs W/X mapping, but our systemd hardening
+setting does not allow it.
+
+For polkit, security is much more important than the speed running
+Javascript code in rule files, so we should disable JIT.
+
+Fixes #199.
+--- a/src/polkitbackend/polkitbackendjsauthority.cpp
++++ b/src/polkitbackend/polkitbackendjsauthority.cpp
+@@ -56,7 +56,16 @@
+ static class JsInitHelperType
+ {
+ public:
+- JsInitHelperType() { JS_Init(); }
++ JsInitHelperType()
++ {
++ /* Disable JIT because it needs W/X mapping, which is not allowed by
++ * our systemd hardening setting.
++ */
++ JS::DisableJitBackend();
++
++ JS_Init();
++ }
++
+ ~JsInitHelperType() { JS_ShutDown(); }
+ } JsInitHelper;
+
+--
+GitLab
diff --git a/sys-auth/polkit/files/polkit-123-pkexec-uninitialized.patch b/sys-auth/polkit/files/polkit-123-pkexec-uninitialized.patch
new file mode 100644
index 000000000000..f19560943c43
--- /dev/null
+++ b/sys-auth/polkit/files/polkit-123-pkexec-uninitialized.patch
@@ -0,0 +1,35 @@
+https://gitlab.freedesktop.org/polkit/polkit/-/commit/c79ee5595c8d397098978ad50eb521ba2ae8467d
+
+From c79ee5595c8d397098978ad50eb521ba2ae8467d Mon Sep 17 00:00:00 2001
+From: Vincent Mihalkovic <vmihalko@redhat.com>
+Date: Wed, 16 Aug 2023 08:59:55 +0000
+Subject: [PATCH] pkexec: fix uninitialized pointer warning
+
+--- a/src/programs/pkexec.c
++++ b/src/programs/pkexec.c
+@@ -53,6 +53,7 @@
+ static gchar *original_user_name = NULL;
+ static gchar *original_cwd;
+ static gchar *command_line = NULL;
++static gchar *cmdline_short = NULL;
+ static struct passwd *pw;
+
+ #ifndef HAVE_CLEARENV
+@@ -508,6 +509,7 @@ main (int argc, char *argv[])
+ path = NULL;
+ exec_argv = NULL;
+ command_line = NULL;
++ cmdline_short = NULL;
+ opt_user = NULL;
+ local_agent_handle = NULL;
+
+@@ -802,7 +804,6 @@ main (int argc, char *argv[])
+ polkit_details_insert (details, "program", path);
+ polkit_details_insert (details, "command_line", command_line);
+
+- gchar *cmdline_short = NULL;
+ cmdline_short = g_strdup(command_line);
+ if (strlen(command_line) > 80)
+ g_stpcpy(g_stpcpy( cmdline_short + 38, " ... " ),
+--
+GitLab