Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!pbinfo!michael From: michael@uni-paderborn.de (Michael Schmidt) Newsgroups: comp.mail.sendmail Subject: Re: Sendmail V5.65 + IDA 1.3.5 available for anon-FTP Message-ID: Date: 7 Nov 90 10:03:13 GMT References: <1990Oct17.044214.12339@ux1.cso.uiuc.edu> Sender: news@uni-paderborn.de (News Uni-Paderborn) Organization: Uni Paderborn, Germany Lines: 45 In-Reply-To: paul@uxc.cso.uiuc.edu's message of 17 Oct 90 04:42:14 GMT Nntp-Posting-Host: athene 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