]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: auth: use the build options list to report its support
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 18:36:25 +0000 (19:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 20:30:54 +0000 (21:30 +0100)
This removes 1 #ifdef from haproxy.c.

src/auth.c
src/haproxy.c

index 9a988a160e261eda51670a0fb09bac9f1b879e69..b0418892e8fbf2a1adfb3290b9ed21873c88e7e3 100644 (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);
+}
index 074cc5b783c44ae7d7593a65d9e0a75f6ad7e213..cd537acf0317a3247b9c13a83bcc26290963ddda 100644 (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);
        }