]> diplodocus.org Git - nmh/blobdiff - uip/post.c
Start of the signed/unsigned char cleanup.
[nmh] / uip / post.c
index 7bed6f8a70e0a47512dec02a7472bde15816248a..35cf91fcb3ebbd07c10800f724e4270c1ac99b12 100644 (file)
@@ -185,8 +185,6 @@ static short fccind = 0;    /* index into fccfold[] */
 static short outputlinelen = OUTPUTLINELEN;
 
 static int pfd = NOTOK;                /* fd to write annotation list to        */
-static uid_t myuid= -1;                /* my user id                            */
-static gid_t mygid= -1;                /* my group id                           */
 static int recipients = 0;     /* how many people will get a copy       */
 static int unkadr = 0;         /* how many of those were unknown        */
 static int badadr = 0;         /* number of bad addrs                   */
@@ -927,8 +925,6 @@ start_headers (void)
     char sigbuf[BUFSIZ];
     struct mailname *mp;
 
-    myuid = getuid ();
-    mygid = getgid ();
     time (&tclock);
 
     /*
@@ -1284,9 +1280,9 @@ make_bcc_file (int dashstuff)
 {
     int fd, i;
     pid_t child_id;
-    char *vec[6];
+    char **vec;
     FILE *out;
-    char *tfile = NULL;
+    char *tfile = NULL, *program;
 
     tfile = m_mktemp2(NULL, "bccs", NULL, &out);
     if (tfile == NULL) adios("bcc", "unable to create temporary file");
@@ -1338,8 +1334,6 @@ make_bcc_file (int dashstuff)
      * of MIME encapsulation.
      */
     if (filter != NULL) {
-       vec[0] = r1bindex (mhlproc, '/');
-
        for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
            sleep (5);
        switch (child_id) {
@@ -1349,7 +1343,7 @@ make_bcc_file (int dashstuff)
            case OK: 
                dup2 (fileno (out), 1);
 
-               i = 1;
+               vec = argsplit(mhlproc, &program, &i);
                vec[i++] = "-forward";
                vec[i++] = "-form";
                vec[i++] = filter;
@@ -1362,7 +1356,7 @@ make_bcc_file (int dashstuff)
                    vec[i++] = "-nodashstuffing";
                vec[i] = NULL;
 
-               execvp (mhlproc, vec);
+               execvp (program, vec);
                fprintf (stderr, "unable to exec ");
                perror (mhlproc);
                _exit (-1);