FreeBSD Bugzilla – Attachment 226993 Details for
Bug 257653
security/gvm-libs: 21.4.1 build fails (incomplete type 'crypt_data', etc.)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[patch] don't build code that requires crypt_r on 11.x
pr-gvm-libs-fix-missing-crypt_r-build-error.diff (text/plain), 2.31 KB, created by
John Hein
on 2021-08-06 15:36:28 UTC
(
hide
)
Description:
[patch] don't build code that requires crypt_r on 11.x
Filename:
MIME Type:
Creator:
John Hein
Created:
2021-08-06 15:36:28 UTC
Size:
2.31 KB
patch
obsolete
>diff --git a/security/gvm-libs/files/patch-util_passwordbasedauthentication.c b/security/gvm-libs/files/patch-util_passwordbasedauthentication.c >index 7f58b15edbae..ebb764de1dcf 100644 >--- a/security/gvm-libs/files/patch-util_passwordbasedauthentication.c >+++ b/security/gvm-libs/files/patch-util_passwordbasedauthentication.c >@@ -1,14 +1,29 @@ >---- util/passwordbasedauthentication.c 2021-07-08 17:07:24.145438000 -0500 >-+++ util/passwordbasedauthentication.c 2021-07-08 17:08:24.809605000 -0500 >-@@ -26,7 +26,11 @@ >+--- util/passwordbasedauthentication.c.orig 2021-06-23 12:41:48 UTC >++++ util/passwordbasedauthentication.c >+@@ -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 @@ pba_is_phc_compliant (const char *settin >+ return strlen (setting) > 1 && setting[0] == '$'; >+ } >+ >++#if HAS_CRYPT_R >+ char * >+ pba_hash (struct PBASettings *setting, const char *password) >+ { >+@@ -276,3 +283,4 @@ exit: >+ free (tmp); >+ return result; >+ } >++#endif /* #if HAS_CRYPT_R */ >diff --git a/security/gvm-libs/files/patch-util_passwordbasedauthentication.h b/security/gvm-libs/files/patch-util_passwordbasedauthentication.h >new file mode 100644 >index 000000000000..0e7723898861 >--- /dev/null >+++ b/security/gvm-libs/files/patch-util_passwordbasedauthentication.h >@@ -0,0 +1,21 @@ >+Don't compile pba_hash and pba_verify_hash() on FreeBSD 11.x which >+(currently) does not have crypt_r(3). >+ >+This can be removed when support for 11.x is no longer needed in the >+ports tree. >+ >+--- util/passwordbasedauthentication.h.orig 2021-06-23 12:41:48 UTC >++++ util/passwordbasedauthentication.h >+@@ -18,6 +18,12 @@ >+ #ifndef _GVM_PASSWORDBASEDAUTHENTICATION_H >+ #define _GVM_PASSWORDBASEDAUTHENTICATION_H >+ >++#if defined(__FreeBSD__) && __FreeBSD__ < 12 >++#define HAS_CRYPT_R 0 >++#else >++#define HAS_CRYPT_R 1 >++#endif >++ >+ /* max amount of applied pepper */ >+ #define MAX_PEPPER_SIZE 4 >+ /* is used when count is 0 on init*/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jcfyecrayz
:
maintainer-approval?
(
acm
)
Actions:
View
|
Diff
Attachments on
bug 257653
: 226993