[Pkg-auth-maintainers] Bug#1058770: globalplatform: establish_context failed with error 0x8010006A (Access denied.)
Ludovic Rousseau
ludovic.rousseau at free.fr
Sat Dec 16 10:47:54 GMT 2023
On Fri, 15 Dec 2023 22:29:46 +0100 Ludovic Rousseau <rousseau at debian.org> wrote:
> Is it possible to modify the tests in globalplatform so that the error
> 0x8010006A is NOT considered as a failure?
No need to disable your tests. I found the solution.
> I am trying to find a long term solution in pcsc-lite.
The idea is to start pcscd with polkit disabled.
In debian/tests/control you add (for both tests):
Restrictions: needs-sudo
In your test files cli and lib you add:
# setup pcscd with NO polkit control to avoid " Access denied." errors
echo "PCSCD_ARGS=--disable-polkit" | sudo tee /etc/default/pcscd
sudo systemctl restart pcscd.service
Proposed patch:
diff --git a/debian/tests/cli b/debian/tests/cli
index 298088b..1e19f2a 100755
--- a/debian/tests/cli
+++ b/debian/tests/cli
@@ -2,6 +2,10 @@
set -e
+# setup pcscd with NO polkit control to avoid " Access denied." errors
+echo "PCSCD_ARGS=--disable-polkit" | sudo tee /etc/default/pcscd
+sudo systemctl restart pcscd.service
+
cat<<EOF | gpshell
enable_trace
establish_context
diff --git a/debian/tests/control b/debian/tests/control
index 63b632f..250c457 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -3,6 +3,7 @@ Depends:
gpshell,
libgppcscconnectionplugin1,
pcscd,
+Restrictions: needs-sudo
Tests: lib
Depends:
@@ -13,3 +14,4 @@ Depends:
libssl-dev,
pcscd,
pkgconf,
+Restrictions: needs-sudo
diff --git a/debian/tests/lib b/debian/tests/lib
index 18aad32..7597c33 100755
--- a/debian/tests/lib
+++ b/debian/tests/lib
@@ -2,6 +2,10 @@
set -e
+# setup pcscd with NO polkit control to avoid " Access denied." errors
+echo "PCSCD_ARGS=--disable-polkit" | sudo tee /etc/default/pcscd
+sudo systemctl restart pcscd.service
+
dir=`dirname "$0"`
# change directory to $AUTOPKGTEST_TMP if available
I can push this patch in salsa and close this bug if you want.
Just tell me.
More information about the Pkg-auth-maintainers
mailing list