diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-02-02 15:17:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-02-12 12:04:18 +0100 |
commit | 15138e79804cb595829b51eeda3364ec1d70e813 (patch) | |
tree | 22a194ac9a017969896b44eb1f30d13b0fa0bb8e /src/shared/varlink-io.systemd.PCRLock.c | |
parent | pcrlock: split out generation of CEL objects into helper func (diff) | |
download | systemd-15138e79804cb595829b51eeda3364ec1d70e813.tar.xz systemd-15138e79804cb595829b51eeda3364ec1d70e813.zip |
pcrlock: add basic Varlink interface
This can be used to make or delete a PCR policy via Varlink. It can also
be used to query the current event log in CEL format.
Diffstat (limited to 'src/shared/varlink-io.systemd.PCRLock.c')
-rw-r--r-- | src/shared/varlink-io.systemd.PCRLock.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/shared/varlink-io.systemd.PCRLock.c b/src/shared/varlink-io.systemd.PCRLock.c new file mode 100644 index 0000000000..3b2c408bc9 --- /dev/null +++ b/src/shared/varlink-io.systemd.PCRLock.c @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include "varlink-io.systemd.PCRLock.h" + +static VARLINK_DEFINE_METHOD( + ReadEventLog); + +static VARLINK_DEFINE_METHOD( + MakePolicy, + VARLINK_DEFINE_INPUT(force, VARLINK_BOOL, VARLINK_NULLABLE)); + +static VARLINK_DEFINE_METHOD( + RemovePolicy); + +VARLINK_DEFINE_ERROR( + NoChange); + +VARLINK_DEFINE_INTERFACE( + io_systemd_PCRLock, + "io.systemd.PCRLock", + &vl_method_ReadEventLog, + &vl_method_MakePolicy, + &vl_method_RemovePolicy, + &vl_error_NoChange); |