This didn't work for me: sudo apt install opensc-pkcs11 sudo snap refresh --edge firefox sudo snap connect firefox:pcscd cp /usr/lib/*/opensc-pkcs11.so $HOME/snap/firefox/common
I need to use a proprietary module, called libaetpkss.so.3.5.4112, from safesign. It works in chrome (deb), and used to work in un-snapped firefox. I changed the steps above to copy that module instead of opensc-pkcs11 to the snap/firefox/common directory. I then try to load it from firefox, but it then says "unable to load module". Nothing in dmesg/apparmor, and the ownership of the file is correct. This module needs old libraries, like openssl1 and gdbm_compat.so.3, which I have in /usr/lib/*. Mayube I need to copy these over too? $ ldd libaetpkss.so.3.5.4112 linux-vdso.so.1 (0x00007ffd31bfe000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x000073f12aa00000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x000073f12b8c4000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x000073f12b8bf000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000073f12b8ba000) libpcsclite.so.1 => /lib/x86_64-linux-gnu/libpcsclite.so.1 (0x000073f12b8ae000) libgdbm_compat.so.3 => /lib/x86_64-linux-gnu/libgdbm_compat.so.3 (0x000073f12a400000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000073f12a000000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000073f12b87f000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000073f129c00000) /lib64/ld-linux-x86-64.so.2 (0x000073f12b8df000) libgdbm.so.3 => /lib/x86_64-linux-gnu/libgdbm.so.3 (0x000073f129600000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000073f12b794000) -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to firefox in Ubuntu. https://bugs.launchpad.net/bugs/1967632 Title: [snap] apparmor denied when trying to load pkcs11 module for smart card authentication Status in Mozilla Firefox: Confirmed Status in chromium-browser package in Ubuntu: Triaged Status in firefox package in Ubuntu: Triaged Bug description: We believe the best solution/work-around at the moment is: sudo apt install opensc-pkcs11 sudo snap refresh --edge firefox sudo snap connect firefox:pcscd cp /usr/lib/*/opensc-pkcs11.so $HOME/snap/firefox/common Then load the module from that path, i.e. $HOME/snap/firefox/common/opensc-pkcs11.so. If you get "unable to load module" make sure you are the owner of the file: chown "$(id -u)" $HOME/snap/firefox/common/opensc-pkcs11.so Please report whether this solves the issue. The part of copying the module to a snap-readable location is clumsy and we will work on a more proper solution to that. ---- I use a smart card to access government sites. I have that working in firefox and chrome on ubuntu impish, and gave jammy a try, but there firefox won't load the library, giving me a generic error. dmesg, however, shows this apparmor denied message: [sáb abr 2 17:32:27 2022] audit: type=1400 audit(1648931547.646:115): apparmor="DENIED" operation="file_mmap" profile="snap.firefox.firefox" name="/run/user/1000/doc/e0bac853/libaetpkss.so.3.5.4112" pid=3680 comm="firefox" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0 Note also the path, that's not what I typed into the firefox dialog box. I have the .so copied to /usr/lib/x86_64-linux- gnu/libaetpkss.so.3.5.4112, and that's what I typed in when prompted for its path by firefox. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: firefox 1:1snap1-0ubuntu2 ProcVersionSignature: Ubuntu 5.15.0-23.23-generic 5.15.27 Uname: Linux 5.15.0-23-generic x86_64 NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair ApportVersion: 2.20.11-0ubuntu80 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Sat Apr 2 17:34:09 2022 InstallationDate: Installed on 2022-03-20 (13 days ago) InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220319) Snap.Changes: no changes found SourcePackage: firefox UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/firefox/+bug/1967632/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp