public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: David Zeuthen <davidz@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: - Update the patch to always pass FUSE POSIX URI's
Date: Tue, 11 Aug 2026 10:33:54 GMT	[thread overview]
Message-ID: <178644443426.1.6150401425788699931.rpms-glib2-8bc1c968cce7@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/glib2
Branch : cve-2026-58016-f44
Commit : 8bc1c968cce743834dcf33130474ec6880ee3e55
Author : David Zeuthen <davidz@fedoraproject.org>
Date   : 2008-10-01T18:08:45+00:00
Stats  : +82/-120 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/glib2/c/8bc1c968cce743834dcf33130474ec6880ee3e55?branch=cve-2026-58016-f44

Log:
- Update the patch to always pass FUSE POSIX URI's

---
diff --git a/gio-2.16-only-pass-uri-to-gio-apps.patch b/gio-2.16-only-pass-uri-to-gio-apps.patch
deleted file mode 100644
index 8f3715b..0000000
--- a/gio-2.16-only-pass-uri-to-gio-apps.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-diff -up glib-2.17.3/gio/gdesktopappinfo.c.only-pass-uri-to-gio-apps glib-2.17.3/gio/gdesktopappinfo.c
---- glib-2.17.3/gio/gdesktopappinfo.c.only-pass-uri-to-gio-apps	2008-07-02 17:13:13.000000000 -0400
-+++ glib-2.17.3/gio/gdesktopappinfo.c	2008-07-03 13:21:42.000000000 -0400
-@@ -1,3 +1,5 @@
-+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-+
- /* GIO - GLib Input, Output and Streaming Library
-  * 
-  * Copyright (C) 2006-2007 Red Hat, Inc.
-@@ -89,6 +91,7 @@ struct _GDesktopAppInfo
-   char *exec;
-   char *binary;
-   char *path;
-+  char *vfs_system;
- 
-   guint nodisplay       : 1;
-   guint hidden          : 1;
-@@ -151,6 +154,7 @@ g_desktop_app_info_finalize (GObject *ob
-   g_free (info->try_exec);
-   g_free (info->exec);
-   g_free (info->binary);
-+  g_free (info->vfs_system);
-   g_free (info->path);
-   
-   G_OBJECT_CLASS (g_desktop_app_info_parent_class)->finalize (object);
-@@ -254,6 +258,7 @@ g_desktop_app_info_new_from_keyfile (GKe
-   info->terminal = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL) != FALSE;
-   info->startup_notify = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, NULL) != FALSE;
-   info->hidden = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL) != FALSE;
-+  info->vfs_system = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-Gnome-Vfs-System", NULL);
-   
-   info->icon = NULL;
-   if (info->icon_name)
-@@ -392,6 +397,7 @@ g_desktop_app_info_dup (GAppInfo *appinf
-   new_info->exec = g_strdup (info->exec);
-   new_info->binary = g_strdup (info->binary);
-   new_info->path = g_strdup (info->path);
-+  new_info->vfs_system = g_strdup (info->vfs_system);
-   new_info->hidden = info->hidden;
-   new_info->terminal = info->terminal;
-   new_info->startup_notify = info->startup_notify;
-@@ -517,9 +523,35 @@ expand_macro (char              macro, 
- {
-   GList *uris = *uri_list;
-   char *expanded;
--  
-+  gboolean force_file_uri;
-+  char force_file_uri_macro;
-+
-   g_return_if_fail (exec != NULL);
--  
-+
-+  /* On %u and %U, only pass gio URI's if the desktop file has the
-+   * X-Gnome-Vfs-System key set to 'gio' or if FUSE is not available.
-+   * Otherwise we pass in a POSIX file path pointing to the URI via
-+   * the FUSE mount in ~/.gvfs.
-+   */
-+  force_file_uri = FALSE;
-+  if (macro == 'u' || macro == 'U')
-+    {
-+      if (info->vfs_system == NULL || strcmp (info->vfs_system, "gio") != 0)
-+        {
-+          switch (macro)
-+            {
-+            case 'u':
-+              force_file_uri_macro = 'f';
-+              force_file_uri = TRUE;
-+              break;
-+            case 'U':
-+              force_file_uri_macro = 'F';
-+              force_file_uri = TRUE;
-+              break;
-+            }
-+        }
-+    }
-+
-   switch (macro)
-     {
-     case 'u':
-@@ -528,7 +560,17 @@ expand_macro (char              macro, 
-     case 'n':
-       if (uris)
- 	{
--	  expanded = expand_macro_single (macro, uris->data);
-+          if (!force_file_uri || g_str_has_prefix (uris->data, "http"))
-+            {
-+              expanded = expand_macro_single (macro, uris->data);
-+            }
-+          else
-+            {
-+              expanded = expand_macro_single (force_file_uri_macro, uris->data);
-+              if (expanded == NULL)
-+                expanded = expand_macro_single (macro, uris->data);
-+            }
-+
- 	  if (expanded)
- 	    {
- 	      g_string_append (exec, expanded);
-@@ -545,7 +587,17 @@ expand_macro (char              macro, 
-     case 'N':
-       while (uris)
- 	{
--	  expanded = expand_macro_single (macro, uris->data);
-+          if (!force_file_uri || g_str_has_prefix (uris->data, "http"))
-+            {
-+              expanded = expand_macro_single (macro, uris->data);
-+            }
-+          else
-+            {
-+              expanded = expand_macro_single (force_file_uri_macro, uris->data);
-+              if (expanded == NULL)
-+                expanded = expand_macro_single (macro, uris->data);
-+            }
-+
- 	  if (expanded)
- 	    {
- 	      g_string_append (exec, expanded);

diff --git a/gio-2.18-always-pass-fuse-file-uri.patch b/gio-2.18-always-pass-fuse-file-uri.patch
new file mode 100644
index 0000000..2c3c350
--- /dev/null
+++ b/gio-2.18-always-pass-fuse-file-uri.patch
@@ -0,0 +1,75 @@
+--- trunk/gio/gdesktopappinfo.c	2008/09/26 19:57:36	7554
++++ trunk/gio/gdesktopappinfo.c	2008/10/01 17:46:57	7566
+@@ -530,9 +530,32 @@
+ {
+   GList *uris = *uri_list;
+   char *expanded;
+-  
++  gboolean force_file_uri;
++  char force_file_uri_macro;
++
+   g_return_if_fail (exec != NULL);
+-  
++
++  /* On %u and %U, pass POSIX file path pointing to the URI via
++   * the FUSE mount in ~/.gvfs. Note that if the FUSE daemon isn't
++   * running or the URI doesn't have a POSIX file path via FUSE
++   * we'll just pass the URI.
++   */
++  switch (macro)
++    {
++    case 'u':
++      force_file_uri_macro = 'f';
++      force_file_uri = TRUE;
++      break;
++    case 'U':
++      force_file_uri_macro = 'F';
++      force_file_uri = TRUE;
++      break;
++    default:
++      force_file_uri_macro = macro;
++      force_file_uri = FALSE;
++      break;
++    }
++
+   switch (macro)
+     {
+     case 'u':
+@@ -541,7 +564,17 @@
+     case 'n':
+       if (uris)
+ 	{
+-	  expanded = expand_macro_single (macro, uris->data);
++          if (!force_file_uri)
++            {
++              expanded = expand_macro_single (macro, uris->data);
++            }
++          else
++            {
++              expanded = expand_macro_single (force_file_uri_macro, uris->data);
++              if (expanded == NULL)
++                expanded = expand_macro_single (macro, uris->data);
++            }
++
+ 	  if (expanded)
+ 	    {
+ 	      g_string_append (exec, expanded);
+@@ -558,7 +591,17 @@
+     case 'N':
+       while (uris)
+ 	{
+-	  expanded = expand_macro_single (macro, uris->data);
++          if (!force_file_uri)
++            {
++              expanded = expand_macro_single (macro, uris->data);
++            }
++          else
++            {
++              expanded = expand_macro_single (force_file_uri_macro, uris->data);
++              if (expanded == NULL)
++                expanded = expand_macro_single (macro, uris->data);
++            }
++
+ 	  if (expanded)
+ 	    {
+ 	      g_string_append (exec, expanded);

diff --git a/glib2.spec b/glib2.spec
index 6cece97..d57aa67 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -3,7 +3,7 @@
 Summary: A library of handy utility functions
 Name: glib2
 Version: 2.18.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -20,7 +20,8 @@ BuildRequires: libselinux-devel
 BuildRequires: glibc-devel
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=442835
-Patch2: gio-2.16-only-pass-uri-to-gio-apps.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=528670
+Patch2: gio-2.18-always-pass-fuse-file-uri.patch
 
 # this patch requires autoreconf
 BuildRequires: autoconf automake libtool gettext-devel gtk-doc
@@ -56,7 +57,7 @@ of version 2 of the GLib library.
 
 %prep
 %setup -q -n glib-%{version}
-%patch2 -p1 -b .only-pass-uri-to-gio-apps
+%patch2 -p1 -b .always-pass-fuse-file-uri
 
 autoreconf
 
@@ -133,6 +134,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/lib*.a
 
 %changelog
+* Wed Oct  1 2008 David Zeuthen <davidz@redhat.com> - 2.18.1-2
+- Update the patch to always pass FUSE POSIX URI's
+
 * Wed Sep 17 2008 Matthias Clasen <mclasen@redhat.com> - 2.18.1-1
 - Update to 2.18.1
 

                 reply	other threads:[~2026-08-11 10:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178644443426.1.6150401425788699931.rpms-glib2-8bc1c968cce7@fedoraproject.org \
    --to=davidz@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox