X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fauths%2Fplaintext.c;h=ab703daec6aae645fb959cd9c3c7f325b7be25a4;hb=a57492a480bce6d41dec5255d4a55550aa9d4f87;hp=6c9703554ae6dd72da2df53d7f0469cedaa54530;hpb=37942ad83fcb6b788cceb4abe2891c92651811a7;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/auths/plaintext.c b/src/src/auths/plaintext.c index 6c9703554..ab703daec 100644 --- a/src/src/auths/plaintext.c +++ b/src/src/auths/plaintext.c @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2018 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ #include "../exim.h" @@ -13,11 +14,11 @@ optionlist auth_plaintext_options[] = { { "client_ignore_invalid_base64", opt_bool, - (void *)(offsetof(auth_plaintext_options_block, client_ignore_invalid_base64)) }, + OPT_OFF(auth_plaintext_options_block, client_ignore_invalid_base64) }, { "client_send", opt_stringptr, - (void *)(offsetof(auth_plaintext_options_block, client_send)) }, + OPT_OFF(auth_plaintext_options_block, client_send) }, { "server_prompts", opt_stringptr, - (void *)(offsetof(auth_plaintext_options_block, server_prompts)) } + OPT_OFF(auth_plaintext_options_block, server_prompts) } }; /* Size of the options list. An extern variable has to be used so that its @@ -74,14 +75,14 @@ if (ob->client_send != NULL) ablock->client = TRUE; /* For interface, see auths/README */ int -auth_plaintext_server(auth_instance *ablock, uschar *data) +auth_plaintext_server(auth_instance * ablock, uschar * data) { -auth_plaintext_options_block *ob = +auth_plaintext_options_block * ob = (auth_plaintext_options_block *)(ablock->options_block); -const uschar *prompts = ob->server_prompts; -uschar *clear, *end, *s; +const uschar * prompts = ob->server_prompts; +uschar * s; int number = 1; -int len, rc; +int rc; int sep = 0; /* Expand a non-empty list of prompt strings */ @@ -108,7 +109,7 @@ already been provided as part of the AUTH command. For the rest, send them out as prompts, and get a data item back. If the data item is "*", abandon the authentication attempt. Otherwise, split it into items as above. */ -while ( (s = string_nextinlist(&prompts, &sep, big_buffer, big_buffer_size)) +while ( (s = string_nextinlist(&prompts, &sep, NULL, 0)) && expand_nmax < EXPAND_MAXN) if (number++ > expand_nmax) if ((rc = auth_prompt(CUS s)) != OK) @@ -143,7 +144,6 @@ auth_plaintext_options_block *ob = (auth_plaintext_options_block *)(ablock->options_block); const uschar * text = ob->client_send; const uschar * s; -BOOL first = TRUE; int sep = 0; int auth_var_idx = 0, rc; int flags = AUTH_ITEM_FIRST;