[Desktop-packages] [Bug 1915910] Re: evince does not print (apparmor, pxgsettings)

2022-11-09 Thread Jefferson Ascaneo
Same issue with evince 42.3-0ubuntu2, apparmor 3.0.4-2ubuntu2.1,
cinnamon 5.2.7-4 on Ubuntu 22.04.1 (jammy).

I believe the apparmor workaround below is better, since it works on any
version:

Inside '/etc/apparmor.d/usr.bin.evince', add following line after the
line containing 'thunar':

  /usr/lib/x86_64-linux-gnu/libproxy/[0-9.]+/pxgsettings Cx ->
sanitized_helper, # Print Dialog

Alternatively, run the command below (one line):

$ sudo sed -i 's|.*/usr/bin/thunar Cx -> sanitized_helper,.*|&\n
/usr/lib/x86_64-linux-gnu/libproxy/[0-9.]+/pxgsettings Cx ->
sanitized_helper, # Print Dialog|' /etc/apparmor.d/usr.bin.evince

The workaround above solves the issue for me.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1915910

Title:
  evince does not print (apparmor, pxgsettings)

Status in evince package in Ubuntu:
  Confirmed
Status in libproxy package in Ubuntu:
  Confirmed
Status in evince package in Debian:
  New

Bug description:
  audit: type=1400 audit(1613557537.646:81): apparmor="DENIED"
  operation="exec" profile="/usr/bin/evince"
  name="/usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings" pid=3500
  comm="sh" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

  It seems that evince has no rights to print if I understand this
  correctly

  Printing the same pdf-file from the same origin/folder works with
  OCULAR

  The error is reproduceable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1915910/+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


[Desktop-packages] [Bug 1967632] Re: [snap] apparmor denied when trying to load pkcs11 module for smart card authentication

2022-08-29 Thread Jefferson Ascaneo
It seems there is another smartcard model used by the Italian
government. I though this could be useful as another example:

$ ldd libstpkcs11.so
linux-vdso.so.1 (0x7ffe51f67000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 
(0x7f394c92a000)
libpcsclite.so.1 => /lib/x86_64-linux-gnu/libpcsclite.so.1 
(0x7f394cfd7000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 
(0x7f394c6fe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f394c4d6000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 
(0x7f394cfb7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f394cfb)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f394cfab000)
/lib64/ld-linux-x86-64.so.2 (0x7f394cffe000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f394cec4000)

-- 
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:
  Unknown
Status in firefox package in Ubuntu:
  Triaged

Bug description:
  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


[Desktop-packages] [Bug 1967632] Re: [snap] apparmor denied when trying to load pkcs11 module for smart card authentication

2022-08-29 Thread Jefferson Ascaneo
I did a quick search and found two deb packages at a Italian government
website containing libbit4xpki.so

This is the output from i386 and amd64 versions:

$ ldd libbit4xpki.so 
linux-gate.so.1 (0xf7f7f000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7d87000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7d82000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7d7d000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7b48000)
/lib/ld-linux.so.2 (0xf7f81000)

$ ldd libbit4xpki.so 
linux-vdso.so.1 (0x7fff13983000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f329bf5c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f329bf57000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f329bf52000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f329b9d8000)
/lib64/ld-linux-x86-64.so.2 (0x7f329c05e000)

-- 
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:
  Unknown
Status in firefox package in Ubuntu:
  Triaged

Bug description:
  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


[Desktop-packages] [Bug 1967632] Re: [snap] apparmor denied when trying to load pkcs11 module for smart card authentication

2022-08-28 Thread Jefferson Ascaneo
Here is the output:

$ ldd /usr/lib/libeToken.so.10.7.77
linux-vdso.so.1 (0x7ffe6e5ae000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7fa98abb3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7fa98abae000)
libpcsclite.so.1 => /lib/x86_64-linux-gnu/libpcsclite.so.1 
(0x7fa98aba2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7fa98a5d8000)
/lib64/ld-linux-x86-64.so.2 (0x7fa98abd3000)

-- 
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:
  Unknown
Status in firefox package in Ubuntu:
  Triaged

Bug description:
  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


[Desktop-packages] [Bug 1967632] Re: [snap] apparmor denied when trying to load pkcs11 module for smart card authentication

2022-08-28 Thread Jefferson Ascaneo
https://launchpad.net/~liuck
Thank you very much! I managed to use my SafeNet eToken 5100 to login to a 
Brazilian government website using your instructions!

In my case, I didn't need to install the libacsccid1 package, maybe that
is related to your smart card. I also didn't have any infinite cycle
when testing my eToken, it seems to work just fine. And the package
pcscd was already installed, since it was needed to use the eToken in
Ubuntu 20.04.

The only remaining "bug" is that I had to manually follow a few symbolic
links to find the real location of the PKCS11 module. In Ubuntu 20.04 I
could just add the path "/usr/lib/libeTPkcs11.so", but this is a
symbolic link to "/usr/lib/libeToken.so", which in turn is a symbolic
link to "/usr/lib/libeToken.so.10.7.77". So it only worked when I used
the final path "/usr/lib/libeToken.so.10.7.77".


Summarizing the solution you gave above, again, but using sudo this time:

$ sudo apt install pcscd
$ sudo mkdir /etc/apparmor.d/abstractions/p11-kit.d/
$ echo "/run/user/[0-9]*/** mr," | sudo tee 
/etc/apparmor.d/abstractions/p11-kit.d/snap
$ echo "/run/pcscd/pcscd.comm rw," | sudo tee -a 
/etc/apparmor.d/abstractions/p11-kit.d/snap
$ sudo sed -i 's|.*#include .*|&\n  #include 
|' /var/lib/snapd/apparmor/profiles/snap.firefox.firefox
$ sudo apparmor_parser -v -C -r 
/var/lib/snapd/apparmor/profiles/snap.firefox.firefox

Then in Firefox -> Settings -> Privacy & Security -> Security devices...
-> Load -> Module name: "eToken SafeNet" in my case, but can be anything
you want, Module filename: "/usr/lib/libeToken.so.10.7.77", also in my
case, you need to find the correct module for you, and it will change
the module path automatically to another starting with "/run/user/..."
after selecting the file.

That's for my USB eToken, my (software) SafeNet reader and my libeToken
module.

My environment:

Ubuntu 22.04.1 LTS
Codename: jammy
Mozilla Firefox 104.0

-- 
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:
  Unknown
Status in firefox package in Ubuntu:
  Triaged

Bug description:
  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