]> git.proxmox.com Git - swtpm.git/commit
swtpm_setup: add abstract swtpm_backend_ops with dir:// implementation
authorStefan Reiter <stefan@pimaker.at>
Thu, 30 Sep 2021 08:03:05 +0000 (10:03 +0200)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 5 Oct 2021 15:54:42 +0000 (11:54 -0400)
commit81371f665f8043fcf4c0c5144635dd93eb68f9bb
treef700247f0a88f974f13fedd27b7e6f316e7fc270
parent5d9edaf4019f73fb38035dc83d7bc5e936d1c951
swtpm_setup: add abstract swtpm_backend_ops with dir:// implementation

Abstract away implementation specific code for handling TPM state in
swtpm_setup. The current code for handling directories is moved to
'swtpm_backend_dir.c'.

Where possible, the input argument is simply passed verbatim as
'backend-uri' to swtpm.

No functional change intended, aside from supporting 'dir://' as
optional prefix. The checks for lock-file accessibility are moved to
check_access(), but that shouldn't affect anything AFAICT.

Signed-off-by: Stefan Reiter <stefan@pimaker.at>
src/swtpm_setup/Makefile.am
src/swtpm_setup/swtpm.c
src/swtpm_setup/swtpm.h
src/swtpm_setup/swtpm_backend_dir.c [new file with mode: 0644]
src/swtpm_setup/swtpm_setup.c