X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Facl.c;h=492e9bf17543cf5546de8737353a9c4a12dff2e8;hb=65de12cc1acfeeacf85c3fd77d244b9dc7e79bdc;hp=ec1505bf0023f685ae7c5f301fae005479493b2f;hpb=b0b9dbb191f8c60bf7233338a9a0a14c72f1f7a0;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/acl.c b/src/src/acl.c index ec1505bf0..492e9bf17 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -513,7 +513,12 @@ static unsigned int cond_forbids[] = { ~(1<special_action; *basic_errno = sender_vaddr->basic_errno; @@ -2115,22 +2121,21 @@ else if (verify_sender_address != NULL) HDEBUG(D_acl) debug_printf("----------- end verify ------------\n"); - if (rc == OK) - { - if (Ustrcmp(sender_vaddr->address, verify_sender_address) != 0) - { - DEBUG(D_acl) debug_printf("sender %s verified ok as %s\n", - verify_sender_address, sender_vaddr->address); - } - else - { - DEBUG(D_acl) debug_printf("sender %s verified ok\n", - verify_sender_address); - } - } - else *basic_errno = sender_vaddr->basic_errno; + if (rc != OK) + *basic_errno = sender_vaddr->basic_errno; + else + DEBUG(D_acl) + { + if (Ustrcmp(sender_vaddr->address, verify_sender_address) != 0) + debug_printf("sender %s verified ok as %s\n", + verify_sender_address, sender_vaddr->address); + else + debug_printf("sender %s verified ok\n", + verify_sender_address); + } } - else rc = OK; /* Null sender */ + else + rc = OK; /* Null sender */ /* Cache the result code */ @@ -2983,8 +2988,6 @@ acl_check_condition(int verb, acl_condition_block *cb, int where, { uschar *user_message = NULL; uschar *log_message = NULL; -uschar *debug_tag = NULL; -uschar *debug_opts = NULL; int rc = OK; #ifdef WITH_CONTENT_SCAN int sep = -'/'; @@ -3336,24 +3339,39 @@ for (; cb != NULL; cb = cb->next) break; case CONTROL_DEBUG: - while (*p == '/') { - if (Ustrncmp(p, "/tag=", 5) == 0) - { - const uschar *pp = p + 5; - while (*pp != '\0' && *pp != '/') pp++; - debug_tag = string_copyn(p+5, pp-p-5); - p = pp; - } - else if (Ustrncmp(p, "/opts=", 6) == 0) + uschar * debug_tag = NULL; + uschar * debug_opts = NULL; + BOOL kill = FALSE; + + while (*p == '/') { - const uschar *pp = p + 6; - while (*pp != '\0' && *pp != '/') pp++; - debug_opts = string_copyn(p+6, pp-p-6); + const uschar * pp = p+1; + if (Ustrncmp(pp, "tag=", 4) == 0) + { + for (pp += 4; *pp && *pp != '/';) pp++; + debug_tag = string_copyn(p+5, pp-p-5); + } + else if (Ustrncmp(pp, "opts=", 5) == 0) + { + for (pp += 5; *pp && *pp != '/';) pp++; + debug_opts = string_copyn(p+6, pp-p-6); + } + else if (Ustrncmp(pp, "kill", 4) == 0) + { + for (pp += 4; *pp && *pp != '/';) pp++; + kill = TRUE; + } + else + while (*pp && *pp != '/') pp++; p = pp; } + + if (kill) + debug_logging_stop(); + else + debug_logging_activate(debug_tag, debug_opts); } - debug_logging_activate(debug_tag, debug_opts); break; case CONTROL_SUPPRESS_LOCAL_FIXUPS: