<div dir="ltr"><div dir="ltr">By default, GLib/Gcr/libsecret outputs debug/info logging messages<br>to stdout, but we use that as the Assuan channel, and outputting to<br>it anything but the expected verbs breaks pinentry pipelines<br>in confusing ways.<br><br>It is unknown whether a similar patch is needed for gtk-2<br>or other flavors via the &#39;CLEARPASSPHRASE&#39; command,<br>nor if G_MESSAGES_DEBUG needs unsetting from the environment.<br><br>An old user reports Gtk-warnings even with pinentry-qt,<br>but their issue needs more verification.<br><br><a href="https://web.archive.org/web/20260629091849/https://dev.gnupg.org/T4144.html">https://web.archive.org/web/20260629091849/https://dev.gnupg.org/T4144.html</a><br><br>Care must be placed in who inherits our Assuan fds<br>and what they do with them.<br><br>GnuPG-bug-id: 4144<br>GnuPG-bug-id: 2243<br>GnuPG-bug-id: 2397<br>Signed-off-by: Kernc &lt;<a href="mailto:kerncece@gmail.com">kerncece@gmail.com</a>&gt;<br>---<br> gnome3/pinentry-gnome3.c | 7 +++++++<br> 1 file changed, 7 insertions(+)<br><br>diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c<br>index 7f21d6f..3692f49 100644<br>--- a/gnome3/pinentry-gnome3.c<br>+++ b/gnome3/pinentry-gnome3.c<br>@@ -518,6 +518,13 @@ main (int argc, char *argv[])<br> {<br>   pinentry_init (PGMNAME);<br> <br>+/* Prevent logging messages escaping to stdout (our Assuan channel). */<br>+#if GLIB_CHECK_VERSION (2, 68, 0)<br>+  g_log_writer_default_set_use_stderr (TRUE);<br>+#else<br>+  g_unsetenv (&quot;G_MESSAGES_DEBUG&quot;);<br>+#endif<br>+<br> #ifdef FALLBACK_CURSES<br>   if (!getenv (&quot;DBUS_SESSION_BUS_ADDRESS&quot;))<br>     {<br>-- <br>2.47.3<br><br></div></div>