public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Felipe Borges <felipeborges@gnome.org>
To: git-commits@fedoraproject.org
Subject: [rpms/nautilus] f44: Update to 50.5
Date: Wed, 25 Nov 2026 08:58:43 GMT [thread overview]
Message-ID: <179559712369.1.15326228303415756564.rpms-nautilus-010530b2d526@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/nautilus
Branch : f44
Commit : 010530b2d5264fbde95a0c1930ff5fd65fdfbbb1
Author : Felipe Borges <felipeborges@gnome.org>
Date : 2026-11-24T09:59:00+01:00
Stats : +2/-406 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/nautilus/c/010530b2d5264fbde95a0c1930ff5fd65fdfbbb1?branch=f44
Log:
Update to 50.5
Dropping the downstream CVE-2026-111802 patch. The fix itself landed in
this release as commit 81fad201c6, cherry-picked to gnome-50. The patch
file also carried a follow-up cleanup, "file-operations: Simplify
emptying trash", which is still main-only — it is a refactor of the
main-trash path with no behaviour change, so there is nothing to carry
downstream.
See also https://gitlab.gnome.org/GNOME/nautilus/-/commit/81fad201c61915e326c3cb73fd2079da55840524
---
diff --git a/CVE-2026-111802.patch b/CVE-2026-111802.patch
deleted file mode 100644
index be13fe6..0000000
--- a/CVE-2026-111802.patch
+++ /dev/null
@@ -1,402 +0,0 @@
-[Adapted for Nautilus 51: the includes were different from the main branch
-so the patch wouldn't apply. Fixed the includes, and changed the hunk lines
-so that it can apply without fuzz]
-
-From 20e84b0e3799b8c753441500cac2df8c04a11788 Mon Sep 17 00:00:00 2001
-From: Corey Berla <corey@berla.me>
-Date: Sun, 11 Oct 2026 16:33:46 +0000
-Subject: [PATCH 1/2] file-operations: Ensure trash does not link to other
- files
-
-When emptying a mount's trash on unmount, any component of the trash
-paths could be a symbolic link, e.g. .Trash-1000/files pointing at
-/home, causing the link target's contents to be deleted.
-
-Checking for symbolic links beforehand is racy, so instead walk the
-trash directories by file descriptor, opened with O_NOFOLLOW and never
-crossing filesystems, and delete their contents with unlinkat().
-
-The "files" and "info" directories themselves are now deleted too,
-which is fine as they are recreated when files are trashed.
----
- src/nautilus-file-operations.c | 149 ++++++++++++++++++++++++++++++++-
- 1 file changed, 147 insertions(+), 2 deletions(-)
-
-diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
-index 1cf1b0e..a196d95 100644
---- a/src/nautilus-file-operations.c
-+++ b/src/nautilus-file-operations.c
-@@ -28,6 +28,9 @@
- #include <stdarg.h>
- #include <math.h>
- #include <unistd.h>
-+#include <sys/stat.h>
-+#include <dirent.h>
-+#include <fcntl.h>
- #include <sys/types.h>
- #include <stdlib.h>
-
-@@ -44,6 +47,7 @@
- #include <gtk/gtk.h>
- #include <gio/gio.h>
- #include <glib.h>
-+#include <glib-unix.h>
-
- #include "nautilus-dialog-utilities.h"
- #include "nautilus-error-reporting.h"
-@@ -141,6 +145,7 @@ typedef struct
- {
- CommonJob common;
- GList *trash_dirs;
-+ char *mount_root_path;
- gboolean should_confirm;
- NautilusOpCallback done_callback;
- gpointer done_callback_data;
-@@ -2241,6 +2246,129 @@ get_trash_dirs_for_mount (GMount *mount)
- return list;
- }
-
-+static void
-+close_fd (gpointer data)
-+{
-+ g_clear_fd ((int *) data, NULL);
-+}
-+
-+/* Doesn't follow symbolic links or cross into other filesystems. */
-+static int
-+open_untrusted_dir_at (int dirfd,
-+ const char *name,
-+ dev_t dev)
-+{
-+ g_autofd int fd = openat (dirfd, name,
-+ O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC | O_NOCTTY);
-+ struct stat st;
-+
-+ if (fd < 0 || fstat (fd, &st) != 0 || st.st_dev != dev)
-+ {
-+ return -1;
-+ }
-+
-+ return g_steal_fd (&fd);
-+}
-+
-+static void
-+append_trash_dir_at (GArray *fds,
-+ int parent_fd,
-+ const char *name,
-+ dev_t dev)
-+{
-+ int fd = open_untrusted_dir_at (parent_fd, name, dev);
-+
-+ if (fd < 0)
-+ {
-+ return;
-+ }
-+
-+ g_array_append_val (fds, fd);
-+}
-+
-+/* The contents of a mount are not trusted, so paths below its root could be
-+ * swapped for symbolic links at any time. Only use the returned fds. */
-+static GArray *
-+open_trash_dirs_at_mount_root (const char *root_path)
-+{
-+ GArray *fds = g_array_new (FALSE, FALSE, sizeof (int));
-+ g_autofd int root_fd = -1;
-+ g_autofd int shared_fd = -1;
-+ g_autofree char *uid_name = g_strdup_printf ("%d", getuid ());
-+ g_autofree char *user_trash_name = g_strdup_printf (".Trash-%d", getuid ());
-+ struct stat root_st;
-+
-+ g_array_set_clear_func (fds, close_fd);
-+
-+ root_fd = open (root_path, O_RDONLY | O_DIRECTORY | O_CLOEXEC | O_NOCTTY);
-+ if (root_fd < 0 || fstat (root_fd, &root_st) != 0)
-+ {
-+ return fds;
-+ }
-+
-+ shared_fd = open_untrusted_dir_at (root_fd, ".Trash", root_st.st_dev);
-+ if (shared_fd >= 0)
-+ {
-+ append_trash_dir_at (fds, shared_fd, uid_name, root_st.st_dev);
-+ }
-+
-+ append_trash_dir_at (fds, root_fd, user_trash_name, root_st.st_dev);
-+
-+ return fds;
-+}
-+
-+static char *
-+get_native_root_path (GMount *mount)
-+{
-+ g_autoptr (GFile) root = g_mount_get_root (mount);
-+
-+ if (root == NULL || !g_file_is_native (root))
-+ {
-+ return NULL;
-+ }
-+
-+ return g_file_get_path (root);
-+}
-+
-+static void
-+rm_rf_at (CommonJob *job,
-+ int parent_fd,
-+ const char *name,
-+ dev_t dev)
-+{
-+ int fd = open_untrusted_dir_at (parent_fd, name, dev);
-+ DIR *dir;
-+ struct dirent *entry;
-+
-+ if (fd < 0)
-+ {
-+ unlinkat (parent_fd, name, 0);
-+ return;
-+ }
-+
-+ dir = fdopendir (fd);
-+ if (dir == NULL)
-+ {
-+ close (fd);
-+ return;
-+ }
-+
-+ while (!job_aborted (job) && (entry = readdir (dir)) != NULL)
-+ {
-+ if (!g_str_equal (entry->d_name, ".") && !g_str_equal (entry->d_name, ".."))
-+ {
-+ rm_rf_at (job, dirfd (dir), entry->d_name, dev);
-+ }
-+ }
-+
-+ closedir (dir);
-+
-+ if (!job_aborted (job))
-+ {
-+ unlinkat (parent_fd, name, AT_REMOVEDIR);
-+ }
-+}
-+
- static AdwDialog *
- create_empty_trash_prompt (UnmountData *data)
- {
-@@ -2290,7 +2418,7 @@ empty_trash_prompt_cb (AdwDialog *dialog,
-
- job = op_job_new (EmptyTrashJob, data->parent_window, NULL);
- job->should_confirm = FALSE;
-- job->trash_dirs = get_trash_dirs_for_mount (data->mount);
-+ job->mount_root_path = get_native_root_path (data->mount);
- job->done_callback = empty_trash_for_unmount_done;
- job->done_callback_data = data;
-
-@@ -7320,6 +7448,7 @@ empty_trash_task_done (GObject *source_object,
- job = user_data;
-
- g_list_free_full (job->trash_dirs, g_object_unref);
-+ g_free (job->mount_root_path);
-
- if (job->done_callback)
- {
-@@ -7353,7 +7482,23 @@ empty_trash_thread_func (GTask *task,
- {
- confirmed = TRUE;
- }
-- if (confirmed)
-+ if (confirmed && job->mount_root_path != NULL)
-+ {
-+ g_autoptr (GArray) fds = open_trash_dirs_at_mount_root (job->mount_root_path);
-+
-+ for (guint i = 0; i < fds->len && !job_aborted (common); i++)
-+ {
-+ int trash_fd = g_array_index (fds, int, i);
-+ struct stat st;
-+
-+ if (fstat (trash_fd, &st) == 0)
-+ {
-+ rm_rf_at (common, trash_fd, "files", st.st_dev);
-+ rm_rf_at (common, trash_fd, "info", st.st_dev);
-+ }
-+ }
-+ }
-+ else if (confirmed)
- {
- for (l = job->trash_dirs;
- l != NULL && !job_aborted (common);
---
-2.56.0
-
-
-From b7835e3496bb46b305670924e4a8bfb68b3956a8 Mon Sep 17 00:00:00 2001
-From: Corey Berla <corey@berla.me>
-Date: Wed, 21 Oct 2026 16:36:34 -0700
-Subject: [PATCH 2/2] file-operations: Simplify emptying trash
-
-Now that emptying mounts' trash no longer uses trash_dirs
-we only use that list for emptying the main trash. Simplify
-the logic to just delete top levels folders (which is all
-that is necessary for the main trash)
----
- src/nautilus-file-operations.c | 91 ++++++++++------------------------
- 1 file changed, 27 insertions(+), 64 deletions(-)
-
-diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
-index a196d95..8e56556 100644
---- a/src/nautilus-file-operations.c
-+++ b/src/nautilus-file-operations.c
-@@ -144,7 +144,6 @@ typedef struct
- typedef struct
- {
- CommonJob common;
-- GList *trash_dirs;
- char *mount_root_path;
- gboolean should_confirm;
- NautilusOpCallback done_callback;
-@@ -7381,61 +7380,37 @@ nautilus_file_operations_new_file (GtkWidget *parent_view,
-
-
- static void
--delete_trash_file (CommonJob *job,
-- GFile *file,
-- gboolean del_file,
-- gboolean del_children)
-+delete_main_trash_contents (CommonJob *job)
- {
-+ g_autoptr (GFile) trash = g_file_new_for_uri (SCHEME_TRASH ":");
-+ g_autoptr (GFileEnumerator) enumerator = NULL;
- GFileInfo *info;
-- GFile *child;
-- GFileEnumerator *enumerator;
-
-- if (job_aborted (job))
-+ enumerator = g_file_enumerate_children (trash,
-+ G_FILE_ATTRIBUTE_STANDARD_NAME,
-+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
-+ job->cancellable,
-+ NULL);
-+ if (enumerator == NULL)
- {
- return;
- }
-
-- if (del_children)
-+ /* The g_file_delete operation works differently for locations provided
-+ * by the trash backend as it prevents modifications of trashed items
-+ * For that reason, it is enough to call g_file_delete on top-level
-+ * items only.
-+ */
-+ while (!job_aborted (job) &&
-+ (info = g_file_enumerator_next_file (enumerator, job->cancellable, NULL)) != NULL)
- {
-- gboolean should_recurse;
--
-- /* The g_file_delete operation works differently for locations provided
-- * by the trash backend as it prevents modifications of trashed items
-- * For that reason, it is enough to call g_file_delete on top-level
-- * items only.
-- */
-- should_recurse = !g_file_has_uri_scheme (file, SCHEME_TRASH);
--
-- enumerator = g_file_enumerate_children (file,
-- G_FILE_ATTRIBUTE_STANDARD_NAME ","
-- G_FILE_ATTRIBUTE_STANDARD_TYPE,
-- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
-- job->cancellable,
-- NULL);
-- if (enumerator)
-- {
-- while (!job_aborted (job) &&
-- (info = g_file_enumerator_next_file (enumerator, job->cancellable, NULL)) != NULL)
-- {
-- gboolean is_dir;
-+ g_autoptr (GFile) child = g_file_get_child (trash, g_file_info_get_name (info));
-
-- child = g_file_get_child (file,
-- g_file_info_get_name (info));
-- is_dir = (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY);
--
-- delete_trash_file (job, child, TRUE, should_recurse && is_dir);
-- g_object_unref (child);
-- g_object_unref (info);
-- }
-- g_file_enumerator_close (enumerator, job->cancellable, NULL);
-- g_object_unref (enumerator);
-- }
-+ g_file_delete (child, job->cancellable, NULL);
-+ g_object_unref (info);
- }
-
-- if (!job_aborted (job) && del_file)
-- {
-- g_file_delete (file, job->cancellable, NULL);
-- }
-+ g_file_enumerator_close (enumerator, job->cancellable, NULL);
- }
-
- static void
-@@ -7447,7 +7422,6 @@ empty_trash_task_done (GObject *source_object,
-
- job = user_data;
-
-- g_list_free_full (job->trash_dirs, g_object_unref);
- g_free (job->mount_root_path);
-
- if (job->done_callback)
-@@ -7467,22 +7441,18 @@ empty_trash_thread_func (GTask *task,
- {
- EmptyTrashJob *job = task_data;
- CommonJob *common;
-- GList *l;
-- gboolean confirmed;
-
- common = (CommonJob *) job;
-
- nautilus_progress_info_start (job->common.progress);
-
-- if (job->should_confirm)
-+ if (job->should_confirm &&
-+ !confirm_empty_trash (common))
- {
-- confirmed = confirm_empty_trash (common);
-- }
-- else
-- {
-- confirmed = TRUE;
-+ return;
- }
-- if (confirmed && job->mount_root_path != NULL)
-+
-+ if (job->mount_root_path != NULL)
- {
- g_autoptr (GArray) fds = open_trash_dirs_at_mount_root (job->mount_root_path);
-
-@@ -7498,14 +7468,9 @@ empty_trash_thread_func (GTask *task,
- }
- }
- }
-- else if (confirmed)
-+ else
- {
-- for (l = job->trash_dirs;
-- l != NULL && !job_aborted (common);
-- l = l->next)
-- {
-- delete_trash_file (common, l->data, FALSE, TRUE);
-- }
-+ delete_main_trash_contents (common);
- }
- }
-
-@@ -7525,8 +7490,6 @@ nautilus_file_operations_empty_trash (GtkWidget *parent_vie
- }
-
- job = op_job_new (EmptyTrashJob, parent_window, dbus_data);
-- job->trash_dirs = g_list_prepend (job->trash_dirs,
-- g_file_new_for_uri (SCHEME_TRASH ":"));
- job->should_confirm = ask_confirmation;
-
- inhibit_power_manager ((CommonJob *) job, _("Emptying Trash"));
---
-2.56.0
-
diff --git a/nautilus.spec b/nautilus.spec
index c3d6ac9..e6accad 100644
--- a/nautilus.spec
+++ b/nautilus.spec
@@ -9,7 +9,7 @@
%global major_version %%(echo %%{tarball_version} | cut -d "." -f 1)
Name: nautilus
-Version: 50.4
+Version: 50.5
Release: %autorelease
Summary: File manager for GNOME
@@ -20,8 +20,6 @@ Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{na
# https://pagure.io/fedora-workstation/issue/442
Patch: default-terminal.patch
-Patch: CVE-2026-111802.patch
-
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: gettext
diff --git a/sources b/sources
index 97de8fc..8d1005f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (nautilus-50.4.tar.xz) = 929613a5d19781ad8eac9dc7a69d1a1e43447f46fcfee2979ba73be0d5d63adf5b1fd8affe83b9a71ae2a4d5fa55f9f50607679b6fd024829ccaa809d8e66de6
+SHA512 (nautilus-50.5.tar.xz) = 9a38346d533b7c1cbf1fc07a04ce7dbfeb51cff0b687717eb765c5efb1374306790a6f3e0903981b2ca2a522d2962f85e6ba95e090dda8aea8168322f1ff8bac
reply other threads:[~2026-11-25 8:58 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=179559712369.1.15326228303415756564.rpms-nautilus-010530b2d526@fedoraproject.org \
--to=felipeborges@gnome.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