]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
Import Dave Crocker's brief history of email development at Rand.
[nmh] / mts / smtp / smtp.c
index 98c20d83c4faf85328b774038265406646b41894..e4522f4a7c4757f82c0a7f6acb23ae100055d919 100644 (file)
@@ -142,13 +142,12 @@ static int tls_active = 0;
 
 static char *sm_noreply = "No reply text given";
 static char *sm_moreply = "; ";
-
-struct smtp sm_reply;          /* global... */
+static struct smtp sm_reply;
 
 #define        MAXEHLO 20
 
 static int doingEHLO;
-char *EHLOkeys[MAXEHLO + 1];
+static char *EHLOkeys[MAXEHLO + 1];
 
 /*
  * static prototypes
@@ -481,8 +480,6 @@ sendmail_init (char *client, char *server, int watch, int verbose,
                vec[vecp++] = "-ov";
            vec[vecp++] = NULL;
 
-           setgid (getegid ());
-           setuid (geteuid ());
            execvp (sendmail, vec);
            fprintf (stderr, "unable to exec ");
            perror (sendmail);
@@ -854,7 +851,7 @@ sm_auth_sasl(char *user, int saslssf, char *mechlist, char *inhost)
        strncpy(host, inhost, sizeof(host) - 1);
     }
 
-    nmh_get_credentials (host, user, 1, &creds);
+    nmh_get_credentials (host, user, 0, &creds);
 
     /* It's OK to copy the creds pointers here.  The callbacks that
        use them will only be called before this function returns. */