summaryrefslogtreecommitdiffstats
path: root/core/modules/swtpm
diff options
context:
space:
mode:
authorManuel Bentele2021-11-08 13:12:03 +0100
committerManuel Bentele2021-11-08 13:12:03 +0100
commite31be23d561e2d5787d5ad305bca082ce270ea5e (patch)
tree96b15dce5d3ab540ec4a6c05a51b7616378c3642 /core/modules/swtpm
parent[swtpm] Add module for TPM emulation for QEMU machines (e.g. Windows 11) (diff)
downloadmltk-e31be23d561e2d5787d5ad305bca082ce270ea5e.tar.gz
mltk-e31be23d561e2d5787d5ad305bca082ce270ea5e.tar.xz
mltk-e31be23d561e2d5787d5ad305bca082ce270ea5e.zip
[swtpm] Change permissions for cert dir user access
Diffstat (limited to 'core/modules/swtpm')
-rw-r--r--core/modules/swtpm/module.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/modules/swtpm/module.build b/core/modules/swtpm/module.build
index 0d4264b4..6157017f 100644
--- a/core/modules/swtpm/module.build
+++ b/core/modules/swtpm/module.build
@@ -1,4 +1,11 @@
#!/bin/bash
+
+LIBVIRT_STPM_GRP="libvirt-tpm"
+
+module_init() {
+ groupadd --system "${LIBVIRT_STPM_GRP}"
+}
+
fetch_source() {
autoclone
}
@@ -61,6 +68,10 @@ build() {
make || perror "'make' failed."
DESTDIR="${DSTDIR}" make install || perror "'make install' failed."
+ # change group and permissions for libvirt-tpm members
+ chgrp "${LIBVIRT_STPM_GRP}" /var/lib/swtpm-localca
+ chmod 775 /var/lib/swtpm-localca
+
rm "${SRCDIR_BIN}/pkg-config"
# restore old environment so that following pkg-config calls are not modified