X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f1722de88a9d80bc4aa8e787eee942a1c3fbb702..0138ab0e9b1e8fa59be141338d599277095dec8c:/uip/post.c diff --git a/uip/post.c b/uip/post.c index 7bed6f8a..35cf91fc 100644 --- a/uip/post.c +++ b/uip/post.c @@ -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);