X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fauths%2Fdovecot.c;h=2dcaa0e42096d660788c467452be8d7b6c71a4d0;hb=d5b80e59458182b2d557a929a18cb8c70cd56b68;hp=9641beff4149c53b9d224efe8920cb04115d4725;hpb=96f5fe4ce29825208eafffcb3579d789dc5b45d1;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/auths/dovecot.c b/src/src/auths/dovecot.c index 9641beff4..2dcaa0e42 100644 --- a/src/src/auths/dovecot.c +++ b/src/src/auths/dovecot.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004 Andrey Panin - * Copyright (c) 2006-2014 The Exim Maintainers + * Copyright (c) 2006-2016 The Exim Maintainers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -71,6 +71,19 @@ auth_dovecot_options_block auth_dovecot_option_defaults = { }; + + +#ifdef MACRO_PREDEF + +/* Dummy values */ +void auth_dovecot_init(auth_instance *ablock) {} +int auth_dovecot_server(auth_instance *ablock, uschar *data) {return 0;} +int auth_dovecot_client(auth_instance *ablock, smtp_inblock *inblock, + smtp_outblock *outblock, int timeout, uschar *buffer, int buffsize) {return 0;} + +#else /*!MACRO_PREDEF*/ + + /* Static variables for reading from the socket */ static uschar sbuffer[256]; @@ -240,7 +253,7 @@ uschar *auth_command; uschar *auth_extra_data = US""; uschar *p; int nargs, tmp; -int crequid = 1, cont = 1, fd, ret = DEFER; +int crequid = 1, cont = 1, fd = -1, ret = DEFER; BOOL found = FALSE, have_mech_line = FALSE; HDEBUG(D_auth) debug_printf("dovecot authentication\n"); @@ -380,7 +393,7 @@ fprintf(f, "VERSION\t%d\t%d\r\nSERVICE\tSMTP\r\nCPID\t%d\r\n" "AUTH\t%d\t%s\trip=%s\tlip=%s\tresp=%s\r\n", VERSION_MAJOR, VERSION_MINOR, getpid(), cuid, ablock->public_name, sender_host_address, interface_address, - data ? (char *) data : ""); + data ? CS data : ""); Subsequently, the command was modified to add "secured" and "valid-client- cert" when relevant. @@ -495,3 +508,6 @@ if (fd >= 0) /* Expand server_condition as an authorization check */ return ret == OK ? auth_check_serv_cond(ablock) : ret; } + + +#endif /*!MACRO_PREDEF*/