Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 419177 - sys-auth/google-authenticator - PAM Module for one-time passcode generators
Summary: sys-auth/google-authenticator - PAM Module for one-time passcode generators
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/google/google-auth...
Whiteboard: [sunrise-overlay]
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2012-06-02 05:30 UTC by Manuel Rüger (RETIRED)
Modified: 2016-03-14 02:50 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
drop qrencode automagic (google-authenticator-1.0-dropqrencode.patch,4.33 KB, patch)
2012-07-07 19:55 UTC, Manuel Rüger (RETIRED)
Details | Diff
google-authenticator-1.0-Makefile.patch (google-authenticator-1.0-Makefile.patch,2.32 KB, patch)
2012-07-07 19:56 UTC, Manuel Rüger (RETIRED)
Details | Diff
google-authenticator-1.0-dropqrencode.patch (google-authenticator-1.0-dropqrencode.patch,4.33 KB, patch)
2012-07-07 19:56 UTC, Manuel Rüger (RETIRED)
Details | Diff
google-authenticator-1.0.ebuild (google-authenticator-1.0.ebuild,924 bytes, text/plain)
2012-07-07 19:57 UTC, Manuel Rüger (RETIRED)
Details
google-authenticator-1.0.ebuild (google-authenticator-1.0.ebuild,1.14 KB, text/plain)
2012-07-09 22:03 UTC, Manuel Rüger (RETIRED)
Details
google-authenticator-9999.ebuild (google-authenticator-9999.ebuild,929 bytes, text/plain)
2015-07-14 16:01 UTC, Tim Dodge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rüger (RETIRED) gentoo-dev 2012-06-02 05:30:51 UTC
"The Google Authenticator project includes implementations of one-time passcode generators for several mobile platforms, as well as a pluggable authentication module (PAM). One-time passcodes are generated using open standards developed by the Initiative for Open Authentication (OATH) (which is unrelated to OAuth).

These implementations support the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.
Implementations

This project currently offers mobile application implementations of HOTP/TOTP for Android, iOS, and Blackberry, as well as a PAM module. "

Informative blog post:
http://www.sharpley.org.uk/lightdm-google-authentication


Please add it to the tree.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-06-02 18:51:42 UTC
Maybe you can speed up the inclusion process by submitting an ebuild for review :)
Comment 2 Manuel Rüger (RETIRED) gentoo-dev 2012-07-07 19:55:33 UTC
Created attachment 317522 [details, diff]
drop qrencode automagic
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2012-07-07 19:56:08 UTC
Created attachment 317524 [details, diff]
google-authenticator-1.0-Makefile.patch
Comment 4 Manuel Rüger (RETIRED) gentoo-dev 2012-07-07 19:56:21 UTC
Created attachment 317526 [details, diff]
google-authenticator-1.0-dropqrencode.patch
Comment 5 Manuel Rüger (RETIRED) gentoo-dev 2012-07-07 19:56:44 UTC
Comment on attachment 317526 [details, diff]
google-authenticator-1.0-dropqrencode.patch

