From e8692b41e5fb5a658fad3f0c81d6e2babb91eeb7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 21 Dec 2016 19:36:25 +0100 Subject: [PATCH] CLEANUP: auth: use the build options list to report its support This removes 1 #ifdef from haproxy.c. --- src/auth.c | 7 +++++++ src/haproxy.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/auth.c b/src/auth.c index 9a988a160e..b0418892e8 100644 --- a/src/auth.c +++ b/src/auth.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -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); +} diff --git a/src/haproxy.c b/src/haproxy.c index 074cc5b783..cd537acf03 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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); } -- 2.39.5