security fix: avoid accepting inappropriate program/file mailers
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 28 Oct 1993 00:36:35 +0000 (16:36 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 28 Oct 1993 00:36:35 +0000 (16:36 -0800)
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.20

usr/src/usr.sbin/sendmail/src/recipient.c

index 97dafef..04410d4 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        8.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        8.20 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -261,8 +261,7 @@ recipient(a, sendq, e)
        stripquotes(buf);
 
        /* check for direct mailing to restricted mailers */
        stripquotes(buf);
 
        /* check for direct mailing to restricted mailers */
-       if (a->q_alias == NULL && m == ProgMailer &&
-           !bitset(EF_QUEUERUN, e->e_flags))
+       if (a->q_alias == NULL && m == ProgMailer)
        {
                a->q_flags |= QBADADDR;
                usrerr("550 Cannot mail directly to programs");
        {
                a->q_flags |= QBADADDR;
                usrerr("550 Cannot mail directly to programs");
@@ -325,7 +324,7 @@ recipient(a, sendq, e)
        if (m == InclMailer)
        {
                a->q_flags |= QDONTSEND;
        if (m == InclMailer)
        {
                a->q_flags |= QDONTSEND;
-               if (a->q_alias == NULL && !bitset(EF_QUEUERUN, e->e_flags))
+               if (a->q_alias == NULL)
                {
                        a->q_flags |= QBADADDR;
                        usrerr("550 Cannot mail directly to :include:s");
                {
                        a->q_flags |= QBADADDR;
                        usrerr("550 Cannot mail directly to :include:s");
@@ -362,7 +361,7 @@ recipient(a, sendq, e)
 
                p = strrchr(buf, '/');
                /* check if writable or creatable */
 
                p = strrchr(buf, '/');
                /* check if writable or creatable */
-               if (a->q_alias == NULL && !bitset(EF_QUEUERUN, e->e_flags))
+               if (a->q_alias == NULL)
                {
                        a->q_flags |= QBADADDR;
                        usrerr("550 Cannot mail directly to files");
                {
                        a->q_flags |= QBADADDR;
                        usrerr("550 Cannot mail directly to files");