From: Eric Bollengier Date: Fri, 15 Oct 2021 11:50:05 +0000 (+0200) Subject: totp-bpam: Add support for qrencode 3.x on Redhat X-Git-Tag: Beta-15.0.0~820 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6bfc1ad5828b1ba43756f243176518bb8e88d45;p=thirdparty%2Fbacula.git totp-bpam: Add support for qrencode 3.x on Redhat --- diff --git a/bacula/src/plugins/dir/totp/totp-dir.c b/bacula/src/plugins/dir/totp/totp-dir.c index 1d5cf23ee..83bd3b6c7 100644 --- a/bacula/src/plugins/dir/totp/totp-dir.c +++ b/bacula/src/plugins/dir/totp/totp-dir.c @@ -478,7 +478,7 @@ public: fclose(fp); // Call qrencode to generate the QR code, else display the URL - Mmsg(tmp, "qrencode -t ansiutf8 -r \"%s\"", urlfile); + Mmsg(tmp, "sh -c 'cat \"%s\" | qrencode -t ansiutf8'", urlfile); if (run_program_full_output (tmp.c_str(), 0, *ret, NULL) != 0) { berrno be; Dmsg1(DINFO, "Unable to call qrencode on a new key. ERR=%s\n", be.bstrerror()); @@ -536,7 +536,7 @@ public: } // Call qrencode to generate the QR code, else display the URL - Mmsg(tmp, "qrencode -s 10 -t png -o \"%s\" -r \"%s\"", pngfile, urlfile); + Mmsg(tmp, "sh -c 'cat \"%s\" | qrencode -s 10 -t png -o \"%s\"'", urlfile, pngfile); if (run_program_full_output (tmp.c_str(), 0, *ret, NULL) != 0) { Dmsg0(0, "Unable to generate the totp png file from the key\n"); goto bail_out;