1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

- Unbreak PAM initialize

- While here trim header

PR:		176264
Submitted by:	Constantin Stefanov <cstef@parallel.ru>
This commit is contained in:
Martin Wilke 2013-02-19 16:05:18 +00:00
parent ec565824f0
commit c18d2549a6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=312579
2 changed files with 86 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= pam_ssh_agent_auth
PORTVERSION= 0.9.4
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF/pamsshagentauth/${PORTNAME}/v${PORTVERSION}/

View File

@ -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 */