libreoffice doesn't list gpg private key for a digital signature due to apparmor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libreoffice (Ubuntu) |
Fix Released
|
Low
|
Rico Tzschichholz | ||
Focal |
Confirmed
|
Low
|
Rico Tzschichholz | ||
Groovy |
Fix Released
|
Low
|
Rico Tzschichholz | ||
Hirsute |
Fix Released
|
Low
|
Rico Tzschichholz |
Bug Description
LibreOffice should be able to digitally sign a document with a GPG private key in the GPG key chain. However, the key is not listed in the list of certificates shown following the menu File - Digital Signatures - Digital Signatures... - Sign Document..., after, e.g., creating and saving a document on LibreOffice Writer.
This seems to be because apparmor doesn't allow LibreOffice to communicate with GPG agent. /var/log/syslog shows lines like:
Jul 1 15:15:14 misoan kernel: [20238.265212] audit: type=1400 audit(159365251
Locally, I could make LibreOffice show the GPG private key with the following change against /etc/apparmor.
--- apparmor.
+++ apparmor.
@@ -223,6 +223,7 @@
owner @{HOME}/.gnupg/* r,
owner @{HOME}
+ owner /{,var/
}
# probably should become a subprofile like gpg above, but then it doesn't
Tested with the following packages on Xfce4
$ lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04
$ apt-cache policy libreoffice-common | grep Installed
Installed: 1:6.4.3-
$ apt-cache policy gpg gpg-agent | grep -B1 Installed
gpg:
Installed: 2.2.19-3ubuntu2
--
gpg-agent:
Installed: 2.2.19-3ubuntu2
$ apt-cache policy apparmor | grep Installed
Installed: 2.13.3-7ubuntu5.1
Changed in libreoffice (Ubuntu): | |
importance: | Undecided → Low |
Changed in libreoffice (Ubuntu): | |
assignee: | nobody → Heather Ellsworth (hellsworth) |
tags: |
added: rls-ff-tracking removed: rls-ff-incoming |
Changed in libreoffice (Ubuntu Focal): | |
assignee: | nobody → Heather Ellsworth (hellsworth) |
importance: | Undecided → Low |
status: | New → Confirmed |
tags: | removed: rls-ff-tracking |
Changed in libreoffice (Ubuntu): | |
assignee: | Heather Ellsworth (hellsworth) → nobody |
Changed in libreoffice (Ubuntu Focal): | |
assignee: | Heather Ellsworth (hellsworth) → nobody |
Changed in libreoffice (Ubuntu Focal): | |
assignee: | nobody → Rico Tzschichholz (ricotz) |
Changed in libreoffice (Ubuntu): | |
assignee: | nobody → Rico Tzschichholz (ricotz) |
Changed in libreoffice (Ubuntu Hirsute): | |
status: | Confirmed → In Progress |
Changed in libreoffice (Ubuntu Groovy): | |
assignee: | nobody → Rico Tzschichholz (ricotz) |
importance: | Undecided → Low |
Changed in libreoffice (Ubuntu Hirsute): | |
status: | In Progress → Fix Committed |
Status changed to 'Confirmed' because the bug affects multiple users.