From: David Levine Date: Wed, 1 May 2013 01:54:43 +0000 (-0500) Subject: Applied what was done to uip/send.c in commit X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/eb0ef7cf179d52a8ac61d1bc4296aa229cf7dd55?hp=ce399941039778944bc5bc8d10c5f3603089af30 Applied what was done to uip/send.c in commit af429a902add614e35cd76d15172a4ccb70a3be1 to uip/viamail.c and uip/whatnowsbr.c, because they call sendsbr() directly. --- diff --git a/uip/viamail.c b/uip/viamail.c index eb3ae8bc..7c81079d 100644 --- a/uip/viamail.c +++ b/uip/viamail.c @@ -187,6 +187,7 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw, struct stat st; FILE *fp; char *tfile = NULL; + char *cp; umask (~m_gmprot ()); @@ -243,6 +244,12 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw, if (verbsw) vec[vecp++] = "-verbose"; + if ((cp = context_find ("credentials"))) { + /* post doesn't read context so need to pass credentials. */ + vec[vecp++] = "-credentials"; + vec[vecp++] = cp; + } + switch (sendsbr (vec, vecp, program, tmpfil, &st, 0, (char *)0, 0)) { case DONE: case NOTOK: diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 98fe9eaa..13c7b0bb 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -1121,13 +1121,19 @@ sendit (char *sp, char **arg, char *file, int pushed) vec[vecp++] = getcpy (m_maildir ("")); if ((cp = context_find ("fileproc"))) { - vec[vecp++] = "-fileproc"; - vec[vecp++] = cp; + vec[vecp++] = "-fileproc"; + vec[vecp++] = cp; } if ((cp = context_find ("mhlproc"))) { - vec[vecp++] = "-mhlproc"; - vec[vecp++] = cp; + vec[vecp++] = "-mhlproc"; + vec[vecp++] = cp; + } + + if ((cp = context_find ("credentials"))) { + /* post doesn't read context so need to pass credentials. */ + vec[vecp++] = "-credentials"; + vec[vecp++] = cp; } while ((cp = *argp++)) {