>Sa 2. Jun 08:15:51 CEST 2012
>Manuel Rueger (gentoo@rueg.eu)
>Drops the complete qrencode-dependend code.
>No automagic wanted.
>
>--- google-authenticator.c.old	2012-06-02 08:11:02.707494577 +0200
>+++ google-authenticator.c	2012-06-02 08:12:44.782495926 +0200
>@@ -183,114 +183,6 @@
>   const char *url = getURL(secret, label, &encoderURL, use_totp);
>   puts(encoderURL);
> 
>-  // Only newer systems have support for libqrencode. So, instead of requiring
>-  // it at build-time, we look for it at run-time. If it cannot be found, the
>-  // user can still type the code in manually, or he can copy the URL into
>-  // his browser.
>-  if (isatty(1)) {
>-    void *qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL);
>-    if (!qrencode) {
>-      qrencode = dlopen("libqrencode.so.3", RTLD_NOW | RTLD_LOCAL);
>-    }
>-    if (qrencode) {
>-      typedef struct {
>-        int version;
>-        int width;
>-        unsigned char *data;
>-      } QRcode;
>-      QRcode *(*QRcode_encodeString8bit)(const char *, int, int) =
>-        (QRcode *(*)(const char *, int, int))
>-        dlsym(qrencode, "QRcode_encodeString8bit");
>-      void (*QRcode_free)(QRcode *qrcode) =
>-        (void (*)(QRcode *))dlsym(qrencode, "QRcode_free");
>-      if (QRcode_encodeString8bit && QRcode_free) {
>-        QRcode *qrcode = QRcode_encodeString8bit(url, 0, 1);
>-        char *ptr = (char *)qrcode->data;
>-        // Output QRCode using ANSI colors. Instead of black on white, we
>-        // output black on grey, as that works independently of whether the
>-        // user runs his terminals in a black on white or white on black color
>-        // scheme.
>-        // But this requires that we print a border around the entire QR Code.
>-        // Otherwise, readers won't be able to recognize it.
>-        if (qr_mode != QR_UTF8) {
>-          for (int i = 0; i < 2; ++i) {
>-            printf(ANSI_BLACKONGREY);
>-            for (int x = 0; x < qrcode->width + 4; ++x) printf("  ");
>-            puts(ANSI_RESET);
>-          }
>-          for (int y = 0; y < qrcode->width; ++y) {
>-            printf(ANSI_BLACKONGREY"    ");
>-            int isBlack = 0;
>-            for (int x = 0; x < qrcode->width; ++x) {
>-              if (*ptr++ & 1) {
>-                if (!isBlack) {
>-                  printf(ANSI_BLACK);
>-                }
>-                isBlack = 1;
>-              } else {
>-                if (isBlack) {
>-                  printf(ANSI_WHITE);
>-                }
>-                isBlack = 0;
>-              }
>-              printf("  ");
>-            }
>-            if (isBlack) {
>-              printf(ANSI_WHITE);
>-            }
>-            puts("    "ANSI_RESET);
>-          }
>-          for (int i = 0; i < 2; ++i) {
>-            printf(ANSI_BLACKONGREY);
>-            for (int x = 0; x < qrcode->width + 4; ++x) printf("  ");
>-            puts(ANSI_RESET);
>-          }
>-        } else {
>-          // Drawing the QRCode with Unicode block elements is desirable as
>-          // it makes the code much smaller, which is often easier to scan.
>-          // Unfortunately, many terminal emulators do not display these
>-          // Unicode characters properly.
>-          printf(ANSI_BLACKONGREY);
>-          for (int i = 0; i < qrcode->width + 4; ++i) {
>-            printf(" ");
>-          }
>-          puts(ANSI_RESET);
>-          for (int y = 0; y < qrcode->width; y += 2) {
>-            printf(ANSI_BLACKONGREY"  ");
>-            for (int x = 0; x < qrcode->width; ++x) {
>-              int top = qrcode->data[y*qrcode->width + x] & 1;
>-              int bottom = 0;
>-              if (y+1 < qrcode->width) {
>-                bottom = qrcode->data[(y+1)*qrcode->width + x] & 1;
>-              }
>-              if (top) {
>-                if (bottom) {
>-                  printf(UTF8_BOTH);
>-                } else {
>-                  printf(UTF8_TOPHALF);
>-                }
>-              } else {
>-                if (bottom) {
>-                  printf(UTF8_BOTTOMHALF);
>-                } else {
>-                  printf(" ");
>-                }
>-              }
>-            }
>-            puts("  "ANSI_RESET);
>-          }
>-          printf(ANSI_BLACKONGREY);
>-          for (int i = 0; i < qrcode->width + 4; ++i) {
>-            printf(" ");
>-          }
>-          puts(ANSI_RESET);
>-        }
>-        QRcode_free(qrcode);
>-      }
>-      dlclose(qrencode);
>-    }
>-  }
>-
>   free((char *)url);
>   free(encoderURL);
> }
Comment 6 Manuel Rüger (RETIRED) gentoo-dev 2012-07-07 19:57:09 UTC
Created attachment 317528 [details]
google-authenticator-1.0.ebuild
Comment 7 Manuel Rüger (RETIRED) gentoo-dev 2012-07-09 22:03:47 UTC
Created attachment 317736 [details]
google-authenticator-1.0.ebuild

This will soon be in the sunrise overlay. You can find it at:
http://git.overlays.gentoo.org/gitweb/?p=proj/sunrise-reviewed.git;a=tree;f=sys-auth/google-authenticator
Comment 8 Jan Sembera 2013-06-01 20:29:14 UTC
Any chance this could get to distro proper?
Comment 9 Tim Dodge 2015-07-14 16:01:02 UTC
Created attachment 406804 [details]
google-authenticator-9999.ebuild

I've updated the sunrise ebuild to build from github.
Comment 10 Adrian 2015-12-25 18:45:24 UTC
It would be great to have this in the main portage tree. Having to enable sunrise just for this (or copy it into the local portage overlay) is rather annoying. Especially considering that there's always some error spam when using eix-sync with sunrise enabled...
Comment 11 Michael Palimaka (kensington) gentoo-dev 2015-12-25 18:48:12 UTC
Any new package needs a maintainer to enter the main tree. If that sounds like you, check out https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 12 Adrian 2015-12-25 19:36:16 UTC
I wouldn't mind, especially considering how little activity this specific package has.
Comment 13 Ian Delaney (RETIRED) gentoo-dev 2016-01-03 03:21:21 UTC
well, simply declare ckearly you wish / want to become the proxy maintianer nd it's a start. In this case there is already an ebuild submitted by someone else which confuses ownership. However we can sort that. Consider joining in the irc channel listed in https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 14 SpanKY gentoo-dev 2016-03-14 02:50:36 UTC
in the tree now because i wants it

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=987becfd4f95c4527156e2c51ebe6972e33b280d