Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site tove.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!decvax!wanginst!ucadmus!harvard!seismo!umcp-cs!tove!israel From: israel@tove.UUCP (Bruce Israel) Newsgroups: net.unix-wizards Subject: Sendmail bug Message-ID: <112@tove.UUCP> Date: Fri, 1-Feb-85 20:17:09 EST Article-I.D.: tove.112 Posted: Fri Feb 1 20:17:09 1985 Date-Received: Mon, 4-Feb-85 05:24:27 EST Reply-To: israel@tove.UUCP (Bruce Israel) Organization: U of Maryland, Laboratory for Parallel Computation, C.P., MD Lines: 67 Index: usr.lib/sendmail/readcf.c 4.2BSD Fix Description: If a space is embedded in the tabs that separate the LHS of a re-write rule in sendmail.cf from the RHS, sendmail sees the space as the right-hand-side and hits a segmentation violation. Repeat-by: Add a rule set S29 to the bottom of your sendmail.cf file, with one rule in it that looks like: R$+<@$+>{tab}{space}{tab}$1@$2 where {space} and {tab} are those respective characters, and then go into address test mode (/usr/lib/sendmail -bt), and type "29 foo@bar". Fix: The fix is to check for spaces in the rule-reading section of the readcf() function in readcf.c. Below is a diff -c for the modified file. *** readcf.c.old Fri Feb 1 18:05:40 1985 --- readcf.c Fri Feb 1 17:59:14 1985 *************** *** 110,116 rwp->r_lhs = copyplist(rwp->r_lhs, TRUE); /* expand and save the RHS */ ! while (*++p == '\t') continue; q = p; while (*p != '\0' && *p != '\t') --- 110,116 ----- rwp->r_lhs = copyplist(rwp->r_lhs, TRUE); /* expand and save the RHS */ ! while (*++p == '\t' || *p == ' ') continue; q = p; while (*p != '\0' && *p != '\t' && *p != ' ') *************** *** 113,119 while (*++p == '\t') continue; q = p; ! while (*p != '\0' && *p != '\t') p++; *p = '\0'; expand(q, exbuf, &exbuf[sizeof exbuf], CurEnv); --- 113,119 ----- while (*++p == '\t' || *p == ' ') continue; q = p; ! while (*p != '\0' && *p != '\t' && *p != ' ') p++; *p = '\0'; expand(q, exbuf, &exbuf[sizeof exbuf], CurEnv); -- Bruce Israel University of Maryland, Computer Science {rlgvax,seismo}!umcp-cs!israel (Usenet) israel@Maryland (Arpanet)