aboutsummaryrefslogtreecommitdiffstats
path: root/libmount/src/hooks.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2022-09-08 12:37:52 +0200
committerKarel Zak <kzak@redhat.com>2023-01-03 12:58:42 +0100
commit7f5f350b62b814d2d052b60a5332b17bda31fb21 (patch)
tree52f4a01512674e04986690dea206d41521f78a5c /libmount/src/hooks.c
parent71e5489396bd647d877f402cb55e3cf77bffcaae (diff)
downloadutil-linux-7f5f350b62b814d2d052b60a5332b17bda31fb21.tar.gz
libmount: (verity) rewrite to use hookset API
* initialize only when relevant verity.* options detected * setup verity device by prepare-source hook * add post-mount hook to setup deferred deactivation * deactivate the device on error (when de-initialize the hookset) * call dlopen/dlclose only once, share symbols between all hooks * remove verity specific code from rest of libmount Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/hooks.c')
-rw-r--r--libmount/src/hooks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmount/src/hooks.c b/libmount/src/hooks.c
index 2dc44d9feb..4340ac61ca 100644
--- a/libmount/src/hooks.c
+++ b/libmount/src/hooks.c
@@ -26,6 +26,9 @@ static const struct libmnt_hookset *hooksets[] =
{
#ifdef __linux__
&hookset_loopdev,
+#ifdef HAVE_CRYPTSETUP
+ &hookset_veritydev,
+#endif
&hookset_mkdir,
&hookset_subdir,
&hookset_mount_legacy,