So due to the config being
"RANDFILE = $ENV::HOME/.rnd\n"
one might expect `/var/lib/swtpm/.rnd`
But that isn't what it will resolve to, instead we see in strace that it uses:
"./.rnd"
And surprise :-P, it does not set CWD, I checked a running program and got
Ok, it has /var/lib/ swtpm
HOME=
So due to the config being swtpm/. rnd`
"RANDFILE = $ENV::HOME/.rnd\n"
one might expect `/var/lib/
But that isn't what it will resolve to, instead we see in strace that it uses:
"./.rnd"
And surprise :-P, it does not set CWD, I checked a running program and got
# executed in /home/ubuntu:
$ sudo ls -laF /proc/$(pidof swtpm-localca)/cwd
lrwxrwxrwx 1 swtpm swtpm 0 Apr 7 13:34 /proc/3260/cwd -> /home/ubuntu/
# executed by libvirt for guest creation
$ while /bin/true; do sudo ls -laF /proc/$(pidof swtpm-localca)/cwd 2>/dev/null; done
lrwxrwxrwx 1 swtpm swtpm 0 Apr 7 13:37 /proc/3990/cwd -> //