diff options
-rw-r--r-- | security/pam_ssh_agent_auth/Makefile | 1 | ||||
-rw-r--r-- | security/pam_ssh_agent_auth/files/patch-openbsd | 85 |
2 files changed, 86 insertions, 0 deletions
diff --git a/security/pam_ssh_agent_auth/Makefile b/security/pam_ssh_agent_auth/Makefile index d3a7ed778312..25a60e8c506e 100644 --- a/security/pam_ssh_agent_auth/Makefile +++ b/security/pam_ssh_agent_auth/Makefile @@ -7,6 +7,7 @@ PORTNAME= pam_ssh_agent_auth PORTVERSION= 0.9.4 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF/pamsshagentauth/${PORTNAME}/v${PORTVERSION}/ diff --git a/security/pam_ssh_agent_auth/files/patch-openbsd b/security/pam_ssh_agent_auth/files/patch-openbsd new file mode 100644 index 000000000000..7f3072be5110 --- /dev/null +++ b/security/pam_ssh_agent_auth/files/patch-openbsd @@ -0,0 +1,85 @@ +diff -ur openbsd-compat/base64.h openbsd-compat/base64.h +--- openbsd-compat/base64.h 2013-02-19 17:52:53.000000000 +0400 ++++ openbsd-compat/base64.h 2013-02-19 17:49:44.000000000 +0400 +@@ -54,6 +54,7 @@ + # endif /* !HAVE_B64_NTOP */ + # define pamsshagentauth___b64_ntop(a,b,c,d) b64_ntop(a,b,c,d) + #endif /* HAVE___B64_NTOP */ ++#define pamsshagentauth___b64_ntop(a,b,c,d) __b64_ntop(a,b,c,d) + + #ifndef HAVE___B64_PTON + # ifndef HAVE_B64_PTON +@@ -61,5 +62,6 @@ + # endif /* !HAVE_B64_PTON */ + # define pamsshagentauth___b64_pton(a,b,c) b64_pton(a,b,c) + #endif /* HAVE___B64_PTON */ ++#define pamsshagentauth___b64_pton(a,b,c) __b64_pton(a,b,c) + + #endif /* _BSD_BASE64_H */ +diff -ur openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-arc4random.c +--- openbsd-compat/bsd-arc4random.c 2012-06-28 05:47:49.000000000 +0400 ++++ openbsd-compat/bsd-arc4random.c 2013-02-19 18:02:38.000000000 +0400 +@@ -82,4 +82,17 @@ + + rc4_ready = REKEY_BYTES; + } ++#else /* HAVE_ARC4RANDOM */ ++ ++unsigned int ++pamsshagentauth_arc4random(void) ++{ ++ return arc4random(); ++} ++ ++void ++pamsshagentauth_arc4random_stir(void) ++{ ++ arc4random_stir(); ++} + #endif /* !HAVE_ARC4RANDOM */ +diff -ur openbsd-compat/strlcat.c openbsd-compat/strlcat.c +--- openbsd-compat/strlcat.c 2012-06-28 05:47:49.000000000 +0400 ++++ openbsd-compat/strlcat.c 2013-02-19 18:03:34.000000000 +0400 +@@ -59,4 +59,10 @@ + return(dlen + (s - src)); /* count does not include NUL */ + } + ++#else /* HAVE_STRLCAT */ ++size_t ++pamsshagentauth_strlcat(char *dst, const char *src, size_t siz) ++{ ++ return strlcat(dst, src, siz); ++} + #endif /* !HAVE_STRLCAT */ +diff -ur openbsd-compat/strlcpy.c openbsd-compat/strlcpy.c +--- openbsd-compat/strlcpy.c 2012-06-28 05:47:49.000000000 +0400 ++++ openbsd-compat/strlcpy.c 2013-02-19 18:04:18.000000000 +0400 +@@ -55,4 +55,10 @@ + return(s - src - 1); /* count does not include NUL */ + } + ++#else /* HAVE_STRLCPY */ ++size_t ++pamsshagentauth_strlcpy(char *dst, const char *src, size_t siz) ++{ ++ return strlcpy(dst, src, siz); ++} + #endif /* !HAVE_STRLCPY */ +diff -ur openbsd-compat/strtonum.c openbsd-compat/strtonum.c +--- openbsd-compat/strtonum.c 2012-06-28 05:47:49.000000000 +0400 ++++ openbsd-compat/strtonum.c 2013-02-19 18:05:16.000000000 +0400 +@@ -69,4 +69,11 @@ + return (ll); + } + +-#endif /* HAVE_STRTONUM */ ++#else /* HAVE_STRTONUM */ ++long long ++pamsshagentauth_strtonum(const char *numstr, long long minval, long long maxval, ++ const char **errstrp) ++{ ++ return strtonum(numstr, minval, maxval, errstrp); ++} ++#endif /* i!HAVE_STRTONUM */ + + |