X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Fsmtp_out.c;h=4e8c4486944476610c96e60bd96b05362c8f4795;hb=18d243312bf3a23bd0f464fac44797e2720e03ec;hp=2b03c03f3e76eacd23bcddd3651b5ae50cb81526;hpb=843edb3830b89e01fd2b956d2a0d23d13e29b55e;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index 2b03c03f3..4e8c44869 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -53,11 +53,8 @@ if (!(expint = expand_string(istring))) return FALSE; } -if (is_tainted(expint)) +if (is_tainted2(expint, LOG_MAIN|LOG_PANIC, "Tainted value '%s' from '%s' for interface", expint, istring)) { - log_write(0, LOG_MAIN|LOG_PANIC, - "attempt to use tainted value '%s' from '%s' for interface", - expint, istring); addr->transport_return = PANIC; addr->message = string_sprintf("failed to expand \"interface\" " "option for %s: configuration error", msg); @@ -472,7 +469,7 @@ if (ob->socks_proxy) { int sock = socks_sock_connect(sc->host, sc->host_af, port, sc->interface, sc->tblock, ob->connect_timeout); - + if (sock >= 0) { if (early_data && early_data->data && early_data->len) @@ -659,8 +656,9 @@ if (format) while (*p) *p++ = '*'; } - HDEBUG(D_transport|D_acl|D_v) - debug_printf_indent(" SMTP%c> %s\n", ">+|"[mode], big_buffer); + HDEBUG(D_transport|D_acl|D_v) debug_printf_indent(" SMTP%c> %s\n", + mode == SCMD_BUFFER ? '|' : mode == SCMD_MORE ? '+' : '>', + big_buffer); } if (mode != SCMD_BUFFER) @@ -691,7 +689,7 @@ Arguments: timelimit deadline for reading the lime, seconds past epoch Returns: length of a line that has been put in the buffer - -1 otherwise, with errno set + -1 otherwise, with errno set, and inblock->ptr adjusted */ static int @@ -732,6 +730,7 @@ for (;;) { *p = 0; /* Leave malformed line for error message */ errno = ERRNO_SMTPFORMAT; + inblock->ptr = ptr; return -1; } } @@ -757,6 +756,7 @@ for (;;) /* Get here if there has been some kind of recv() error; errno is set, but we ensure that the result buffer is empty before returning. */ +inblock->ptr = inblock->ptrend = inblock->buffer; *buffer = 0; return -1; }