aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed/zed.d
diff options
context:
space:
mode:
authorAntonio Russo <[email protected]>2019-06-02 08:57:10 -0400
committerBrian Behlendorf <[email protected]>2019-07-15 16:31:47 -0700
commitf88d069cbbbdff9a67a9be523cfb470cef707e07 (patch)
tree217fbde73bf8b3f58dcc3d76e68ff3a4c97ec1fb /cmd/zed/zed.d
parent6993e012025c68e4ce0657f84fb47fe96c436735 (diff)
systemd encryption key support
Modify zfs-mount-generator to produce a dependency on new zfs-import-key-*.service units, dynamically created at boot to call zfs load-key for the encryption root, before attempting to mount any encrypted datasets. These units are created by zfs-mount-generator, and RequiresMountsFor on the keyfile, if present, or call systemd-ask-password if a passphrase is requested. This patch includes suggestions from @Fabian-Gruenbichler, @ryanjaeb and @rlaager, as well an adaptation of @rlaager's script to retry on incorrect password entry. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Fabian Grünbichler <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #8750 Closes #8848
Diffstat (limited to 'cmd/zed/zed.d')
-rwxr-xr-xcmd/zed/zed.d/history_event-zfs-list-cacher.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in b/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
index c1513cf3a..6d0f44ab3 100755
--- a/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
+++ b/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
@@ -47,7 +47,7 @@ case "${ZEVENT_HISTORY_INTERNAL_NAME}" in
# Only act if one of the tracked properties is altered.
case "${ZEVENT_HISTORY_INTERNAL_STR%%=*}" in
canmount|mountpoint|atime|relatime|devices|exec| \
- readonly|setuid|nbmand) ;;
+ readonly|setuid|nbmand|encroot|keylocation) ;;
*) exit 0 ;;
esac
;;
@@ -62,7 +62,7 @@ zed_lock zfs-list
trap abort_alter EXIT
PROPS="name,mountpoint,canmount,atime,relatime,devices,exec,readonly"
-PROPS="${PROPS},setuid,nbmand"
+PROPS="${PROPS},setuid,nbmand,encroot,keylocation"
"${ZFS}" list -H -t filesystem -o $PROPS -r "${ZEVENT_POOL}" > "${FSLIST_TMP}"