From 5c22583f5e3f24823d421691ae474bd8e2f18a25 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Thu, 8 Feb 2024 13:31:39 -0500 Subject: [PATCH] Remove restrictions on having a save directory in /run/* There are a lot of different scenarios in the wild where this is interfering with using Warpinator at all, and considering how permissions are set in /run, there's not much danger here. Landlock is becoming and hopefully will be universally enabled by default on distro kernels. Also the transfer symlink attack potential is already low because of other checks that were added in a4a0b0dfcc81. --- src/util.py | 7 ------- src/warpinator.py | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/util.py b/src/util.py index 0866c8a34..dd3ffa4ef 100644 --- a/src/util.py +++ b/src/util.py @@ -371,13 +371,6 @@ def verify_save_folder(): except ValueError: pass - # If you choose a read-only path to save to, it will create a hardlink to the real one in /run/user/... - # Consider this invalid to force the user to adjust their flatpak permissions to permit the normal path. - # One exception: Steamdeck mounts its media to /run/media (maybe others?) - path = str(save_path) - if path.startswith("/run") and not path.startswith("/run/media"): - return False - return os.access(save_path, os.R_OK | os.W_OK) def home_is_writable(): diff --git a/src/warpinator.py b/src/warpinator.py index 14b4d702c..8c826598b 100644 --- a/src/warpinator.py +++ b/src/warpinator.py @@ -851,8 +851,6 @@ def manual_connect_to_host(self, host): def report_bad_save_folder(self): path = prefs.get_save_path() - if path.startswith("/run/user"): - path = os.path.basename(path) self.bad_save_folder_label.set_text(path) self.show_page("bad-save-folder")