fix yet another problem with new owner-foo implementation
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 25 Feb 1993 02:19:38 +0000 (18:19 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 25 Feb 1993 02:19:38 +0000 (18:19 -0800)
SCCS-vsn: usr.sbin/sendmail/src/main.c 6.26
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 6.14
SCCS-vsn: usr.sbin/sendmail/src/version.c 6.29
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 6.13
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 6.17
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 6.26
SCCS-vsn: usr.sbin/sendmail/src/queue.c 6.18

usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/version.c

index 3fec485..6257aba 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  6.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  6.26 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1593,7 +1593,6 @@ sendall(e, mode)
                if (owner != NULL && otherowners > 0)
                {
                        register ENVELOPE *ee;
                if (owner != NULL && otherowners > 0)
                {
                        register ENVELOPE *ee;
-                       extern ENVELOPE *newenvelope();
                        extern HDR *copyheader();
                        extern ADDRESS *copyqueue();
 
                        extern HDR *copyheader();
                        extern ADDRESS *copyqueue();
 
index 68bee87..b36383b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 6.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 6.14 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -24,6 +24,7 @@ static char sccsid[] = "@(#)envelope.c        6.13 (Berkeley) %G%";
 **
 **     Parameters:
 **             e -- the new envelope to fill in.
 **
 **     Parameters:
 **             e -- the new envelope to fill in.
+**             parent -- the envelope to be the parent of e.
 **
 **     Returns:
 **             e.
 **
 **     Returns:
 **             e.
@@ -33,15 +34,14 @@ static char sccsid[] = "@(#)envelope.c      6.13 (Berkeley) %G%";
 */
 
 ENVELOPE *
 */
 
 ENVELOPE *
-newenvelope(e)
+newenvelope(e, parent)
        register ENVELOPE *e;
        register ENVELOPE *e;
-{
        register ENVELOPE *parent;
        register ENVELOPE *parent;
+{
        extern putheader(), putbody();
        extern ENVELOPE BlankEnvelope;
 
        extern putheader(), putbody();
        extern ENVELOPE BlankEnvelope;
 
-       parent = CurEnv;
-       if (e == CurEnv && e->e_parent != NULL)
+       if (e == parent && e->e_parent != NULL)
                parent = e->e_parent;
        clearenvelope(e, TRUE);
        if (e == CurEnv)
                parent = e->e_parent;
        clearenvelope(e, TRUE);
        if (e == CurEnv)
index 52c5c26..84b4288 100644 (file)
@@ -13,7 +13,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     6.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     6.26 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -674,7 +674,7 @@ main(argc, argv, envp)
        **  Switch to the main envelope.
        */
 
        **  Switch to the main envelope.
        */
 
-       CurEnv = newenvelope(&MainEnvelope);
+       CurEnv = newenvelope(&MainEnvelope, CurEnv);
        MainEnvelope.e_flags = BlankEnvelope.e_flags;
 
        /*
        MainEnvelope.e_flags = BlankEnvelope.e_flags;
 
        /*
@@ -805,7 +805,7 @@ main(argc, argv, envp)
 
                /* at this point we are in a child: reset state */
                OpMode = MD_SMTP;
 
                /* at this point we are in a child: reset state */
                OpMode = MD_SMTP;
-               (void) newenvelope(CurEnv);
+               (void) newenvelope(CurEnv, CurEnv);
                openxscript(CurEnv);
 #endif /* DAEMON */
        }
                openxscript(CurEnv);
 #endif /* DAEMON */
        }
index 5e76818..c44c11e 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef QUEUE
 
 #ifndef lint
 #ifdef QUEUE
-static char sccsid[] = "@(#)queue.c    6.17 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c    6.18 (Berkeley) %G% (with queueing)";
 #else
 #else
-static char sccsid[] = "@(#)queue.c    6.17 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c    6.18 (Berkeley) %G% (without queueing)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -451,7 +451,7 @@ runqueue(forkflag)
        */
 
        CurEnv = &QueueEnvelope;
        */
 
        CurEnv = &QueueEnvelope;
-       e = newenvelope(&QueueEnvelope);
+       e = newenvelope(&QueueEnvelope, CurEnv);
        e->e_flags = BlankEnvelope.e_flags;
 
        /*
        e->e_flags = BlankEnvelope.e_flags;
 
        /*
index 89b0a67..3398dbd 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)savemail.c 6.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 6.13 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/types.h>
 #endif /* not lint */
 
 # include <sys/types.h>
@@ -394,9 +394,9 @@ returntosender(msg, returnq, sendbody, e)
        }
 
        SendBody = sendbody;
        }
 
        SendBody = sendbody;
-       define('g', "\201f", e);
-       define('<', "\201f", e);
-       ee = newenvelope(&errenvelope);
+       define('g', e->e_sender, e);
+       define('<', e->e_returnpath, e);
+       ee = newenvelope(&errenvelope, e);
        define('a', "\201b", ee);
        ee->e_puthdr = putheader;
        ee->e_putbody = errbody;
        define('a', "\201b", ee);
        ee->e_puthdr = putheader;
        ee->e_putbody = errbody;
index b8217fa..1f4f2b9 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 6.16 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.17 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 6.16 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.17 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -373,7 +373,7 @@ smtp(e)
                        /* clean up a bit */
                        gotmail = FALSE;
                        dropenvelope(e);
                        /* clean up a bit */
                        gotmail = FALSE;
                        dropenvelope(e);
-                       CurEnv = e = newenvelope(e);
+                       CurEnv = e = newenvelope(e, CurEnv);
                        e->e_flags = BlankEnvelope.e_flags;
                        break;
 
                        e->e_flags = BlankEnvelope.e_flags;
                        break;
 
@@ -385,7 +385,7 @@ smtp(e)
                        /* clean up a bit */
                        gotmail = FALSE;
                        dropenvelope(e);
                        /* clean up a bit */
                        gotmail = FALSE;
                        dropenvelope(e);
-                       CurEnv = e = newenvelope(e);
+                       CurEnv = e = newenvelope(e, CurEnv);
                        break;
 
                  case CMDVRFY:         /* vrfy -- verify address */
                        break;
 
                  case CMDVRFY:         /* vrfy -- verify address */
index 1bc883e..2295fcd 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)version.c  6.28 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c  6.29 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-char   Version[] = "ALPHA-6.28";
+char   Version[] = "ALPHA-6.29";