Skip to content

Commit

Permalink
Remove restrictions on having a save directory in /run/*
Browse files Browse the repository at this point in the history
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 a4a0b0d.
  • Loading branch information
mtwebster committed Feb 8, 2024
1 parent 2ba6e7c commit 5c22583
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 0 additions & 2 deletions src/warpinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 5c22583

Please sign in to comment.