ph10 2005/03/08 16:57:28 GMT
Modified files:
exim-src/src acl.c dk.c expand.c mime.c transport.c
exim-test-orig/AutoTest/stdout 150 151 515
Log:
Running the full tests showed up 3 that contained a copyright date. Just
updated them for now.
Revision Changes Path
1.21 +5 -5 exim/exim-src/src/acl.c
1.2 +39 -39 exim/exim-src/src/dk.c
1.15 +6 -6 exim/exim-src/src/expand.c
1.6 +1 -1 exim/exim-src/src/mime.c
1.6 +8 -8 exim/exim-src/src/transport.c
1.2 +1 -1 exim/exim-test-orig/AutoTest/stdout/150
1.2 +1 -1 exim/exim-test-orig/AutoTest/stdout/151
1.2 +1 -1 exim/exim-test-orig/AutoTest/stdout/515
Index: acl.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/acl.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- acl.c 8 Mar 2005 15:32:02 -0000 1.20
+++ acl.c 8 Mar 2005 16:57:28 -0000 1.21
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/acl.c,v 1.20 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/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 @@
(1<<ACL_WHERE_MAILAUTH)|(1<<ACL_WHERE_QUIT)|
(1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_STARTTLS)|
(1<<ACL_WHERE_VRFY),
-
+
(1<<ACL_WHERE_AUTH)|
(1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
(1<<ACL_WHERE_RCPT)|(1<<ACL_WHERE_PREDATA)|
@@ -307,7 +307,7 @@
(1<<ACL_WHERE_MAILAUTH)|(1<<ACL_WHERE_QUIT)|
(1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_STARTTLS)|
(1<<ACL_WHERE_VRFY),
-
+
(1<<ACL_WHERE_AUTH)|
(1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
(1<<ACL_WHERE_RCPT)|(1<<ACL_WHERE_PREDATA)|
@@ -315,7 +315,7 @@
(1<<ACL_WHERE_MAILAUTH)|(1<<ACL_WHERE_QUIT)|
(1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_STARTTLS)|
(1<<ACL_WHERE_VRFY),
-
+
(1<<ACL_WHERE_AUTH)|
(1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
(1<<ACL_WHERE_RCPT)|(1<<ACL_WHERE_PREDATA)|
@@ -323,7 +323,7 @@
(1<<ACL_WHERE_MAILAUTH)|(1<<ACL_WHERE_QUIT)|
(1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_STARTTLS)|
(1<<ACL_WHERE_VRFY),
-
+
(1<<ACL_WHERE_AUTH)|
(1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
(1<<ACL_WHERE_RCPT)|(1<<ACL_WHERE_PREDATA)|
@@ -331,7 +331,7 @@
(1<<ACL_WHERE_MAILAUTH)|(1<<ACL_WHERE_QUIT)|
(1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_STARTTLS)|
(1<<ACL_WHERE_VRFY),
-
+
(1<<ACL_WHERE_AUTH)|
(1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
(1<<ACL_WHERE_RCPT)|(1<<ACL_WHERE_PREDATA)|
Index: dk.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/dk.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dk.c 8 Mar 2005 15:32:02 -0000 1.1
+++ dk.c 8 Mar 2005 16:57:28 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/dk.c,v 1.1 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/dk.c,v 1.2 2005/03/08 16:57:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -34,7 +34,7 @@
int dk_receive_getc(void) {
int i;
int c = receive_getc();
-
+
if (dk_context != NULL) {
/* Send oldest byte */
if ((dkbuff[0] < 256) && (dk_internal_status == DK_STAT_OK)) {
@@ -55,7 +55,7 @@
dkbuff[3] = 256;
dkbuff[4] = 256;
dkbuff[5] = 256;
- }
+ }
if ( (dkbuff[2] == '\r') &&
(dkbuff[3] == '\n') &&
(dkbuff[4] == '.') &&
@@ -80,15 +80,15 @@
}
-void dk_exim_verify_init(void) {
+void dk_exim_verify_init(void) {
int old_pool = store_pool;
store_pool = POOL_PERM;
-
+
/* Reset DK state in any case. */
dk_context = NULL;
dk_lib = NULL;
dk_verify_block = NULL;
-
+
/* Set up DK context if DK was requested and input is SMTP. */
if (smtp_input && !smtp_batched_input && dk_do_verify) {
/* initialize library */
@@ -127,9 +127,9 @@
/* Bail out if context could not be set up earlier. */
if (dk_context == NULL)
return;
-
+
store_pool = POOL_PERM;
-
+
/* Send remaining bytes from input which are still in the buffer. */
for (i=0;i<6;i++)
if (dkbuff[i] < 256)
@@ -137,7 +137,7 @@
/* Flag end-of-message. */
dk_internal_status = dk_end(dk_context, NULL);
-
+
/* Grab address/domain information. */
p = dk_address(dk_context);
if (p != NULL) {
@@ -170,7 +170,7 @@
if (dk_flags & DK_FLAG_SET) {
if (dk_flags & DK_FLAG_TESTING)
dk_verify_block->testing = TRUE;
- if (dk_flags & DK_FLAG_SIGNSALL)
+ if (dk_flags & DK_FLAG_SIGNSALL)
dk_verify_block->signsall = TRUE;
}
@@ -212,14 +212,14 @@
/* 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 @@
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 @@
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 @@
seen_lfdot = 0;
continue;
}
-
+
if (seen_lfdot) {
/* EOM, write "\n" and break */
dk_message(dk_context, "\n", 1);
@@ -279,22 +279,22 @@
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 @@
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 *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 @@
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 @@
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 @@
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 @@
rc = "";
goto CLEANUP;
}
-
+
if (dk_private_key[0] == '/') {
int privkey_fd = 0;
/* Looks like a filename, load the private key. */
@@ -386,23 +386,23 @@
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:
Index: expand.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/expand.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- expand.c 8 Mar 2005 15:32:02 -0000 1.14
+++ expand.c 8 Mar 2005 16:57:28 -0000 1.15
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/expand.c,v 1.14 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/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 @@
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 @@
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 @@
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
Index: mime.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/mime.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mime.c 8 Mar 2005 15:32:02 -0000 1.5
+++ mime.c 8 Mar 2005 16:57:28 -0000 1.6
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/mime.c,v 1.5 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/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_parse_line(uschar *buffer, uschar *data, uschar *encoding, int *num_decoded) {
-
+
if (encoding == NULL) {
/* no encoding type at all */
NO_DECODING:
Index: transport.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/transport.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- transport.c 8 Mar 2005 15:32:02 -0000 1.5
+++ transport.c 8 Mar 2005 16:57:28 -0000 1.6
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/transport.c,v 1.5 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/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 @@
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 @@
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 @@
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_domain,
dk_selector,
dk_canon);
-
+
if (dk_signature != NULL)
{
/* Send the signature first */
@@ -1017,9 +1017,9 @@
}
}
- /* 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 @@
goto DK_WRITE;
}
}
-
+
if (sread == -1)
{
save_errno = errno;
Index: 150
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/150,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 150 8 Oct 2004 14:50:13 -0000 1.1
+++ 150 8 Mar 2005 16:57:28 -0000 1.2
@@ -1,4 +1,4 @@
Exim version x.yz #nn built 07-Mar-2000 12:21:52
-Copyright (c) University of Cambridge 2004
+Copyright (c) University of Cambridge 2005
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
Fixed never_users: 0
Index: 151
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/151,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 151 8 Oct 2004 14:50:13 -0000 1.1
+++ 151 8 Mar 2005 16:57:28 -0000 1.2
@@ -1,4 +1,4 @@
Exim version x.yz #nn built 07-Mar-2000 12:21:52
-Copyright (c) University of Cambridge 2004
+Copyright (c) University of Cambridge 2005
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
Fixed never_users: 0
Index: 515
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/515,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 515 8 Oct 2004 14:50:14 -0000 1.1
+++ 515 8 Mar 2005 16:57:28 -0000 1.2
@@ -45,6 +45,6 @@
verify_recipient
verify_sender
Exim version x.yz #nn built 07-Mar-2000 12:21:52
-Copyright (c) University of Cambridge 2004
+Copyright (c) University of Cambridge 2005
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
Fixed never_users: 0