CLEANUP: auth: use the build options list to report its support

This removes 1 #ifdef from haproxy.c.
This commit is contained in:
Willy Tarreau 2016-12-21 19:36:25 +01:00
parent b97c6fb59e
commit e8692b41e5
2 changed files with 7 additions and 8 deletions

View File

@ -25,6 +25,7 @@
#include <string.h>
#include <unistd.h>
#include <types/global.h>
#include <common/config.h>
#include <common/errors.h>
@ -294,3 +295,9 @@ pat_match_auth(struct sample *smp, struct pattern_expr *expr, int fill)
}
return NULL;
}
__attribute__((constructor))
static void __auth_init(void)
{
hap_register_build_opts("Encrypted password support via crypt(3): yes", 0);
}

View File

@ -325,14 +325,6 @@ static void display_build_opts()
"\n\n",
DEFAULT_MAXCONN, BUFSIZE, MAXREWRITE, MAX_POLL_EVENTS);
printf("Encrypted password support via crypt(3): "
#ifdef CONFIG_HAP_CRYPT
"yes"
#else
"no"
#endif
"\n");
list_for_each_entry(item, &build_opts_list, list) {
puts(item->str);
}