diff options
| author | glass <glass@NetBSD.org> | 1994-03-16 02:11:31 +0000 |
|---|---|---|
| committer | glass <glass@NetBSD.org> | 1994-03-16 02:11:31 +0000 |
| commit | 3fb497653d34cde8706b0e446e52182df5bc4ae7 (patch) | |
| tree | 378207336652cf6132b6412b0e6c3f105621d985 /usr.sbin/sendmail/src/readcf.c | |
| parent | c0ae496079e5f8f6af13afb704a68b285f4d14b4 (diff) | |
sendmail 8.6.7. fixes recently discovered security hole
Diffstat (limited to 'usr.sbin/sendmail/src/readcf.c')
| -rw-r--r-- | usr.sbin/sendmail/src/readcf.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/usr.sbin/sendmail/src/readcf.c b/usr.sbin/sendmail/src/readcf.c index 0d8d6fddf3a..4c6be01b090 100644 --- a/usr.sbin/sendmail/src/readcf.c +++ b/usr.sbin/sendmail/src/readcf.c @@ -33,13 +33,13 @@ */ #ifndef lint -static char sccsid[] = "@(#)readcf.c 8.18 (Berkeley) 1/9/94"; +static char sccsid[] = "@(#)readcf.c 8.22 (Berkeley) 3/11/94"; #endif /* not lint */ # include "sendmail.h" # include <pwd.h> # include <grp.h> -#ifdef NAMED_BIND +#if NAMED_BIND # include <arpa/nameser.h> # include <resolv.h> #endif @@ -221,7 +221,7 @@ readcf(cfname, safe, e) if (*p == '\0') { - syserr("invalid rewrite line \"%s\"", bp); + syserr("invalid rewrite line \"%s\" (tab expected)", bp); break; } @@ -542,7 +542,7 @@ readcf(cfname, safe, e) { /* user didn't initialize: set up host map */ strcpy(buf, "host host"); -#ifdef NAMED_BIND +#if NAMED_BIND if (ConfigLevel >= 2) strcat(buf, " -a."); #endif @@ -600,8 +600,19 @@ fileclass(class, filename, fmt, safe, optional) struct stat stbuf; char buf[MAXLINE]; + if (tTd(37, 2)) + printf("fileclass(%s, fmt=%s)\n", filename, fmt); + + if (filename[0] == '|') + { + syserr("fileclass: pipes (F%c%s) not supported due to security problems", + class, filename); + return; + } if (stat(filename, &stbuf) < 0) { + if (tTd(37, 2)) + printf(" cannot stat (%s)\n", errstring(errno)); if (!optional) syserr("fileclass: cannot stat %s", filename); return; @@ -659,8 +670,7 @@ fileclass(class, filename, fmt, safe, optional) *p++ = '\0'; /* enter the word in the symbol table */ - s = stab(q, ST_CLASS, ST_ENTER); - setbitn(class, s->s_class); + setclass(class, q); } } @@ -1007,7 +1017,7 @@ printrules() static BITMAP StickyOpt; /* set if option is stuck */ -#ifdef NAMED_BIND +#if NAMED_BIND struct resolverflags { @@ -1216,7 +1226,7 @@ setoption(opt, val, safe, sticky, e) break; case 'I': /* use internet domain name server */ -#ifdef NAMED_BIND +#if NAMED_BIND UseNameServer = TRUE; for (p = val; *p != 0; ) { |
