summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sendmail/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sendmail/src/main.c')
-rw-r--r--usr.sbin/sendmail/src/main.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/usr.sbin/sendmail/src/main.c b/usr.sbin/sendmail/src/main.c
index e2af9df..d7923ea 100644
--- a/usr.sbin/sendmail/src/main.c
+++ b/usr.sbin/sendmail/src/main.c
@@ -39,7 +39,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.55 (Berkeley) 4/15/94";
+static char sccsid[] = "@(#)main.c 8.55.1.3 (Berkeley) 2/10/95";
#endif /* not lint */
#define _DEFINE
@@ -463,7 +463,11 @@ main(argc, argv, envp)
break;
case 'B': /* body type */
- CurEnv->e_bodytype = newstr(optarg);
+ if (strcasecmp(optarg, "7bit") == 0 ||
+ strcasecmp(optarg, "8bitmime") == 0)
+ CurEnv->e_bodytype = newstr(optarg);
+ else
+ usrerr("Illegal body type %s", optarg);
break;
case 'C': /* select configuration file (already done) */
@@ -486,7 +490,7 @@ main(argc, argv, envp)
ExitStat = EX_USAGE;
break;
}
- from = newstr(optarg);
+ from = newstr(denlstring(optarg));
if (strcmp(RealUserName, from) != 0)
warn_f_flag = j;
break;
@@ -516,11 +520,21 @@ main(argc, argv, envp)
case 'p': /* set protocol */
p = strchr(optarg, ':');
if (p != NULL)
+ {
*p++ = '\0';
+ if (*p != '\0')
+ {
+ ep = xalloc(strlen(p) + 1);
+ cleanstrcpy(ep, p, MAXNAME);
+ define('s', ep, CurEnv);
+ }
+ }
if (*optarg != '\0')
- define('r', newstr(optarg), CurEnv);
- if (p != NULL && *p != '\0')
- define('s', newstr(p), CurEnv);
+ {
+ ep = xalloc(strlen(optarg) + 1);
+ cleanstrcpy(ep, optarg, MAXNAME);
+ define('r', ep, CurEnv);
+ }
break;
case 'q': /* run queue files at intervals */
@@ -714,6 +728,10 @@ main(argc, argv, envp)
break;
}
+ /* full names can't have newlines */
+ if (FullName != NULL && strchr(FullName, '\n') != NULL)
+ FullName = newstr(denlstring(FullName));
+
/* do heuristic mode adjustment */
if (Verbose)
{
OpenPOWER on IntegriCloud