| Summary: | security/trousers ERROR: TCSD config file (/usr/local/etc/tcsd.conf) must be user/group root/_tss | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | unitrunker <unitrunker> |
| Component: | Individual Port(s) | Assignee: | Mateusz Piotrowski <0mp> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | 0mp, holger.kipp, unitrunker, william.franck |
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(hrs) |
| Version: | Latest | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
unitrunker
2021-02-26 01:38:11 UTC
A possible work-around in /usr/local/etc/rc.d/tcsd:
tcsd_precmd()
{
/usr/bin/install -d -m 0700 -o root -g _tss \
/var/run/tpm /var/run/ima /usr/local/var/lib/tpm
/usr/sbin/chown root:_tss \
/usr/local/etc/tcsd.conf
/bin/chmod 0640 \
/usr/local/etc/tcsd.conf
}
Above work-around seems to work. However, I see the following error when starting tcsd: Feb 25 21:40:34 thinkpad TCSD[TDDL]: - TrouSerS ioctl: (25) Inappropriate ioctl for device I encounter exactly the same problem with tics (which is unable to start). This is on FreeBSD 12.2-RELEASE with up-to-date Ports-Tree (27th of February 2021). trying to switch file owner to root and setting file mode to 640 then gives other problems with accessing a device, etc. Anything else I can try? This is within VM (Parallels on MacOS) Best regards, Holger (In reply to Holger Kipp from comment #3) tcsd. I hate autocorrect... (In reply to unitrunker from comment #1) Same issue, Same solution in /usr/local/etc/rc.d/tcsd Works for me :-) I've hit this issue as well. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=47c2569d8979db687528456bd11c549a37ee4155 commit 47c2569d8979db687528456bd11c549a37ee4155 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-11-04 10:29:24 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-11-04 11:05:09 +0000 security/trousers: Fix tcsd.conf permissions It turns out that tcsd requires the ownership of tcsd.conf file to be set to root:_tss. See trousers-0.3.14_3/src/tcsd/tcsd_conf.c for details. Otherwise, tcsd fails: # service tcsd start Starting tcsd. /usr/local/etc/rc.d/tcsd: WARNING: failed to start tcsd # tail /var/log/messages Nov 4 11:24:43 x TCSD[1298]: TrouSerS ERROR: TCSD config file (/usr/local/etc/tcsd.conf) must be user/group root/_tss Nov 4 11:24:43 x 0mp[2372]: /usr/local/etc/rc.d/tcsd: WARNING: failed to start tcsd Also, the mode of the configuration file has to be 640. PR: 253858 Reported by: unitrunker <unitrunker@gmail.com> Approved by: maintainer timeout, portmgr blanket (runtime error) Sponsored by: Klara, Inc. security/trousers/Makefile | 2 +- security/trousers/files/tcsd.in | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) |