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 */
char sigbuf[BUFSIZ];
struct mailname *mp;
- myuid = getuid ();
- mygid = getgid ();
time (&tclock);
/*
{
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");
* 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) {
case OK:
dup2 (fileno (out), 1);
- i = 1;
+ vec = argsplit(mhlproc, &program, &i);
vec[i++] = "-forward";
vec[i++] = "-form";
vec[i++] = filter;
vec[i++] = "-nodashstuffing";
vec[i] = NULL;
- execvp (mhlproc, vec);
+ execvp (program, vec);
fprintf (stderr, "unable to exec ");
perror (mhlproc);
_exit (-1);