X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/685dd439ef0166954c59c3f8a2f6903d0a7cbab9..a6a073be4aea5e0a1ca2e55920d0f97c8a5f273a:/uip/whatnowsbr.c?ds=inline diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index ab90eb86..eb6106a7 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -552,10 +552,10 @@ writesomecmd(char *buf, int bufsz, char *cmd, char *trailcmd, char **argp) int trailln = strlen(trailcmd) + 4; if (ln < 0 || ln + trailln > bufsz) adios((char *)0, "arguments too long"); - + cp = buf + ln; - - while (*++argp != (char *)0) { + + while (*argp && *++argp) { ln = strlen(*argp); /* +1 for leading space */ if (ln + trailln + 1 > bufsz - (cp-buf)) @@ -618,7 +618,7 @@ popen_in_dir(const char *dir, const char *cmd, const char *type) /* ensure that $SHELL exists, as the cmd was written relying on a non-blank $SHELL... */ setenv("SHELL","/bin/sh",0); /* don't overwrite */ - + if (getcwd(olddir, sizeof(olddir)) == 0) adios("getcwd", "could not get working directory"); if (chdir(dir) != 0) @@ -852,7 +852,6 @@ sendfile (char **arg, char *file, int pushsw) advise (NULL, "unable to fork, so sending directly..."); case OK: vec = argsplit(sendproc, &program, &vecp); - vec[vecp++] = invo_name; if (pushsw) vec[vecp++] = "-push"; if (arg) @@ -1013,10 +1012,6 @@ check_draft (char *msgnam) X("help", 0, SHELPSW) \ X("dashstuffing", -12, BITSTUFFSW) \ X("nodashstuffing", -14, NBITSTUFFSW) \ - X("mail", -4, MAILSW) \ - X("saml", -4, SAMLSW) \ - X("send", -4, SSNDSW) \ - X("soml", -4, SOMLSW) \ X("client host", -6, CLIESW) \ X("server host", 6, SERVSW) \ X("snoop", -5, SNOOPSW) \ @@ -1033,6 +1028,7 @@ check_draft (char *msgnam) X("attachformat", 7, SNDATTACHFORMAT) \ X("port server-port-name/number", 4, PORTSW) \ X("tls", TLSminc(-3), TLSSW) \ + X("initialtls", TLSminc(-10), INITTLSSW) \ X("notls", TLSminc(-5), NTLSSW) \ X("mts smtp|sendmail/smtp|sendmail/pipe", 2, MTSSW) \ X("messageid localname|random", 2, MESSAGEIDSW) \ @@ -1202,14 +1198,11 @@ sendit (char *sp, char **arg, char *file, int pushed) case NMSGDSW: case WATCSW: case NWATCSW: - case MAILSW: - case SAMLSW: - case SSNDSW: - case SOMLSW: case SNOOPSW: case SASLSW: case NOSASLSW: case TLSSW: + case INITTLSSW: case NTLSSW: vec[vecp++] = --cp; continue; @@ -1344,7 +1337,6 @@ whomfile (char **arg, char *file) case OK: vec = argsplit(whomproc, &program, &vecp); - vec[vecp++] = r1bindex (whomproc, '/'); vec[vecp++] = file; if (arg) while (*arg)