fix bug in including (and forwarding) files; all lines looked
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 18 Dec 1992 01:09:35 +0000 (17:09 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 18 Dec 1992 01:09:35 +0000 (17:09 -0800)
like comments

SCCS-vsn: usr.sbin/sendmail/src/recipient.c 5.40
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.137

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

index 6ba94c4..87c2fe3 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        5.39 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        5.40 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/types.h>
 #endif /* not lint */
 
 # include <sys/types.h>
@@ -672,6 +672,9 @@ include(fname, forwarding, ctladdr, sendq, e)
        char buf[MAXLINE];
        static int includetimeout();
 
        char buf[MAXLINE];
        static int includetimeout();
 
+       if (tTd(27, 2))
+               printf("include(%s)\n", fname);
+
        /*
        **  If home directory is remote mounted but server is down,
        **  this can hang or give errors; use a timeout to avoid this
        /*
        **  If home directory is remote mounted but server is down,
        **  this can hang or give errors; use a timeout to avoid this
@@ -691,6 +694,8 @@ include(fname, forwarding, ctladdr, sendq, e)
        {
                /* don't use this .forward file */
                clrevent(ev);
        {
                /* don't use this .forward file */
                clrevent(ev);
+               if (tTd(27, 4))
+                       printf("include: not safe (uid=%d)\n", ctladdr->q_uid);
                return EPERM;
        }
 
                return EPERM;
        }
 
@@ -726,7 +731,7 @@ include(fname, forwarding, ctladdr, sendq, e)
                LineNumber++;
                if (p != NULL)
                        *p = '\0';
                LineNumber++;
                if (p != NULL)
                        *p = '\0';
-               if (*p == '#' || *p == '\0')
+               if (buf[0] == '#' || buf[0] == '\0')
                        continue;
                e->e_to = oldto;
                message(Arpa_Info, "%s to %s",
                        continue;
                e->e_to = oldto;
                message(Arpa_Info, "%s to %s",
index 0e35c1e..c844f21 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)version.c  5.136 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c  5.137 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-char   Version[] = "ALPHA-5.136";
+char   Version[] = "ALPHA-5.137";