summaryrefslogtreecommitdiff
path: root/contrib/sendmail/src/readcf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/src/readcf.c')
-rw-r--r--contrib/sendmail/src/readcf.c80
1 files changed, 21 insertions, 59 deletions
diff --git a/contrib/sendmail/src/readcf.c b/contrib/sendmail/src/readcf.c
index 56aa825981b4..db71937fba6e 100644
--- a/contrib/sendmail/src/readcf.c
+++ b/contrib/sendmail/src/readcf.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)readcf.c 8.235 (Berkeley) 8/18/1998";
+static char sccsid[] = "@(#)readcf.c 8.230 (Berkeley) 6/5/98";
#endif /* not lint */
# include "sendmail.h"
@@ -106,19 +106,19 @@ readcf(cfname, safe, e)
if (cf == NULL)
{
syserr("cannot open");
- finis(FALSE, EX_OSFILE);
+ exit(EX_OSFILE);
}
if (fstat(fileno(cf), &statb) < 0)
{
syserr("cannot fstat");
- finis(FALSE, EX_OSFILE);
+ exit(EX_OSFILE);
}
if (!S_ISREG(statb.st_mode))
{
syserr("not a plain file");
- finis(FALSE, EX_OSFILE);
+ exit(EX_OSFILE);
}
if (OpMode != MD_TEST && bitset(S_IWGRP|S_IWOTH, statb.st_mode))
@@ -518,7 +518,7 @@ readcf(cfname, safe, e)
if (ferror(cf))
{
syserr("I/O read error");
- finis(FALSE, EX_OSFILE);
+ exit(EX_OSFILE);
}
fclose(cf);
FileName = NULL;
@@ -1515,18 +1515,11 @@ struct optioninfo
#define O_CNCTONLYTO 0xa6
{ "ConnectOnlyTo", O_CNCTONLYTO, FALSE },
#endif
-#if _FFR_TRUSTED_USER
-#define O_TRUSTUSER 0xa7
- { "TrustedUser", O_TRUSTUSER, FALSE },
-#endif
-#if _FFR_MAX_MIME_HEADER_LENGTH
-#define O_MAXMIMEHDRLEN 0xa8
- { "MaxMimeHeaderLength", O_MAXMIMEHDRLEN, FALSE },
-#endif
-#if _FFR_CONTROL_SOCKET
-#define O_CONTROLSOCKET 0xa9
- { "ControlSocketName", O_CONTROLSOCKET, FALSE },
+#if _FFR_TRUSTED_FILE_OWNER
+#define O_TRUSTFILEOWN 0xa7
+ { "TrustedFileOwner", O_TRUSTFILEOWN, FALSE },
#endif
+
{ NULL, '\0', FALSE }
};
@@ -1714,7 +1707,7 @@ setoption(opt, val, safe, sticky, e)
default:
syserr("Unknown 8-bit mode %c", *val);
- finis(FALSE, EX_USAGE);
+ exit(EX_USAGE);
}
break;
#endif
@@ -1778,7 +1771,7 @@ setoption(opt, val, safe, sticky, e)
default:
syserr("Unknown delivery mode %c", *val);
- finis(FALSE, EX_USAGE);
+ exit(EX_USAGE);
}
buf[0] = (char)e->e_sendmode;
buf[1] = '\0';
@@ -2408,64 +2401,33 @@ setoption(opt, val, safe, sticky, e)
break;
#endif
-#if _FFR_TRUSTED_USER
- case O_TRUSTUSER:
+#if _FFR_TRUSTED_FILE_OWNER
+ case O_TRUSTFILEOWN:
if (isascii(*val) && isdigit(*val))
- TrustedUid = atoi(val);
+ TrustedFileUid = atoi(val);
else
{
register struct passwd *pw;
- TrustedUid = 0;
+ TrustedFileUid = 0;
pw = sm_getpwnam(val);
if (pw == NULL)
- syserr("readcf: option TrustedUser: unknown user %s", val);
+ syserr("readcf: option TrustedFileOwner: unknown user %s", val);
else
- TrustedUid = pw->pw_uid;
+ TrustedFileUid = pw->pw_uid;
}
#ifdef UID_MAX
- if (TrustedUid > UID_MAX)
+ if (TrustedFileUid > UID_MAX)
{
- syserr("readcf: option TrustedUser: uid value (%ld) > UID_MAX (%ld)",
- TrustedUid, UID_MAX);
- TrustedUid = 0;
+ syserr("readcf: option TrustedFileOwner: uid value (%ld) > UID_MAX (%ld)",
+ TrustedFileUid, UID_MAX);
+ TrustedFileUid = 0;
}
#endif
break;
#endif
-#if _FFR_MAX_MIME_HEADER_LENGTH
- case O_MAXMIMEHDRLEN:
- p = strchr(val, '/');
- if (p != NULL)
- *p++ = '\0';
- MaxMimeHeaderLength = atoi(val);
- if (p != NULL && *p != '\0')
- MaxMimeFieldLength = atoi(p);
- else
- MaxMimeFieldLength = MaxMimeHeaderLength / 2;
-
- if (MaxMimeHeaderLength < 0)
- MaxMimeHeaderLength = 0;
- else if (MaxMimeHeaderLength < 128)
- printf("Warning: MaxMimeHeaderLength: header length limit set lower than 128\n");
-
- if (MaxMimeFieldLength < 0)
- MaxMimeFieldLength = 0;
- else if (MaxMimeFieldLength < 40)
- printf("Warning: MaxMimeHeaderLength: field length limit set lower than 40\n");
- break;
-#endif
-
-#if _FFR_CONTROL_SOCKET
- case O_CONTROLSOCKET:
- if (ControlSocketName != NULL)
- free(ControlSocketName);
- ControlSocketName = newstr(val);
- break;
-#endif
-
default:
if (tTd(37, 1))
{