Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make cache_key aware of mountpoints on key sources
When attempting to unlock a BE using keys from another filesystem named as a key source via org.zfsbootmenu:keysource, attempt to discover and strip the expected mountpoint from the key source when looking for keys. This allows, for example, zfs create -o mountpoint=/etc/zfs/keys zpool/keys zfs set org.zfsbootmenu:keysource=zpool/keys \ keylocation=file:///etc/zfs/keys/zpool.key zpool/ROOT/bootenv to work with ZFSBootMenu. Previously, the cache_key function would only properly identify keys when the key source had a mountpoint of /. When mountpoint=none or mountpoint=legacy, or in the event a key does not exist at the new relative path, the prior behavior of looking for a path verbatim with respect to the key source is preserved.
- Loading branch information