From: Philip Hazel Date: Tue, 8 Mar 2005 16:57:28 +0000 (+0000) Subject: Running the full tests showed up 3 that contained a copyright date. Just X-Git-Tag: exim-4_51~60 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/84330b7b581bb93f145706b31288f13408312ccc?ds=sidebyside;hp=212d47ecef7d8eaaa3a8a05a148320f46f6cd890 Running the full tests showed up 3 that contained a copyright date. Just updated them for now. --- diff --git a/src/src/acl.c b/src/src/acl.c index 439e9d424..2ceeda635 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.20 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.21 2005/03/08 16:57:28 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -299,7 +299,7 @@ static unsigned int cond_forbids[] = { (1<testing = TRUE; - if (dk_flags & DK_FLAG_SIGNSALL) + if (dk_flags & DK_FLAG_SIGNSALL) dk_verify_block->signsall = TRUE; } @@ -212,14 +212,14 @@ void dk_exim_verify_finish(void) { /* This is missing DK_EXIM_RESULT_NON_PARTICIPANT. The lib does not report such a status. */ } - + /* Set up human readable result string. */ dk_verify_block->result_string = string_copy((uschar *)DK_STAT_to_string(dk_internal_status)); - + /* All done, reset dk_context. */ dk_free(dk_context); dk_context = NULL; - + store_pool = old_pool; } @@ -238,7 +238,7 @@ uschar *dk_exim_sign(int dk_fd, int sread; int old_pool = store_pool; store_pool = POOL_PERM; - + dk_lib = dk_init(&dk_internal_status); if (dk_internal_status != DK_STAT_OK) { debug_printf("DK: %s\n", DK_STAT_to_string(dk_internal_status)); @@ -250,17 +250,17 @@ uschar *dk_exim_sign(int dk_fd, we must do this BEFORE knowing which domain we sign for. */ if ((dk_canon != NULL) && (Ustrcmp(dk_canon, "nofws") == 0)) dk_canon_int = DK_CANON_NOFWS; else dk_canon = "simple"; - + /* Initialize signing context. */ dk_context = dk_sign(dk_lib, &dk_internal_status, dk_canon_int); if (dk_internal_status != DK_STAT_OK) { - debug_printf("DK: %s\n", DK_STAT_to_string(dk_internal_status)); + debug_printf("DK: %s\n", DK_STAT_to_string(dk_internal_status)); dk_context = NULL; goto CLEANUP; } - + while((sread = read(dk_fd,&c,1)) > 0) { - + if ((c == '.') && seen_lfdot) { /* escaped dot, write "\n.", continue */ dk_message(dk_context, "\n.", 2); @@ -268,7 +268,7 @@ uschar *dk_exim_sign(int dk_fd, seen_lfdot = 0; continue; } - + if (seen_lfdot) { /* EOM, write "\n" and break */ dk_message(dk_context, "\n", 1); @@ -279,22 +279,22 @@ uschar *dk_exim_sign(int dk_fd, seen_lfdot = 1; continue; } - + if (seen_lf) { /* normal lf, just send it */ dk_message(dk_context, "\n", 1); seen_lf = 0; } - + if (c == '\n') { seen_lf = 1; continue; } - + /* write the char */ dk_message(dk_context, &c, 1); } - + /* Handle failed read above. */ if (sread == -1) { debug_printf("DK: Error reading -K file.\n"); @@ -302,12 +302,12 @@ uschar *dk_exim_sign(int dk_fd, rc = NULL; goto CLEANUP; } - + /* Flag end-of-message. */ dk_internal_status = dk_end(dk_context, NULL); /* TODO: check status */ - - + + /* Get domain to use, unless overridden. */ if (dk_domain == NULL) { dk_domain = dk_address(dk_context); @@ -321,12 +321,12 @@ uschar *dk_exim_sign(int dk_fd, uschar *p; dk_domain++; p = dk_domain; - while (*p != 0) { *p = tolower(*p); p++; } + while (*p != 0) { *p = tolower(*p); p++; } } break; } if (dk_domain == NULL) { - debug_printf("DK: Could not determine domain to use for signing from message headers.\n"); + debug_printf("DK: Could not determine domain to use for signing from message headers.\n"); /* In this case, we return "OK" by sending up an empty string as the DomainKey-Signature header. If there is no domain to sign for, we can send the message anyway since the recipient has no policy to @@ -342,10 +342,10 @@ uschar *dk_exim_sign(int dk_fd, debug_printf("DK: Error while expanding dk_domain option.\n"); rc = NULL; goto CLEANUP; - } + } } - - /* Set up $dk_domain expansion variable. */ + + /* Set up $dk_domain expansion variable. */ dk_signing_domain = dk_domain; /* Get selector to use. */ @@ -356,10 +356,10 @@ uschar *dk_exim_sign(int dk_fd, rc = NULL; goto CLEANUP; } - + /* Set up $dk_selector expansion variable. */ dk_signing_selector = dk_selector; - + /* Get private key to use. */ dk_private_key = expand_string(dk_private_key); if (dk_private_key == NULL) { @@ -368,7 +368,7 @@ uschar *dk_exim_sign(int dk_fd, rc = NULL; goto CLEANUP; } - + if ( (Ustrlen(dk_private_key) == 0) || (Ustrcmp(dk_private_key,"0") == 0) || (Ustrcmp(dk_private_key,"false") == 0) ) { @@ -376,7 +376,7 @@ uschar *dk_exim_sign(int dk_fd, rc = ""; goto CLEANUP; } - + if (dk_private_key[0] == '/') { int privkey_fd = 0; /* Looks like a filename, load the private key. */ @@ -386,23 +386,23 @@ uschar *dk_exim_sign(int dk_fd, close(privkey_fd); dk_private_key = big_buffer; } - + /* Get the signature. */ dk_internal_status = dk_getsig(dk_context, dk_private_key, sig, 8192); /* Check for unuseable key */ if (dk_internal_status != DK_STAT_OK) { - debug_printf("DK: %s\n", DK_STAT_to_string(dk_internal_status)); + debug_printf("DK: %s\n", DK_STAT_to_string(dk_internal_status)); rc = NULL; goto CLEANUP; } - + rc = store_get(1024); /* Build DomainKey-Signature header to return. */ snprintf(rc, 1024, "DomainKey-Signature: a=rsa-sha1; q=dns; c=%s;\r\n" - "\ts=%s; d=%s;\r\n" + "\ts=%s; d=%s;\r\n" "\tb=%s;\r\n", dk_canon, dk_selector, dk_domain, sig); - + log_write(0, LOG_MAIN, "DK: message signed using a=rsa-sha1; q=dns; c=%s; s=%s; d=%s;", dk_canon, dk_selector, dk_domain); CLEANUP: diff --git a/src/src/expand.c b/src/src/expand.c index 9c9dc22f4..4a59c0580 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.14 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.15 2005/03/08 16:57:28 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -288,7 +288,7 @@ enum { vtype_pinodes /* partition inodes; value is T/F for spool/log */ #ifdef EXPERIMENTAL_DOMAINKEYS ,vtype_dk_verify /* Serve request out of DomainKeys verification structure */ -#endif +#endif }; /* This table must be kept in alphabetical order. */ @@ -1266,7 +1266,7 @@ while (last > first) s = dk_verify_block->domain; if (Ustrcmp(var_table[middle].name, "dk_sender_local_part") == 0) s = dk_verify_block->local_part; - + if (Ustrcmp(var_table[middle].name, "dk_sender_source") == 0) switch(dk_verify_block->address_source) { case DK_EXIM_ADDRESS_NONE: s = "0"; break; @@ -1285,16 +1285,16 @@ while (last > first) case DK_EXIM_RESULT_GOOD: s = "good"; break; case DK_EXIM_RESULT_BAD: s = "bad"; break; } - + if (Ustrcmp(var_table[middle].name, "dk_signsall") == 0) s = (dk_verify_block->signsall)? "1" : "0"; - + if (Ustrcmp(var_table[middle].name, "dk_testing") == 0) s = (dk_verify_block->testing)? "1" : "0"; - + if (Ustrcmp(var_table[middle].name, "dk_is_signed") == 0) s = (dk_verify_block->is_signed)? "1" : "0"; - + return (s == NULL)? US"" : s; #endif diff --git a/src/src/mime.c b/src/src/mime.c index bece458c0..f97d25abb 100644 --- a/src/src/mime.c +++ b/src/src/mime.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/mime.c,v 1.5 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/mime.c,v 1.6 2005/03/08 16:57:28 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -116,7 +116,7 @@ uschar *mime_decode_qp_char(uschar *qp_p,int *c) { uschar *mime_parse_line(uschar *buffer, uschar *data, uschar *encoding, int *num_decoded) { - + if (encoding == NULL) { /* no encoding type at all */ NO_DECODING: diff --git a/src/src/transport.c b/src/src/transport.c index 1bdb67746..610b0904b 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transport.c,v 1.5 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/transport.c,v 1.6 2005/03/08 16:57:28 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -920,7 +920,7 @@ return (len = chunk_ptr - deliver_out_buffer) <= 0 || signed message down the original fd (or TLS fd). Arguments: as for internal_transport_write_message() above, with additional - arguments: + arguments: uschar *dk_private_key The private key to use (filename or plain data) uschar *dk_domain Override domain (normally NULL) uschar *dk_selector The selector to use. @@ -948,7 +948,7 @@ dk_transport_write_message(address_item *addr, int fd, int options, int sread = 0; int wwritten = 0; uschar *dk_signature = NULL; - + snprintf(CS dk_spool_name, 256, "%s/input/%s/%s-K", spool_directory, message_subdir, message_id); dk_fd = Uopen(dk_spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE); @@ -959,13 +959,13 @@ dk_transport_write_message(address_item *addr, int fd, int options, save_errno = errno; goto CLEANUP; } - + /* Call original function */ rc = transport_write_message(addr, dk_fd, options, size_limit, add_headers, remove_headers, check_string, escape_string, rewrite_rules, rewrite_existflags); - + /* Save error state. We must clean up before returning. */ if (!rc) { @@ -980,7 +980,7 @@ dk_transport_write_message(address_item *addr, int fd, int options, dk_domain, dk_selector, dk_canon); - + if (dk_signature != NULL) { /* Send the signature first */ @@ -1017,9 +1017,9 @@ dk_transport_write_message(address_item *addr, int fd, int options, } } - /* Rewind file and send it down the original fd. */ + /* Rewind file and send it down the original fd. */ lseek(dk_fd, 0, SEEK_SET); - + while((sread = read(dk_fd,sbuf,2048)) > 0) { char *p = sbuf; @@ -1044,7 +1044,7 @@ dk_transport_write_message(address_item *addr, int fd, int options, goto DK_WRITE; } } - + if (sread == -1) { save_errno = errno;