Files
ports/security/gvm-libs/files/patch-util_passwordbasedauthentication.c
T
Jose Alonso Cardenas Marquez 8492b7e93e security/gvm: Update to 26.3.0
databases/pg-gvm: Update to 22.6.11
security/gsa: Update to 26.0.0 (Only amd64 and aarch64)
security/gsad: Update to 24.5.4
security/openvas: Update to 23.28.0 [1]
security/gvmd: Update to 26.0.0
security/gvm-libs: 22.29.2
security/py-greenbone-feed-sync: Update to 25.1.3
security/py-gvm-tools: Update to 25.4.0
security/py-python-gvm: Update to 26.6.0

PR:		289958
Reported by:	Trond Endrestøl <Trond.Endrestol at ximalas.info> [1]
2025-10-08 00:01:30 -07:00

33 lines
898 B
C

--- util/passwordbasedauthentication.c 2025-10-01 02:22:47.000000000 -0700
+++ util/passwordbasedauthentication.c 2025-10-07 22:23:18.428502000 -0700
@@ -14,7 +14,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
@@ -208,6 +214,7 @@
return strlen (setting) > 1 && setting[0] == '$';
}
+#if HAS_CRYPT_R
/**
* @brief Create a password hash.
*
@@ -262,6 +269,7 @@
free (settings);
return result;
}
+#endif /* #if HAS_CRYPT_R */
/**
* @brief Verify a password hash.