From 4857e59b250f28a2d020bccac8bbcb489b48e328 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Fri, 6 Mar 2015 22:58:58 -0500 Subject: [PATCH] Rearrange all callers of post(8) so that the filename is always last. --- uip/mhmail | 2 +- uip/rcvdist.c | 2 +- uip/sendsbr.c | 2 +- uip/whatnowsbr.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/uip/mhmail b/uip/mhmail index b5a3c35e..c43f9c3f 100755 --- a/uip/mhmail +++ b/uip/mhmail @@ -292,7 +292,7 @@ else post_or_send="$nmhbindir/send" fi - if "$post_or_send" "$tmpfile" $postsendargs; then + if "$post_or_send" $postsendargs "$tmpfile"; then exit else status=$? diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 6d144be1..ae55f613 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -118,11 +118,11 @@ main (int argc, char **argv) done (1); vec[vecp++] = "-dist"; - vec[vecp++] = drft; if ((cp = context_find ("mhlproc"))) { vec[vecp++] = "-mhlproc"; vec[vecp++] = cp; } + vec[vecp++] = drft; vec[vecp] = NULL; for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) diff --git a/uip/sendsbr.c b/uip/sendsbr.c index af9412df..07c7f974 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -389,7 +389,6 @@ sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st) fd = pushsw ? tmp_fd () : NOTOK; fd2 = NOTOK; - vec[vecp++] = drft; if (annotext) { if ((fd2 = tmp_fd ()) != NOTOK) { vec[vecp++] = "-idanno"; @@ -400,6 +399,7 @@ sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st) "for annotation list", get_temp_dir()); } } + vec[vecp++] = drft; if (distfile && distout (drft, distfile, backup) == NOTOK) done (1); vec[vecp] = NULL; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 21fb1519..207f1a8c 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -1253,10 +1253,10 @@ whomfile (char **arg, char *file) case OK: vec = argsplit(whomproc, &program, &vecp); - vec[vecp++] = file; if (arg) while (*arg) vec[vecp++] = *arg++; + vec[vecp++] = file; vec[vecp] = NULL; execvp (program, vec); -- 2.56.0