mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 01:16:28 -04:00
The following ports part of security gvm were updated security/gvmd: Update to 21.4.3 security/gvm-libs: Update to 21.4.2 security/openvas: Update to 21.4.2 security/py-ospd-openvas: Update to 21.4.2 security/py-ospd: Update to 21.4.3 security/greenbone-security-assistant: Update to 21.4.2 - Fix build on FreeBSD 11 [1] PR: 257653 Reported by: John Hein <jcfyecrayz _ at _ liamekaens.com> [1]
29 lines
880 B
C
29 lines
880 B
C
--- util/passwordbasedauthentication.c 2021-08-03 06:50:41.000000000 -0500
|
|
+++ util/passwordbasedauthentication.c 2021-09-04 20:54:26.630524000 -0500
|
|
@@ -26,7 +26,13 @@
|
|
// UFC_crypt defines crypt_r when only when __USE_GNU is set
|
|
// this shouldn't affect other implementations
|
|
#define __USE_GNU
|
|
+#if defined(__FreeBSD__)
|
|
+#if HAS_CRYPT_R
|
|
+#include <unistd.h>
|
|
+#endif
|
|
+#else
|
|
#include <crypt.h>
|
|
+#endif
|
|
// INVALID_HASH is used on verify when the given hash is a NULL pointer.
|
|
// This is done to not directly jump to exit with a INVALID_HASH result
|
|
// but rather keep calculating to make it a little bit harder to guess
|
|
@@ -173,6 +179,7 @@
|
|
return strlen (setting) > 1 && setting[0] == '$';
|
|
}
|
|
|
|
+#if HAS_CRYPT_R
|
|
char *
|
|
pba_hash (struct PBASettings *setting, const char *password)
|
|
{
|
|
@@ -276,3 +283,4 @@
|
|
free (tmp);
|
|
return result;
|
|
}
|
|
+#endif /* #if HAS_CRYPT_R */
|