summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-02-03 09:46:08 +0100
committerArmin Kuster <akuster808@gmail.com>2017-02-18 11:43:20 -0800
commitf3ce860a35c248878dd8bf98688674575d5c3599 (patch)
tree3e5fc638902e27ed8fdfedfe762b64cb710a347a
parent4a60f0f9eaff154b38a9eeace6adf8a3362b95b1 (diff)
downloadmeta-security-f3ce860a35c248878dd8bf98688674575d5c3599.tar.gz
trousers: tcsd.conf must be owned tss:tss
The upstream dist/Makefile.am ensures that /etc/tcsd.conf is owned by tss:tss, and that must not be changed because otherwise tcsd refuses to start. In addition, tss group and user should be added as special system group resp. user, because they are not normal users. This also avoids the host-user-contaminated QA warning because the "tss" user will typically not get assigned a UID from the same range as the host user that is used for building. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-tpm/trousers/trousers_git.bb5
1 files changed, 2 insertions, 3 deletions
diff --git a/recipes-tpm/trousers/trousers_git.bb b/recipes-tpm/trousers/trousers_git.bb
index 5737de3..6671808 100644
--- a/recipes-tpm/trousers/trousers_git.bb
+++ b/recipes-tpm/trousers/trousers_git.bb
@@ -39,7 +39,6 @@ do_install_append() {
39 install -m 0644 ${WORKDIR}/tcsd.service ${D}${systemd_unitdir}/system/ 39 install -m 0644 ${WORKDIR}/tcsd.service ${D}${systemd_unitdir}/system/
40 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/tcsd.service 40 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/tcsd.service
41 fi 41 fi
42 chown -R root:root ${D}${sysconfdir}/tcsd.conf
43} 42}
44 43
45CONFFILES_${PN} += "${sysconfig}/tcsd.conf" 44CONFFILES_${PN} += "${sysconfig}/tcsd.conf"
@@ -107,8 +106,8 @@ INITSCRIPT_NAME = "trousers"
107INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." 106INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
108 107
109USERADD_PACKAGES = "${PN}" 108USERADD_PACKAGES = "${PN}"
110GROUPADD_PARAM_${PN} = "tss" 109GROUPADD_PARAM_${PN} = "--system tss"
111USERADD_PARAM_${PN} = "-M -d /var/lib/tpm -s /bin/false -g tss tss" 110USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
112 111
113SYSTEMD_PACKAGES = "${PN}" 112SYSTEMD_PACKAGES = "${PN}"
114SYSTEMD_SERVICE_${PN} = "tcsd.service" 113SYSTEMD_SERVICE_${PN} = "tcsd.service"