commenting in :include: and .forward files (parenthesized comments
can be used instead)
SCCS-vsn: usr.sbin/sendmail/src/headers.c 5.23
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 5.36
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.121
SCCS-vsn: usr.sbin/sendmail/src/util.c 5.31
-static char sccsid[] = "@(#)headers.c 5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)headers.c 5.23 (Berkeley) %G%";
#endif /* not lint */
# include <sys/param.h>
#endif /* not lint */
# include <sys/param.h>
struct hdrinfo *hi;
bool cond = FALSE;
BITMAP mopts;
struct hdrinfo *hi;
bool cond = FALSE;
BITMAP mopts;
- extern char *crackaddr();
extern ADDRESS *sendto();
if (tTd(31, 6))
extern ADDRESS *sendto();
if (tTd(31, 6))
int copylev;
bool qmode;
bool putgmac = FALSE;
int copylev;
bool qmode;
bool putgmac = FALSE;
register char *bp;
static char buf[MAXNAME];
register char *bp;
static char buf[MAXNAME];
if (copylev > 0 || c == ' ')
*bp++ = c;
if (copylev > 0 || c == ' ')
*bp++ = c;
+ /* check for characters that may have to be quoted */
+ if (index(".'@,;:[]", c) != NULL)
+ {
+ /*
+ ** If these occur as the phrase part of a <>
+ ** construct, but are not inside of () or already
+ ** quoted, they will have to be quoted. Note that
+ ** now (but don't actually do the quoting).
+ */
+
+ if (cmtlev <= 0 && !qmode)
+ quoteit = TRUE;
+ }
+
/* check for backslash escapes */
if (c == '\\')
{
/* check for backslash escapes */
if (c == '\\')
{
/* check for angle brackets */
if (c == '<')
{
/* check for angle brackets */
if (c == '<')
{
/* oops -- have to change our mind */
/* oops -- have to change our mind */
- bcopy(addr, buf, p - addr);
- bp = &buf[p - addr];
+ bp = buf;
+ if (quoteit)
+ {
+ *bp++ = '"';
+
+ /* back up over the '<' and any spaces */
+ --p;
+ while (isspace(*--p))
+ continue;
+ p++;
+ }
+ for (q = addr; q < p; )
+ {
+ c = *q++;
+ if (quoteit && c == '"')
+ *bp++ = '\\';
+ *bp++ = c;
+ }
+ if (quoteit)
+ {
+ *bp++ = '"';
+ while ((*bp++ = *p++) != '<')
+ continue;
+ }
+ putgmac = quoteit = FALSE;
-static char sccsid[] = "@(#)recipient.c 5.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c 5.36 (Berkeley) %G%";
#endif /* not lint */
# include <sys/types.h>
#endif /* not lint */
# include <sys/types.h>
LineNumber++;
if (p != NULL)
*p = '\0';
LineNumber++;
if (p != NULL)
*p = '\0';
- if (buf[0] == '\0' || buf[0] == '#')
- continue;
e->e_to = oldto;
message(Arpa_Info, "%s to %s",
forwarding ? "forwarding" : "sending", buf);
e->e_to = oldto;
message(Arpa_Info, "%s to %s",
forwarding ? "forwarding" : "sending", buf);
-static char sccsid[] = "@(#)util.c 5.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c 5.31 (Berkeley) %G%";
#endif /* not lint */
# include <stdio.h>
#endif /* not lint */
# include <stdio.h>
register char *p;
register char *bp = buf;
int l;
register char *p;
register char *bp = buf;
int l;
register char *p = pw->pw_gecos;
if (*gecos == '*')
register char *p = pw->pw_gecos;
if (*gecos == '*')
/* see if the full name needs to be quoted */
l = 0;
/* see if the full name needs to be quoted */
l = 0;
for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++)
{
for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++)
{
- if (index("<>()'.", *p) != NULL)
- quoteit = TRUE;
if (*p == '&')
l += strlen(login);
else
l++;
}
if (*p == '&')
l += strlen(login);
else
l++;
}
- if (quoteit)
- *bp++ = '"';
for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++)
{
if (*p == '&')
for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++)
{
if (*p == '&')
- if (quoteit)
- *bp++ = '"';
-static char sccsid[] = "@(#)version.c 5.120 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c 5.121 (Berkeley) %G%";
-char Version[] = "5.120";
+char Version[] = "5.121";