kairos-agent/internal/agent/hooks
Itxaka b5869b4017
Fix hooks under encrypted partitions (#702)
* Fix hooks under encrypted partitions

We had a mess of mounting and unmounting things around when we try to
copy things to persistent.

Part of the changes (using the by-label to mount the persistent) are due
to the change in kcrypt. As we set the same label to the encrypted fs
and unencrypted fs, our utils.Mount could get mistaken and return the
first hit, which usually its the encrypted one, and we cannot mount that
one.

This patch brings it up to date.

 - Makes bundles and logs hooks work when we have encrypted persistent.
   It didnt work before.
 - Makes both workflows the same.
 - Locks everything once its over, to not leave encrypted parts around
 - Mounts OEM so kcrypt can read the config if we are using a remote
   server for encryption
 - Mounts by label so there is not a change of getting the wrong device
 - Uses the mount syscall directly. The util can mistake and return the
   actual encrypted part if they both have the same label and finds it
   first

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-13 11:22:26 +01:00
..
bundles.go Fix hooks under encrypted partitions (#702) 2025-03-13 11:22:26 +01:00
gruboptions.go Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
hook.go Copy any found sysextensions into active+passive efi dir (#372) 2024-06-07 16:45:50 +02:00
hooks_test.go Drop those stupid github and vfs deps bumps (#591) 2024-11-06 12:50:14 +01:00
kcrypt_uki.go Fix hooks under encrypted partitions (#702) 2025-03-13 11:22:26 +01:00
kcrypt.go Fix hooks under encrypted partitions (#702) 2025-03-13 11:22:26 +01:00
lifecycle.go Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
logs.go Fix hooks under encrypted partitions (#702) 2025-03-13 11:22:26 +01:00
mounts.go Converge all yaml libs into v3 (#266) 2024-03-20 16:53:42 +01:00
sysext.go Move to use our ghw clone (#535) 2024-09-17 15:27:31 +02:00