aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-03-06 20:00:32 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-03-06 20:00:32 +0000
commit007392ff745c93a96c11f382c422bc104c629fe2 (patch)
treed4a945f075d2c6f8af159cbd6ed770308a717d13 /security
parent52386167b53538fcf9a3560292472d0d3040dfd3 (diff)
downloadports-007392ff745c93a96c11f382c422bc104c629fe2.tar.gz
ports-007392ff745c93a96c11f382c422bc104c629fe2.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/pam_google_authenticator/Makefile26
-rw-r--r--security/pam_google_authenticator/distinfo4
-rw-r--r--security/pam_google_authenticator/files/patch-Makefile29
-rw-r--r--security/pam_google_authenticator/files/patch-pam_google_authenticator.c67
-rw-r--r--security/pam_google_authenticator/pkg-plist5
5 files changed, 16 insertions, 115 deletions
diff --git a/security/pam_google_authenticator/Makefile b/security/pam_google_authenticator/Makefile
index ba419ebd4e1b..1271665fd0c2 100644
--- a/security/pam_google_authenticator/Makefile
+++ b/security/pam_google_authenticator/Makefile
@@ -2,31 +2,23 @@
# $FreeBSD$
PORTNAME= pam_google_authenticator
-PORTVERSION= 20140826
-PORTREVISION= 1
+PORTVERSION= 1.01.20160208
+PORTEPOCH= 1
CATEGORIES= security
-MASTER_SITES= LOCAL/riggs/google-authenticator
-DISTNAME= google-authenticator-${PORTVERSION}
MAINTAINER= jnlin@freebsd.cs.nctu.edu.tw
COMMENT= PAM module for two-step authentication from Google
LICENSE= APACHE20
-OPTIONS_DEFINE= STEPSIZE
-STEPSIZE_DESC= Allow time steps other than the default of 30 seconds
-STEPSIZE_CFLAGS= -DSTEPSIZE
+USES= autoreconf gmake libtool
+GNU_CONFIGURE= YES
-USES= gmake
+WRKSRC_SUBDIR= libpam
-PLIST_FILES= bin/google-authenticator lib/pam_google_authenticator.so
-
-.include <bsd.port.options.mk>
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/google-authenticator \
- ${STAGEDIR}${PREFIX}/bin/google-authenticator
- ${INSTALL_LIB} ${WRKSRC}/pam_google_authenticator.so \
- ${STAGEDIR}${PREFIX}/lib/pam_google_authenticator.so
+USE_GITHUB= yes
+GH_ACCOUNT= google
+GH_PROJECT= google-authenticator
+GH_TAGNAME= 195ddc1
.include <bsd.port.mk>
diff --git a/security/pam_google_authenticator/distinfo b/security/pam_google_authenticator/distinfo
index 4df46ef66c7c..34787c65df34 100644
--- a/security/pam_google_authenticator/distinfo
+++ b/security/pam_google_authenticator/distinfo
@@ -1,2 +1,2 @@
-SHA256 (google-authenticator-20140826.tar.gz) = 4988bae896fc48c0ffaa471837289adc5afa1ad6c9f7e3df97907fc134fc2e8d
-SIZE (google-authenticator-20140826.tar.gz) = 38302
+SHA256 (google-google-authenticator-1.01.20160208-195ddc1_GH0.tar.gz) = 65c0ec2dea2191337a921e518e24774058fadd55d52f2a21d60371b5d5a0c2a3
+SIZE (google-google-authenticator-1.01.20160208-195ddc1_GH0.tar.gz) = 1791991
diff --git a/security/pam_google_authenticator/files/patch-Makefile b/security/pam_google_authenticator/files/patch-Makefile
deleted file mode 100644
index 8298be45c8f4..000000000000
--- a/security/pam_google_authenticator/files/patch-Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.orig 2012-05-14 21:32:53.000000000 -0400
-+++ Makefile 2014-08-26 11:26:55.000000000 -0400
-@@ -26,8 +26,6 @@
- echo ' -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT') \
- -fvisibility=hidden $(CFLAGS)
- DEF_LDFLAGS := $(shell [ `uname` = SunOS ] && echo ' -mimpure-text') $(LDFLAGS)
--LDL_LDFLAGS := $(shell $(CC) -shared -ldl -xc -o /dev/null /dev/null \
-- >/dev/null 2>&1 && echo ' -ldl')
-
- all: google-authenticator pam_google_authenticator.so demo \
- pam_google_authenticator_unittest
-@@ -70,14 +68,14 @@
- libpam-google-authenticator-*-source.tar.bz2
-
- google-authenticator: google-authenticator.o base32.o hmac.o sha1.o
-- $(CC) -g $(DEF_LDFLAGS) -o $@ $+ $(LDL_LDFLAGS)
-+ $(CC) -g $(DEF_LDFLAGS) -o $@ $+
-
- demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o
-- $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ $(LDL_LDFLAGS)
-+ $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+
-
- pam_google_authenticator_unittest: pam_google_authenticator_unittest.o \
- base32.o hmac.o sha1.o
-- $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc $(LDL_LDFLAGS)
-+ $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc
-
- pam_google_authenticator.so: base32.o hmac.o sha1.o
- pam_google_authenticator_testing.so: base32.o hmac.o sha1.o
diff --git a/security/pam_google_authenticator/files/patch-pam_google_authenticator.c b/security/pam_google_authenticator/files/patch-pam_google_authenticator.c
deleted file mode 100644
index 32e1da309abd..000000000000
--- a/security/pam_google_authenticator/files/patch-pam_google_authenticator.c
+++ /dev/null
@@ -1,67 +0,0 @@
---- pam_google_authenticator.c.orig 2014-01-30 15:17:38.000000000 +0000
-+++ pam_google_authenticator.c 2014-11-04 17:05:55.000000000 +0000
-@@ -503,10 +503,6 @@
- }
- #endif
-
--static int get_timestamp(void) {
-- return get_time()/30;
--}
--
- static int comparator(const void *a, const void *b) {
- return *(unsigned int *)a - *(unsigned int *)b;
- }
-@@ -538,6 +534,41 @@
- return NULL;
- }
-
-+#if !defined(STEPSIZE)
-+static int get_timestamp(void) {
-+ return get_time()/30;
-+}
-+#else
-+static int get_timestamp(pam_handle_t *pamh, const char *secret_filename,
-+ const char *buf) {
-+ const char *value = get_cfg_value(pamh, "STEP_SIZE", buf);
-+ if (!value) {
-+ // Default step size is 30.
-+ free((void *)value);
-+ return get_time()/30;
-+ } else if (value == &oom) {
-+ // Out of memory. This is a fatal error.
-+ return 0;
-+ }
-+
-+ char *endptr;
-+ errno = 0;
-+ int step = (int)strtoul(value, &endptr, 10);
-+ if (errno || !*value || value == endptr ||
-+ (*endptr && *endptr != ' ' && *endptr != '\t' &&
-+ *endptr != '\n' && *endptr != '\r') ||
-+ step < 1 || step > 60) {
-+ free((void *)value);
-+ log_message(LOG_ERR, pamh, "Invalid STEP_SIZE option in \"%s\"",
-+ secret_filename);
-+ return 0;
-+ }
-+ free((void *)value);
-+
-+ return get_time()/step;
-+}
-+#endif
-+
- static int set_cfg_value(pam_handle_t *pamh, const char *key, const char *val,
- char **buf) {
- size_t key_len = strlen(key);
-@@ -1162,7 +1193,11 @@
- }
-
- // Compute verification codes and compare them with user input
-+#if !defined(STEPSIZE)
- const int tm = get_timestamp();
-+#else
-+ const int tm = get_timestamp(pamh, secret_filename, *buf);
-+#endif
- const char *skew_str = get_cfg_value(pamh, "TIME_SKEW", *buf);
- if (skew_str == &oom) {
- // Out of memory. This is a fatal error
diff --git a/security/pam_google_authenticator/pkg-plist b/security/pam_google_authenticator/pkg-plist
new file mode 100644
index 000000000000..eeaa5796ccaa
--- /dev/null
+++ b/security/pam_google_authenticator/pkg-plist
@@ -0,0 +1,5 @@
+bin/google-authenticator
+lib/security/pam_google_authenticator.so
+share/doc/google-authenticator/FILEFORMAT
+share/doc/google-authenticator/README.md
+share/doc/google-authenticator/totp.html