throw in some "errno = 0;"'s to make syserr's more accurate;
[unix-history] / usr / src / usr.sbin / sendmail / src / main.c
index 373a8eb..6e13e04 100644 (file)
@@ -6,7 +6,7 @@
 # include <syslog.h>
 # endif LOG
 
 # include <syslog.h>
 # endif LOG
 
-static char    SccsId[] = "@(#)main.c  3.40    %G%";
+static char    SccsId[] = "@(#)main.c  3.41    %G%";
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
@@ -502,9 +502,9 @@ main(argc, argv)
 
        DontSend = FALSE;
        To = NULL;
 
        DontSend = FALSE;
        To = NULL;
-       errno = 0;
        if (!verifyonly || GrabTo)
                collect();
        if (!verifyonly || GrabTo)
                collect();
+       errno = 0;
 
        /* collect statistics */
        Stat.stat_nf[From.q_mailer]++;
 
        /* collect statistics */
        Stat.stat_nf[From.q_mailer]++;
@@ -627,6 +627,9 @@ setfrom(from, realname)
        if (from != NULL)
        {
                if (strcmp(realname, "network") != 0 && strcmp(realname, "uucp") != 0 &&
        if (from != NULL)
        {
                if (strcmp(realname, "network") != 0 && strcmp(realname, "uucp") != 0 &&
+# ifdef DEBUG
+                   (Debug == 0 || getuid() != geteuid()) &&
+# endif DEBUG
                    index(from, '!') == NULL && getuid() != 0)
                {
                        /* network sends -r regardless (why why why?) */
                    index(from, '!') == NULL && getuid() != 0)
                {
                        /* network sends -r regardless (why why why?) */