X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/c4a8c663b74a35b547d8320547079ca56b3b772e..38965d80d70cacd0c944d32f7107549a3a272b35:/src/src/auths/external.c diff --git a/src/src/auths/external.c b/src/src/auths/external.c index 10e1366a8..6ae5833af 100644 --- a/src/src/auths/external.c +++ b/src/src/auths/external.c @@ -2,8 +2,10 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) Jeremy Harris 2019 */ +/* Copyright (c) The Exim Maintainers 2023 */ +/* Copyright (c) Jeremy Harris 2019-2020 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* This file provides an Exim authenticator driver for a server to verify a client SSL certificate, using the EXTERNAL @@ -12,17 +14,16 @@ method defined in RFC 4422 Appendix A. #include "../exim.h" + +#ifdef AUTH_EXTERNAL /* Remainder of file */ #include "external.h" /* Options specific to the external authentication mechanism. */ optionlist auth_external_options[] = { - { "client_send", opt_stringptr, - (void *)(offsetof(auth_external_options_block, client_send)) }, - { "server_param2", opt_stringptr, - (void *)(offsetof(auth_external_options_block, server_param2)) }, - { "server_param3", opt_stringptr, - (void *)(offsetof(auth_external_options_block, server_param3)) }, + { "client_send", opt_stringptr, OPT_OFF(auth_external_options_block, client_send) }, + { "server_param2", opt_stringptr, OPT_OFF(auth_external_options_block, server_param2) }, + { "server_param3", opt_stringptr, OPT_OFF(auth_external_options_block, server_param3) }, }; /* Size of the options list. An extern variable has to be used so that its @@ -106,7 +107,7 @@ if (expand_nmax == 0) /* skip if rxd data */ if (ob->server_param2) { uschar * s = expand_string(ob->server_param2); - auth_vars[expand_nmax] = s; + auth_vars[expand_nmax = 1] = s; expand_nstring[++expand_nmax] = s; expand_nlength[expand_nmax] = Ustrlen(s); if (ob->server_param3) @@ -154,5 +155,6 @@ return OK; -#endif /*!MACRO_PREDEF*/ +#endif /*!MACRO_PREDEF*/ +#endif /*AUTH_EXTERNAL*/ /* End of external.c */