summaryrefslogtreecommitdiff
path: root/app-i18n/ibus/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-i18n/ibus/files
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-i18n/ibus/files')
-rw-r--r--app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch62
-rw-r--r--app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch88
-rw-r--r--app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch191
-rw-r--r--app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch175
4 files changed, 175 insertions, 341 deletions
diff --git a/app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch b/app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch
deleted file mode 100644
index 24b5cd3f6a8c..000000000000
--- a/app-i18n/ibus/files/ibus-1.5.18-enable-gsettings-in-runtest.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 4b4fe00cc2750713ef8d2bc0a9f396ab577c36fc Mon Sep 17 00:00:00 2001
-From: Naohiro Aota <naota@gentoo.org>
-Date: Thu, 4 Oct 2018 18:14:17 +0900
-Subject: [PATCH] src/tests: Enable GSettings in runtest in ibus-1.5.18
-
-This patch is based on:
-https://github.com/ibus/ibus/commit/10cc30eac200d10b581d9d2122d5a732f4880943
-
-Signed-off-by: Naohiro Aota <naota@gentoo.org>
----
- src/tests/runtest | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/src/tests/runtest b/src/tests/runtest
-index 0e43fee..84d85ab 100755
---- a/src/tests/runtest
-+++ b/src/tests/runtest
-@@ -29,6 +29,7 @@ ibus-engine-switch
- ibus-compose
- test-stress
- "
-+IBUS_SCHEMA_FILE='org.freedesktop.ibus.gschema.xml'
-
- # Portable replacement of basename.
- func_basename () {
-@@ -80,6 +81,12 @@ trap 'func_cleanup $tstdir' 1 2 3 15
- tst=$1; shift
- tstdir=tmp-`func_basename $tst`
-
-+# IBusEngine has GSettings
-+if test ! -f "$top_builddir/data/dconf/$IBUS_SCHEMA_FILE" ; then
-+ echo "NOT FOUND $top_builddir/data/dconf/$IBUS_SCHEMA_FILE"
-+ exit -1
-+fi
-+
- test -d $tstdir || mkdir $tstdir
-
- ( cd $tstdir
-@@ -101,6 +108,20 @@ test -d $tstdir || mkdir $tstdir
- IBUS_ADDRESS_FILE=$PWD/ibus-daemon.pid
- export IBUS_ADDRESS_FILE
-
-+ cp "../$top_builddir/data/dconf/$IBUS_SCHEMA_FILE" $PWD
-+ glib-compile-schemas $PWD
-+ if test $? -ne 0 ; then
-+ echo "FAILED glib-compile-schemas"
-+ retval=1
-+ return
-+ fi
-+ if test ! -f $PWD/gschemas.compiled ; then
-+ echo "NOT FOUND $PWD/gschemas.compiled"
-+ retval=1
-+ return
-+ fi
-+ export GSETTINGS_SCHEMA_DIR=$PWD
-+
- # Start ibus-daemon.
- ../$top_builddir/bus/ibus-daemon \
- --daemonize \
---
-2.19.0
-
diff --git a/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch b/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch
deleted file mode 100644
index 8eed29daf397..000000000000
--- a/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From aa0f4252ff965729b871c91b4ed089bf98963c0b Mon Sep 17 00:00:00 2001
-From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Fri, 10 Aug 2018 15:43:58 +0900
-Subject: [PATCH] ui/gtk3: Check if gdk-wayland is installed
-
-BUG=https://github.com/ibus/ibus/issues/2035
----
- configure.ac | 10 ++++++++++
- ui/gtk3/Makefile.am | 5 ++++-
- ui/gtk3/panelbinding.vala | 5 +++++
- 3 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 091e20f2..4b6a7a21 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -237,12 +237,21 @@ if test x"$enable_gtk3" = x"yes"; then
- PKG_CHECK_MODULES(GTK3, [
- gtk+-3.0
- ])
-+ PKG_CHECK_EXISTS([gdk-wayland-3.0],
-+ [enable_gdk3_wayland=yes],
-+ [enable_gdk3_wayland=no]
-+ )
-
- gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
- GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules
- else
- enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
-+ enable_gdk3_wayland=no
-+fi
-+if test x"$enable_gdk3_wayland" != x"yes"; then
-+ enable_gdk3_wayland="no (disabled, need to install gdk-wayland-3.0.pc)"
- fi
-+AM_CONDITIONAL([ENABLE_GDK3_WAYLAND], [test x"$enable_gdk3_wayland" = x"yes"])
-
- if test x"$enable_xim" = x"yes"; then
- # Check for x11
-@@ -785,6 +794,7 @@ Build options:
- Build gtk3 immodule $enable_gtk3
- Build XIM agent server $enable_xim
- Build wayland support $enable_wayland
-+ Build gdk3 wayland support $enable_gdk3_wayland
- Build appindicator support $enable_appindicator
- Build appindicator engine icon $enable_appindicator_engine_icon
- Build python library $enable_python_library
-diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am
-index aaba7a4d..6ebc96ce 100644
---- a/ui/gtk3/Makefile.am
-+++ b/ui/gtk3/Makefile.am
-@@ -78,7 +78,6 @@ AM_VALAFLAGS = \
- --pkg=ibus-1.0 \
- --pkg=config \
- --pkg=xi \
-- --pkg=gdk-wayland \
- --target-glib="$(VALA_TARGET_GLIB_VERSION)" \
- $(NULL)
-
-@@ -105,6 +104,10 @@ if ENABLE_APPINDICATOR_ENGINE_ICON
- AM_VALAFLAGS += --define=INDICATOR_ENGINE_ICON
- endif
-
-+if ENABLE_GDK3_WAYLAND
-+AM_VALAFLAGS += --pkg=gdk-wayland --define=USE_GDK_WAYLAND
-+endif
-+
- libexec_PROGRAMS = ibus-ui-gtk3
-
- ibus_ui_gtk3_SOURCES = \
-diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala
-index 95115b13..981b5509 100644
---- a/ui/gtk3/panelbinding.vala
-+++ b/ui/gtk3/panelbinding.vala
-@@ -237,9 +237,14 @@ class PanelBinding : IBus.PanelService {
- GLib.Object(connection : bus.get_connection(),
- object_path : IBus.PATH_PANEL_EXTENSION_EMOJI);
-
-+#if USE_GDK_WAYLAND
- Type instance_type = Gdk.Display.get_default().get_type();
- Type wayland_type = typeof(GdkWayland.Display);
- m_is_wayland = instance_type.is_a(wayland_type);
-+#else
-+ m_is_wayland = false;
-+ warning("Checking Wayland is disabled");
-+#endif
-
- m_bus = bus;
- m_application = application;
diff --git a/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch b/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch
deleted file mode 100644
index 0ebb92c21e5d..000000000000
--- a/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From 4d7c1e00e15921a0448947961183c1c124b6b49f Mon Sep 17 00:00:00 2001
-From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Tue, 29 Jan 2019 17:57:16 +0900
-Subject: [PATCH] Delete weak pointer in GList.SList for vala 0.43.4
-
-Vala 0.43.4 does not allow to convert a weak pointer to the full one in SList.
-
-emojier.vala:424.36-425.73: error: Assignment: Cannot convert from
-`GLib.SList<weak IBus.EmojiData>' to `GLib.SList<IBus.EmojiData>?'
-emojier.vala:636.9-637.69: error: Assignment: Cannot convert from
-`GLib.SList<weak IBus.UnicodeBlock>' to `GLib.SList<IBus.UnicodeBlock>'
-panel.vala:526.36-526.65: error: Assignment: Cannot convert from
-`GLib.List<weak IBus.EngineDesc>' to `GLib.List<IBus.EngineDesc>?'
----
- src/ibusbus.h | 11 ++++++-----
- src/ibusemoji.h | 6 +++---
- src/ibusunicode.h | 8 ++++----
- ui/gtk3/emojier.vala | 24 ++++++++++++++++--------
- 4 files changed, 29 insertions(+), 20 deletions(-)
-
-diff --git a/src/ibusbus.h b/src/ibusbus.h
-index dff3dfb7..fddcf5b2 100644
---- a/src/ibusbus.h
-+++ b/src/ibusbus.h
-@@ -2,7 +2,8 @@
- /* vim:set et sts=4: */
- /* ibus - The Input Bus
- * Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
-- * Copyright (C) 2008-2013 Red Hat, Inc.
-+ * Copyright (C) 2013-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
-+ * Copyright (C) 2008-2019 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -692,7 +693,7 @@ gboolean ibus_bus_register_component_async_finish
- *
- * List engines synchronously.
- *
-- * Returns: (transfer container) (element-type IBusEngineDesc):
-+ * Returns: (transfer full) (element-type IBusEngineDesc):
- * A List of engines.
- */
- GList *ibus_bus_list_engines (IBusBus *bus);
-@@ -725,7 +726,7 @@ void ibus_bus_list_engines_async
- *
- * Finishes an operation started with ibus_bus_list_engines_async().
- *
-- * Returns: (transfer container) (element-type IBusEngineDesc):
-+ * Returns: (transfer full) (element-type IBusEngineDesc):
- * A List of engines.
- */
- GList *ibus_bus_list_engines_async_finish
-@@ -740,7 +741,7 @@ GList *ibus_bus_list_engines_async_finish
- *
- * List active engines synchronously.
- *
-- * Returns: (transfer container) (element-type IBusEngineDesc):
-+ * Returns: (transfer full) (element-type IBusEngineDesc):
- * A List of active engines.
- *
- * Deprecated: 1.5.3: Read dconf value
-@@ -782,7 +783,7 @@ void ibus_bus_list_active_engines_async
- *
- * Finishes an operation started with ibus_bus_list_active_engines_async().
- *
-- * Returns: (transfer container) (element-type IBusEngineDesc):
-+ * Returns: (transfer full) (element-type IBusEngineDesc):
- * A List of active engines.
- *
- * Deprecated: 1.5.3: Read dconf value
-diff --git a/src/ibusemoji.h b/src/ibusemoji.h
-index 4edee726..5e9fbcf4 100644
---- a/src/ibusemoji.h
-+++ b/src/ibusemoji.h
-@@ -1,8 +1,8 @@
- /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
- /* vim:set et sts=4: */
- /* bus - The Input Bus
-- * Copyright (C) 2017 Takao Fujiwara <takao.fujiwara1@gmail.com>
-- * Copyright (C) 2017 Red Hat, Inc.
-+ * Copyright (C) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
-+ * Copyright (C) 2017-2019 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -209,7 +209,7 @@ void ibus_emoji_data_save (const gchar *path,
- * ibus_emoji_data_load:
- * @path: A path of the saved dictionary file.
- *
-- * Returns: (element-type IBusEmojiData) (transfer container):
-+ * Returns: (element-type IBusEmojiData) (transfer full):
- * An #IBusEmojiData list loaded from the saved cache file.
- */
- GSList * ibus_emoji_data_load (const gchar *path);
-diff --git a/src/ibusunicode.h b/src/ibusunicode.h
-index 99de9451..473bdb19 100644
---- a/src/ibusunicode.h
-+++ b/src/ibusunicode.h
-@@ -1,8 +1,8 @@
- /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
- /* vim:set et sts=4: */
- /* bus - The Input Bus
-- * Copyright (C) 2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
-- * Copyright (C) 2018 Red Hat, Inc.
-+ * Copyright (C) 2018-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
-+ * Copyright (C) 2018-2019 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -201,7 +201,7 @@ void ibus_unicode_data_save (const gchar *path,
- * #IBusUnicodeData, * the total number of #IBusUnicodeData) of uint values
- * with that signal by 100 times. Otherwise %NULL.
- *
-- * Returns: (element-type IBusUnicodeData) (transfer container):
-+ * Returns: (element-type IBusUnicodeData) (transfer full):
- * An #IBusUnicodeData list loaded from the saved cache file.
- */
- GSList * ibus_unicode_data_load (const gchar *path,
-@@ -290,7 +290,7 @@ void ibus_unicode_block_save (const gchar *path,
- * ibus_unicode_block_load:
- * @path: A path of the saved dictionary file.
- *
-- * Returns: (element-type IBusUnicodeBlock) (transfer container):
-+ * Returns: (element-type IBusUnicodeBlock) (transfer full):
- * An #IBusUnicodeBlock list loaded from the saved cache file.
- */
- GSList * ibus_unicode_block_load (const gchar *path);
-diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
-index 0b9b54a9..aedeb4cb 100644
---- a/ui/gtk3/emojier.vala
-+++ b/ui/gtk3/emojier.vala
-@@ -2,7 +2,7 @@
- *
- * ibus - The Input Bus
- *
-- * Copyright (c) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
-+ * Copyright (c) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -882,8 +882,13 @@ public class IBusEmojier : Gtk.ApplicationWindow {
- update_unicode_blocks();
- return;
- } else {
-- unowned GLib.SList<unowned string> emojis =
-- m_category_to_emojis_dict.lookup(category);
-+ // Use copy_deep() since vala 0.43.4 does not allow to assign
-+ // a weak pointer to the full one in SList:
-+ // emojier.vala:885.48-886.62: error: Assignment: Cannot convert
-+ // from `GLib.SList<string>' to `GLib.SList<weak string>?'
-+ GLib.SList<string> emojis =
-+ m_category_to_emojis_dict.lookup(category).copy_deep(
-+ GLib.strdup);
- m_lookup_table.clear();
- m_candidate_panel_mode = true;
- foreach (unowned string emoji in emojis) {
-@@ -1547,8 +1552,8 @@ public class IBusEmojier : Gtk.ApplicationWindow {
- m_vbox.add(widget);
- widget.show_all();
- }
-- unowned GLib.SList<unowned string>? annotations =
-- data.get_annotations();
-+ GLib.SList<string> annotations =
-+ data.get_annotations().copy_deep(GLib.strdup);
- var buff = new GLib.StringBuilder();
- int i = 0;
- foreach (unowned string annotation in annotations) {
-@@ -2001,17 +2006,20 @@ public class IBusEmojier : Gtk.ApplicationWindow {
- ) as IBus.EmojiData;
- m_emoji_to_data_dict.insert(favorite, new_data);
- } else {
-- unowned GLib.SList<string> annotations = data.get_annotations();
-+ GLib.SList<string> annotations =
-+ data.get_annotations().copy_deep(GLib.strdup);
- if (annotations.find_custom(annotation, GLib.strcmp) == null) {
- annotations.append(annotation);
-- data.set_annotations(annotations.copy());
-+ data.set_annotations(annotations.copy_deep(GLib.strdup));
- }
- }
- unowned GLib.SList<string> emojis =
- m_annotation_to_emojis_dict.lookup(annotation);
- if (emojis.find_custom(favorite, GLib.strcmp) == null) {
- emojis.append(favorite);
-- m_annotation_to_emojis_dict.replace(annotation, emojis.copy());
-+ m_annotation_to_emojis_dict.replace(
-+ annotation,
-+ emojis.copy_deep(GLib.strdup));
- }
- }
- }
diff --git a/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch b/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch
new file mode 100644
index 000000000000..8b7674cddea3
--- /dev/null
+++ b/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch
@@ -0,0 +1,175 @@
+From 3d442dbf936d197aa11ca0a71663c2bc61696151 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Fri, 13 Sep 2019 15:59:03 +0900
+Subject: [PATCH] bus: Implement GDBusAuthObserver callback
+
+ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS,
+and doesn't set a GDBusAuthObserver, which allows anyone who can connect
+to its AF_UNIX socket to authenticate and be authorized to send method calls.
+It also seems to use an abstract AF_UNIX socket, which does not have
+filesystem permissions, so the practical effect might be that a local
+attacker can connect to another user's ibus service and make arbitrary
+method calls.
+
+BUGS=rhbz#1717958
+---
+ bus/server.c | 89 ++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 73 insertions(+), 16 deletions(-)
+
+diff --git a/bus/server.c b/bus/server.c
+index 3a626230..2439de14 100644
+--- a/bus/server.c
++++ b/bus/server.c
+@@ -2,7 +2,8 @@
+ /* vim:set et sts=4: */
+ /* bus - The Input Bus
+ * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
+- * Copyright (C) 2008-2010 Red Hat, Inc.
++ * Copyright (C) 2011-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
++ * Copyright (C) 2008-2019 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -69,17 +70,64 @@ _restart_server (void)
+ exit (-1);
+ }
+
++/**
++ * bus_allow_mechanism_cb:
++ * @observer: A #GDBusAuthObserver.
++ * @mechanism: The name of the mechanism.
++ * @user_data: always %NULL.
++ *
++ * Check if @mechanism can be used to authenticate the other peer.
++ * Returns: %TRUE if the peer's mechanism is allowed.
++ */
++static gboolean
++bus_allow_mechanism_cb (GDBusAuthObserver *observer,
++ const gchar *mechanism,
++ G_GNUC_UNUSED gpointer user_data)
++{
++ if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
++ return TRUE;
++ return FALSE;
++}
++
++/**
++ * bus_authorize_authenticated_peer_cb:
++ * @observer: A #GDBusAuthObserver.
++ * @stream: A #GIOStream.
++ * @credentials: A #GCredentials.
++ * @user_data: always %NULL.
++ *
++ * Check if a peer who has already authenticated should be authorized.
++ * Returns: %TRUE if the peer's credential is authorized.
++ */
++static gboolean
++bus_authorize_authenticated_peer_cb (GDBusAuthObserver *observer,
++ GIOStream *stream,
++ GCredentials *credentials,
++ G_GNUC_UNUSED gpointer user_data)
++{
++ gboolean authorized = FALSE;
++ if (credentials) {
++ GCredentials *own_credentials = g_credentials_new ();
++ if (g_credentials_is_same_user (credentials, own_credentials, NULL))
++ authorized = TRUE;
++ g_object_unref (own_credentials);
++ }
++ return authorized;
++}
++
+ /**
+ * bus_new_connection_cb:
+- * @user_data: always NULL.
+- * @returns: TRUE when the function can handle the connection.
++ * @observer: A #GDBusAuthObserver.
++ * @dbus_connection: A #GDBusconnection.
++ * @user_data: always %NULL.
+ *
+ * Handle incoming connections.
++ * Returns: %TRUE when the function can handle the connection.
+ */
+ static gboolean
+-bus_new_connection_cb (GDBusServer *server,
+- GDBusConnection *dbus_connection,
+- gpointer user_data)
++bus_new_connection_cb (GDBusServer *server,
++ GDBusConnection *dbus_connection,
++ G_GNUC_UNUSED gpointer user_data)
+ {
+ BusConnection *connection = bus_connection_new (dbus_connection);
+ bus_dbus_impl_new_connection (dbus, connection);
+@@ -94,9 +142,9 @@ bus_new_connection_cb (GDBusServer *server,
+ }
+
+ static void
+-_server_connect_start_portal_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
++_server_connect_start_portal_cb (GObject *source_object,
++ GAsyncResult *res,
++ G_GNUC_UNUSED gpointer user_data)
+ {
+ GVariant *result;
+ GError *error = NULL;
+@@ -113,9 +161,9 @@ _server_connect_start_portal_cb (GObject *source_object,
+ }
+
+ static void
+-bus_acquired_handler (GDBusConnection *connection,
+- const gchar *name,
+- gpointer user_data)
++bus_acquired_handler (GDBusConnection *connection,
++ const gchar *name,
++ G_GNUC_UNUSED gpointer user_data)
+ {
+ g_dbus_connection_call (connection,
+ IBUS_SERVICE_PORTAL,
+@@ -136,14 +184,17 @@ void
+ bus_server_init (void)
+ {
+ GError *error = NULL;
++ GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_NONE;
++ gchar *guid;
++ GDBusAuthObserver *observer;
+
+ dbus = bus_dbus_impl_get_default ();
+ ibus = bus_ibus_impl_get_default ();
+ bus_dbus_impl_register_object (dbus, (IBusService *)ibus);
+
+ /* init server */
+- GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
+- gchar *guid = g_dbus_generate_guid ();
++ guid = g_dbus_generate_guid ();
++ observer = g_dbus_auth_observer_new ();
+ if (!g_str_has_prefix (g_address, "unix:tmpdir=") &&
+ !g_str_has_prefix (g_address, "unix:path=")) {
+ g_error ("Your socket address does not have the format unix:tmpdir=$DIR "
+@@ -152,7 +203,7 @@ bus_server_init (void)
+ server = g_dbus_server_new_sync (
+ g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */
+ flags, guid,
+- NULL /* observer */,
++ observer,
+ NULL /* cancellable */,
+ &error);
+ if (server == NULL) {
+@@ -162,7 +213,13 @@ bus_server_init (void)
+ }
+ g_free (guid);
+
+- g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL);
++ g_signal_connect (observer, "allow-mechanism",
++ G_CALLBACK (bus_allow_mechanism_cb), NULL);
++ g_signal_connect (observer, "authorize-authenticated-peer",
++ G_CALLBACK (bus_authorize_authenticated_peer_cb), NULL);
++ g_object_unref (observer);
++ g_signal_connect (server, "new-connection",
++ G_CALLBACK (bus_new_connection_cb), NULL);
+
+ g_dbus_server_start (server);
+
+--
+2.24.0
+