2003-06-29 David J. MacKenzie * Version 2.3 released. 2003-06-25 David J. MacKenzie * check.c (add_explicit_group): Strip whitespace at the ends of list elements as well as at the beginnings. * classify.h: Define LIST_SEPARATORS. * test: Add cases to test such list elements. Fix route address syntax. * classify.h, classify.c, check.c: Changed references to RFC 822 to RFC 2822, which supersedes it. 2000-05-05 David J. MacKenzie * Version 2.2 released. * classify.h: Move some defines from check.h. * test: Replace local user "glenn" with "root" so good tests don't fail. Add some group tests. * check.c (add_implicit_group): Trim whitespace from end of line. * database.c (read_in_entry): Trim whitespace from end of line. Reported by Cormac McGaughey . * classify.c (classify): No need to check for whitespace at front or end of address; it's been pre-trimmed. Remove two useless strlen calls. Delay copying the address longer. 2000-05-02 David J. MacKenzie * Version 2.1 released. * Use GLIB btree routines instead of homegrown btree and linked lists and a pipe to sort. Much faster now. * Fix quoting handling in checks for programs and files. * Remove the remaining arbitrarily short buffers, and fix potential buffer overruns. Replace some buffer copying with more efficient pointer copying. * xmalloc.h, xmalloc.c: New files. * Use FORWARD_FILE consistently instead of hardcoding .forward. * Use symbolic mode arguments to access(). * Add some const qualifiers. * Fix some test cases. 2000-04-29 David J. MacKenzie * Version 2.0 released. * Add -f option instead of commenting out .forward checking. * Add configure script and autoconf/automake stuff. * Remove SIGSYS handler that was used for profiling. * Exit if no aliases found. * Print version number in usage string. * newaliases.el: add alias-update to the hooks, add some doc strings, leave the file mode alone. 2000-03-10 David J. MacKenzie * Eliminate arbitrary line length limitations by using fgetln. * Fix a null pointer dereference. * Compare aliases case-insensitively, like sendmail does. This has the side effect that warnings about duplicate aliases delivering to local files whose names differ only in case say that they have the same value. Not a significant problem. 2000-03-09 David J. MacKenzie * Convert to ANSI C prototypes, and clean up some error messages. * Make it compatible with C++ type rules. * Make most globals static. * Handle all possible malloc/calloc/realloc failures. * Avoid some possible buffer overruns. 1998-02-14 David J. MacKenzie * Rename isspace() to whitespace(), and SLEN to LINE_LEN. Bugs Fixed by Glenn Adams : 1. read_in_entry skipped every other alias line. Fix: increment lines variable when next line starts with non whitespace. 2. SLEN in database.c was too short, i.e., 512 bytes. At least 1024 bytes are needed to handle largest DBM record size alias. Fix: increase SLEN in database.c to 1024. (Now called LINE_LEN.) 3. Dereference lhs & rhs too short allowing find_alias to overwrite lhs and rhs. Fix: use VERY_LONG_STRING length for lhs and rhs. 4. Alias loops weren't detected causing infinite loop. Fix: Detect alias loops in dereference. 5. Address list parsing broke on route addresses and quoted text which contained ',' and other delimiters. Fix: Redo address list parsing. 6. Classify routine didn't handle: - \user notation - legal rfc822 addresses, e.g., *foo@bar - quoted pipes didn't work, e.g., foo: "|prog -args" Fix: Completely rewrote classify() to perform (almost) full rfc822 parsing, discriminate local from non-local addresses, discriminate pure uucp from rfc822 addresses, do more complete job of recognizing common mistakes, e.g., quoting :include: references, and more. 5. An error is reported for mail to files which don't exist but can be created by sendmail. Fix: Change saving_to_file to perform further tests on writability of directory if file doesn't exist. Only report error if file isn't writable. Note: If sendmail finds a file which is setuid or setgid, it will change uid and/or gid to that file's uid/gid prior to opening file for appending. I haven't replicated this algorithm yet in checkaliases.