Merge ~lvoytek/ubuntu/+source/swtpm:aa-sysadmin-lockfile-jammy into ubuntu/+source/swtpm:ubuntu/jammy-devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | git-ubuntu bot | ||||||||
Approved revision: | not available | ||||||||
Merged at revision: | e8299dcc67bfbde40adef99fbc21058edfab4ff7 | ||||||||
Proposed branch: | ~lvoytek/ubuntu/+source/swtpm:aa-sysadmin-lockfile-jammy | ||||||||
Merge into: | ubuntu/+source/swtpm:ubuntu/jammy-devel | ||||||||
Diff against target: |
38 lines (+12/-0) 2 files modified
debian/changelog (+10/-0) debian/usr.bin.swtpm (+2/-0) |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
git-ubuntu bot | Approve | ||
Bryce Harrington (community) | Approve | ||
Canonical Server Reporter | Pending | ||
Review via email:
|
Description of the change
Add some additional apparmor permissions to fix lockfile and tpm_vtpm_proxy module access
The change for jammy is the same as oracular and noble, the original mp is here: https:/
noble mp is here: https:/
PPA: https:/
Testing:
sys_admin test steps
$ sudo apt update && sudo apt dist-upgrade -y
$ sudo apt install swtpm apparmor -y
$ mkdir /tmp/myvtpm
# Before fix
$ sudo modprobe tpm_vtpm_proxy
$ sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322
swtpm: Ioctl to create vtpm proxy failed: Operation not permitted
$ sudo add-apt-repository ppa:lvoytek/
$ sudo apt update && sudo apt upgrade -y
# After fix
$ sudo modprobe tpm_vtpm_proxy
$ sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322
New TPM device: /dev/tpm1 (major/minor = 253/1)
lockfile test steps
$ sudo apt update && sudo apt dist-upgrade -y
$ sudo apt install swtpm virt-manager apparmor -y
# Create a vm with virt-manager that uses a TPM2 device and start it
# A directory will show up in /var/lib/
# /var/lib/
$ sudo swtpm socket --print-states --tpmstate dir=/var/
swtpm: SWTPM_NVRAM_
# Stop vm and update
$ sudo add-apt-repository ppa:lvoytek/
$ sudo apt update && sudo apt upgrade -y
$ sudo killall swtpm
# Start vm again
$ sudo swtpm socket --print-states --tpmstate dir=/var/
{ "type": "swtpm", "states": [] }
Same review as on mp:lvoytek/ swtpm/470383