Package: libpam-google-authenticator Severity: serious Tags: patch
libpam-google-authenticator depends on libqrencode3, which has no longer built from the qrencode source package. It has been replaced by libqrencode4. This dependency is hard coded and does not change after a re-build. Looking at the code it seems that libqrencode is used via dlopen/dlsym. The two functions used don't seem to have changed in ABI, so afaict it should be ok to add the new .4 version to the list of sonames to try in the upstream code and change debian/control I have attached a debdiff that makes the aforementioned changes, I have tested the package builds with the debdiff but I have not tested it beyond that.
diff -Nru google-authenticator-20170702/debian/changelog google-authenticator-20170702/debian/changelog --- google-authenticator-20170702/debian/changelog 2017-07-02 10:02:29.000000000 +0000 +++ google-authenticator-20170702/debian/changelog 2018-09-16 07:31:09.000000000 +0000 @@ -1,3 +1,10 @@ +google-authenticator (20170702-1.1) UNRELEASED; urgency=medium + + * Patch proposed to BTS, no intent to NMU + * update for libqrcode4. + + -- Peter Michal Green <[email protected]> Sun, 16 Sep 2018 07:31:09 +0000 + google-authenticator (20170702-1) unstable; urgency=medium * Upstream update (00065df) (Closes: #864187). diff -Nru google-authenticator-20170702/debian/control google-authenticator-20170702/debian/control --- google-authenticator-20170702/debian/control 2016-06-07 17:49:06.000000000 +0000 +++ google-authenticator-20170702/debian/control 2018-09-16 07:31:01.000000000 +0000 @@ -8,7 +8,7 @@ Package: libpam-google-authenticator Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libqrencode3 +Depends: ${shlibs:Depends}, ${misc:Depends}, libqrencode4 Description: Two-step verification The Google Authenticator project includes implementations of one-time passcode generators for several mobile platforms, as well as a diff -Nru google-authenticator-20170702/debian/patches/libqrencode4.patch google-authenticator-20170702/debian/patches/libqrencode4.patch --- google-authenticator-20170702/debian/patches/libqrencode4.patch 1970-01-01 00:00:00.000000000 +0000 +++ google-authenticator-20170702/debian/patches/libqrencode4.patch 2018-09-16 07:31:09.000000000 +0000 @@ -0,0 +1,18 @@ +Description: Add support for libqrencode4 and make it the first choice. +Author: Peter Michal Green <[email protected]> +Last-Update: 2018-09-16 + +--- google-authenticator-20170702.orig/libpam/src/google-authenticator.c ++++ google-authenticator-20170702/libpam/src/google-authenticator.c +@@ -203,7 +203,10 @@ static const char *getURL(const char *se + + // Display QR code visually. If not possible, return 0. + static int displayQRCode(const char* url) { +- void *qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL); ++ void *qrencode = dlopen("libqrencode.so.4", RTLD_NOW | RTLD_LOCAL); ++ if (!qrencode) { ++ qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL); ++ } + if (!qrencode) { + qrencode = dlopen("libqrencode.so.3", RTLD_NOW | RTLD_LOCAL); + } diff -Nru google-authenticator-20170702/debian/patches/series google-authenticator-20170702/debian/patches/series --- google-authenticator-20170702/debian/patches/series 2016-06-07 16:17:33.000000000 +0000 +++ google-authenticator-20170702/debian/patches/series 2018-09-16 07:31:09.000000000 +0000 @@ -0,0 +1 @@ +libqrencode4.patch

