Commit d208103
committed
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.1 parent 2d03ff5 commit d208103
File tree
1 file changed
+48
-6
lines changed1 file changed
+48
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1925 | 1925 | | |
1926 | 1926 | | |
1927 | 1927 | | |
1928 | | - | |
| 1928 | + | |
| 1929 | + | |
1929 | 1930 | | |
1930 | 1931 | | |
1931 | 1932 | | |
| |||
1995 | 1996 | | |
1996 | 1997 | | |
1997 | 1998 | | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
1998 | 2039 | | |
1999 | | - | |
| 2040 | + | |
| 2041 | + | |
2000 | 2042 | | |
2001 | 2043 | | |
2002 | 2044 | | |
2003 | 2045 | | |
2004 | 2046 | | |
2005 | | - | |
2006 | | - | |
| 2047 | + | |
| 2048 | + | |
2007 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
2008 | 2052 | | |
2009 | | - | |
2010 | | - | |
2011 | 2053 | | |
2012 | 2054 | | |
2013 | 2055 | | |
| |||
0 commit comments