Since 1.8 with commit
e8692b41e ("CLEANUP: auth: use the build options list
to report its support"), crypt(3) is always reported as being supported in
"haproxy -vv" because no test on USE_LIBCRYPT is made anymore when
producing the output.
This reintroduces the distinction between with and without USE_LIBCRYPT
in the output by indicating "yes" or "no". It may be backported as far
as 1.8, though the code differs due to a number of include files cleanups.
struct userlist *userlist = NULL; /* list of all existing userlists */
#ifdef USE_LIBCRYPT
+#define CRYPT_STATE_MSG "yes"
#ifdef HA_HAVE_CRYPT_R
/* context for crypt_r() */
static THREAD_LOCAL struct crypt_data crypt_data = { .initialized = 0 };
/* lock for crypt() */
__decl_thread(static HA_SPINLOCK_T auth_lock);
#endif
+#else /* USE_LIBCRYPT */
+#define CRYPT_STATE_MSG "no"
#endif
/* find targets for selected groups. The function returns pointer to
return NULL;
}
-REGISTER_BUILD_OPTS("Encrypted password support via crypt(3): yes");
+REGISTER_BUILD_OPTS("Encrypted password support via crypt(3): "CRYPT_STATE_MSG);