Index: head/security/pam_google_authenticator/files/patch-pam_google_authenticator.c =================================================================== --- head/security/pam_google_authenticator/files/patch-pam_google_authenticator.c (revision 410479) +++ head/security/pam_google_authenticator/files/patch-pam_google_authenticator.c (nonexistent) @@ -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 Property changes on: head/security/pam_google_authenticator/files/patch-pam_google_authenticator.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/pam_google_authenticator/files/patch-Makefile =================================================================== --- head/security/pam_google_authenticator/files/patch-Makefile (revision 410479) +++ head/security/pam_google_authenticator/files/patch-Makefile (nonexistent) @@ -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 Property changes on: head/security/pam_google_authenticator/files/patch-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/pam_google_authenticator/Makefile =================================================================== --- head/security/pam_google_authenticator/Makefile (revision 410479) +++ head/security/pam_google_authenticator/Makefile (revision 410480) @@ -1,32 +1,24 @@ # Created by: Jui-Nan Lin # $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 - -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 Index: head/security/pam_google_authenticator/distinfo =================================================================== --- head/security/pam_google_authenticator/distinfo (revision 410479) +++ head/security/pam_google_authenticator/distinfo (revision 410480) @@ -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 Index: head/security/pam_google_authenticator/pkg-plist =================================================================== --- head/security/pam_google_authenticator/pkg-plist (nonexistent) +++ head/security/pam_google_authenticator/pkg-plist (revision 410480) @@ -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 Property changes on: head/security/pam_google_authenticator/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property