paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) (10/17/90)
A new release of the UIUC/NIU version of IDA sendmail is now available for anon-FTP from uxc.cso.uiuc.edu in pub/sendmail-5.65+IDA-1.3.5.tar.Z . The original IDA enhancements, plus the UIUC/NIU and contributed changes, provide the following: * support for mail11v3 for DECnet sites (optional) * support for Dbm(3) files - dbm, ndbm, sdbm, mdbm, and gdbm - allows pathalias database to be directly used - allows choice of mailer to be table driven - allows UUCP and domain name aliasing - optional support to access Sun NIS (aka YP) DBM databases * improved support of MX records * split header rewriting between envelope and headers * improved test mode * support for multi-token matches in .cf macros and classes * batched SMTP support * allow set (class) declarations to use programs as well as files to define a set * delayed macro evauation using $&x syntax * RFC822 quoted macro expansion using $!x syntax * an excellent general purpose m4 template for .cf file generation - supports pure UUCP site requirements - supports pure Internet site requirements - supports a hybrid of UUCP site and Internet site - supports hidden and isolated local area networks connected via a gateway (either UUCP or IP) to the Internet - provides NIS (aka YP) aliases (optional) - provides DECnet gateway support - supports genericfrom database mapping actual user names to generic user names. - supports pathalias database - support UUCP and domain name aliasing This release incorporates the minor changes from 5.64 to 5.65 plus a raft of minor bug fixes, typo corrections, and portability enhancements. It has been installed (and operational) on just about every type of UNIX platform available within the University of Illinois. Changes in 5.65/1.3.5 from the previous release: Installed changes to main.c, savemail.c and version.c from Berkeley V5.64 to V5.65. Added mdbm and gdbm support. Rationalized #ifdef's for *DBM. gdbm can be fetched either from uxc.cso.uiuc.edu in the gnu directory or from aeneas.mit.edu in pub/gnu. getloadavg.c was absorbed back into conf.c since few architectures used it. It's been made part of the #ifdef context that uses it. flock() emulation (provided by Andy Litton of Victoria University of Wellington, NZ) via lockf() now done more transparently. All files to be exclusively locked are now open "r+" (read/write). Many systems that provide flock() use lockf() semantics. These require files to be opened for writing to obtain exclusive locks. Bruce Lilly (bruce%balilly@sonyd1.broadcast.sony.com) provided unixpc and many System 5 changes selected via #define SYSTEM5 in conf.h. These have been very helpful for HP-UX. He also contributed varargs versions of many routines (see err.c and conf.c) selected via #define VSPRINTF in conf.h and many sundry glitch fixes (extraneous newlines in syslog() and putline() calls, errors in comments, etc). Thank you Bruce. A potentially serious bug was scattered throughout the code. The third argument to expand() in macro.c is the buffer limit, i.e., the address of the last usable position in buf. In many cases this was expressed as expand(str, buf, buf[sizeof buf], s) which is the address just beyond the end of the array. These were all changed to use buf[sizeof buf - 1]. /pbp -- Paul Pomes UUCP: {att,iuvax,uunet}!uiucuxc!paul Internet, BITNET: paul@uxc.cso.uiuc.edu US Mail: UofIllinois, CSO, 1304 W Springfield Ave, Urbana, IL 61801-2910
michael@uni-paderborn.de (Michael Schmidt) (11/07/90)
I just tried sendmail-5.65+ and noticed a change, that hits us. All
ndbm databases are opened with O_RDWR. In 5.61++ it was O_RDWR only
for DB_ALIAS and O_RDONLY otherwise. It happens, that we have a
database on a read only filesystem and are updating the database
otherwise. And we get an "can't open database" error.
I changed daemon.c to try to open the database read only after a read
write open failed (the tiny patch is included). Though, I'm not so
sure, whether I do any harm to anything. Any comments?
Michael Schmidt
--
diff -c daemon.c daemon.c.~1~
*** daemon.c Wed Nov 7 10:54:53 1990
--- daemon.c.~1~ Tue Nov 6 14:40:20 1990
***************
*** 762,770 ****
c == DB_ALIAS ? O_RDWR : O_RDONLY, 0);
# else /* !apollo */
db->db_dbm = dbm_open(db->db_name, O_RDWR, 0);
- if (db->db_dbm == DB_NOSUCHFILE) {
- db->db_dbm = dbm_open(db->db_name, O_RDONLY, 0);
- }
# endif /* apollo */
if (db->db_dbm == DB_NOSUCHFILE) {
--- 762,767 ----
***************
*** 776,784 ****
c == DB_ALIAS ? O_RDWR : O_RDONLY, 0);
# else /* !apollo */
db->db_dbm = dbm_open(db->db_name, O_RDWR, 0);
- if (db->db_dbm == DB_NOSUCHFILE) {
- db->db_dbm = dbm_open(db->db_name, O_RDONLY, 0);
- }
# endif /* apollo */
}
if (db->db_dbm == DB_NOSUCHFILE) {
--- 773,778 ----
--
Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100,
D-4790 Paderborn, West Germany
Mail: michael@pbinfo.UUCP or michael@uni-paderborn.de
paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) (11/08/90)
michael@uni-paderborn.de (Michael Schmidt) writes: >I just tried sendmail-5.65+ and noticed a change, that hits us. All >ndbm databases are opened with O_RDWR. In 5.61++ it was O_RDWR only >for DB_ALIAS and O_RDONLY otherwise. It happens, that we have a >database on a read only filesystem and are updating the database >otherwise. And we get an "can't open database" error. > >I changed daemon.c to try to open the database read only after a read >write open failed (the tiny patch is included). Though, I'm not so >sure, whether I do any harm to anything. Any comments? This is a damned if you do, damned if you don't situation with regard to portability. I changed flags in daemon.c to increase portability for those systems that half-way implement flock() in terms of either lockf() or fcntl. Only a pure Berkeley flock() allows an exclusive lock on a file opened read-only. All others require read-write or write-only. What I'll do instead is reverse the order of the patch to try a read-only open first and then retry as read-write should the flock() attempt fail. That preserves as much as possible the original behavior. Now if I could convince gdbm to leave locking to the application... /pbp -- Paul Pomes UUCP: {att,iuvax,uunet}!uiucuxc!paul Internet, BITNET: paul@uxc.cso.uiuc.edu US Mail: UofIllinois, CSO, 1304 W Springfield Ave, Urbana, IL 61801-2910