Skip to content
Snippets Groups Projects
Commit 298dcbb7 authored by intrigeri's avatar intrigeri
Browse files

_build_persistence_partition_mountpoint: don't rely on ordering of elements in...

_build_persistence_partition_mountpoint: don't rely on ordering of elements in the list returned by org.freedesktop.UDisks2.Filesystem's MountPoints property.

The list of mountpoints can be built from something like:

  /dev/mapper/TailsData_unlocked on /live/persistence/TailsData_unlocked type ext4 (rw,noatime,data=ordered)
  /dev/mapper/TailsData_unlocked on /home/amnesia/.icedove type ext4 (rw,noatime,data=ordered)
  /dev/mapper/TailsData_unlocked on /home/amnesia/Persistent type ext4 (rw,noatime,data=ordered)
  /dev/mapper/TailsData_unlocked on /home/amnesia/.ssh type ext4 (rw,noatime,data=ordered)

... and in this case UDisks would return the four mountpoints, in an order that
does not seem to be stable, so we can't rely on the fact the the first element
would be the exact mountpoint we're interested about. Therefore, we have to
change the selector we use, to rely on more precise domain knowledge instead;
this is somewhat sad, but not worse than implicitly relying on undocumented
UDisks behaviour.

What we know is that the mountpoint of the persistent volume can be either
/live/persistence/TailsData_unlocked (when the user activated an existing
persistent volume in the Greeter), or /media/tails-persistence-setup/TailsData
(while configuring a newly created persistent volume). So let's look for these
candidate mountpoints only.

Ideally we simply would have mount_persistence_partition tell UDisks2 to mount
the filesystem on /live/persistence/TailsData_unlocked, but this is not
supported as of 2.1.6-2 according to the documentation.

Will-fix: #10809
parent 9a176ea5
Branches
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment