X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/a73f05479a4bed3bf77d21a75da9515c4ae83a62..13a4b4c1810a1a9f3c956f1e92807a0d86c6f5bf:/src/src/auths/gsasl_exim.c?ds=sidebyside diff --git a/src/src/auths/gsasl_exim.c b/src/src/auths/gsasl_exim.c index 1c4af92fc..b50c78056 100644 --- a/src/src/auths/gsasl_exim.c +++ b/src/src/auths/gsasl_exim.c @@ -54,42 +54,29 @@ static void dummy(int x) { dummy2(x-1); } we only ever handle one mechanism at a time, I didn't see the point in keeping that. In case someone sees a point, I've left the condition_check() API alone. */ +#define LOFF(field) OPT_OFF(auth_gsasl_options_block, field) + optionlist auth_gsasl_options[] = { - { "client_authz", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, client_authz)) }, - { "client_channelbinding", opt_bool, - (void *)(offsetof(auth_gsasl_options_block, client_channelbinding)) }, - { "client_password", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, client_password)) }, - { "client_spassword", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, client_spassword)) }, - { "client_username", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, client_username)) }, - - { "server_channelbinding", opt_bool, - (void *)(offsetof(auth_gsasl_options_block, server_channelbinding)) }, - { "server_hostname", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_hostname)) }, + { "client_authz", opt_stringptr, LOFF(client_authz) }, + { "client_channelbinding", opt_bool, LOFF(client_channelbinding) }, + { "client_password", opt_stringptr, LOFF(client_password) }, + { "client_spassword", opt_stringptr, LOFF(client_spassword) }, + { "client_username", opt_stringptr, LOFF(client_username) }, + + { "server_channelbinding", opt_bool, LOFF(server_channelbinding) }, + { "server_hostname", opt_stringptr, LOFF(server_hostname) }, #ifdef EXIM_GSASL_SCRAM_S_KEY - { "server_key", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_key)) }, + { "server_key", opt_stringptr, LOFF(server_key) }, #endif - { "server_mech", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_mech)) }, - { "server_password", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_password)) }, - { "server_realm", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_realm)) }, - { "server_scram_iter", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_scram_iter)) }, - { "server_scram_salt", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_scram_salt)) }, + { "server_mech", opt_stringptr, LOFF(server_mech) }, + { "server_password", opt_stringptr, LOFF(server_password) }, + { "server_realm", opt_stringptr, LOFF(server_realm) }, + { "server_scram_iter", opt_stringptr, LOFF(server_scram_iter) }, + { "server_scram_salt", opt_stringptr, LOFF(server_scram_salt) }, #ifdef EXIM_GSASL_SCRAM_S_KEY - { "server_skey", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_s_key)) }, + { "server_skey", opt_stringptr, LOFF(server_s_key) }, #endif - { "server_service", opt_stringptr, - (void *)(offsetof(auth_gsasl_options_block, server_service)) } + { "server_service", opt_stringptr, LOFF(server_service) } }; int auth_gsasl_options_count =