purging swtpm-tools leaves /var/lib/swtpm-localca dir behind
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
swtpm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
$ sudo apt remove --purge swtpm-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
swtpm-tools*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 271 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 144994 files and directories currently installed.)
Removing swtpm-tools (0.6.1-0ubuntu4) ...
Processing triggers for man-db (2.9.4-2build1) ...
(Reading database ... 144975 files and directories currently installed.)
Purging configuration files for swtpm-tools (0.6.1-0ubuntu4) ...
$ sudo ls -laF /var/lib/
total 56
drwxr-x--- 2 tss root 4096 Nov 15 13:43 ./
drwxr-xr-x 49 root root 4096 Nov 15 13:52 ../
-rwxr-xr-x 1 tss tss 0 Nov 15 13:43 .lock.swtpm-
-rw-r--r-- 1 tss tss 5531 Nov 15 13:43 01.pem
-rw-r--r-- 1 tss tss 1 Nov 15 13:43 certserial
-rw-r--r-- 1 tss tss 48 Nov 15 13:43 index.txt
-rw-r--r-- 1 tss tss 21 Nov 15 13:43 index.txt.attr
-rw-r--r-- 1 tss tss 0 Nov 15 13:43 index.txt.old
-rw-r--r-- 1 tss tss 5531 Nov 15 13:43 issuercert.pem
-rw-r--r-- 1 tss tss 3 Nov 15 13:43 serial
-rw-r--r-- 1 tss tss 3 Nov 15 13:43 serial.old
-rw-r----- 1 tss tss 2459 Nov 15 13:43 signkey.pem
-rw-r--r-- 1 tss tss 1468 Nov 15 13:43 swtpm-localca-
-rw-r----- 1 tss tss 2455 Nov 15 13:43 swtpm-localca-
That combined with the -d /var/lib/
reach the new form (owned by swtpm) unless an admin manually fixes it.
if ! [ -d $SWTPM_LOCALCA_DIR ]; then
fi
I'm not entirely sure, but since purge is meant to remove all data as well I'd
suggest here it would make sense to remove the directory on purge - opinions?