X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsend.c;h=3ca6772190d9aba80ce5e58081dd6ce0de220acd;hp=adb2039f04bac66c6fd1e71204451c684de3e2cb;hb=8bf8e1e29df17658c3d77629e17f88bf9159e21b;hpb=0127c00f735b9e38608676b9f7bd3c6e38a7ffb4 diff --git a/uip/send.c b/uip/send.c index adb2039..3ca6772 100644 --- a/uip/send.c +++ b/uip/send.c @@ -448,8 +448,8 @@ attach(char *draft_file_name) fclose(composition_file); /* We're ready to roll! */ - sprintf(buf, "mhbuild %s", composition_file_name); - if (system(buf) != 0) { + if (execprogl("mhbuild", "mhbuild", composition_file_name, + (char *)NULL) != 0) { /* some problem */ clean_up_temporary_files(); return (NOTOK); @@ -469,6 +469,7 @@ signandenc(char *draft_file_name) char buf[BUFSIZ]; int dosign = 0; int doenc = 0; + int ret; if (!(draft_file = fopen(draft_file_name, "r"))) { adios(NULL, "can't open draft file `%s'.", draft_file_name); @@ -495,9 +496,14 @@ signandenc(char *draft_file_name) strcpy(composition_file_name, draft_file_name); /* We're ready to roll! */ - sprintf(buf, "mhsign -m%s '%s'", doenc ? " -e" : "", - draft_file_name); - if (system(buf) != 0) { + if (doenc) { + ret = execprogl("mhsign", "mhsign", "-m", "-e", + draft_file_name, (char *)NULL); + } else { + ret = execprogl("mhsign", "mhsign", "-m", + draft_file_name, (char *)NULL); + } + if (ret != 0) { /* some problem */ return (NOTOK); }