X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b790a6cbffcebe3371dafa72f9e0a5f404358ac2..cb7874fcb45549b99e4847affe4a2bd20e20e648:/uip/sendsbr.c diff --git a/uip/sendsbr.c b/uip/sendsbr.c index e55361c8..74f7dae5 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -88,7 +88,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st, break; case OK: - buildvec = argsplit(buildmimeproc, &buildprogram, &i); + buildvec = argsplit(buildmimeproc, &buildprogram, &i); buildvec[i++] = "-auto"; if (distfile) buildvec[i++] = "-dist"; @@ -129,10 +129,15 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st, */ if (auth_svc) { +#ifdef OAUTH_SUPPORT const char *errmsg; if (setup_oauth_params(vec, nvecsp, auth_svc, &errmsg) != OK) { adios(NULL, errmsg); } +#else + adios(NULL, "send built without OAUTH_SUPPORT, " + "so auth_svc %s is not supported", auth_svc); +#endif /* OAUTH_SUPPORT */ } /* @@ -765,7 +770,8 @@ handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) { } break; #else - adios(NULL, "sendfrom built without OAUTH_SUPPORT, " + NMH_UNUSED(auth_svc); + adios(NULL, "send built without OAUTH_SUPPORT, " "so -saslmech xoauth2 is not supported"); #endif /* OAUTH_SUPPORT */ } @@ -815,7 +821,9 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc, sizeof(errbuf))) adios(NULL, "Unable to retrieve oauth profile entries: %s", errbuf); - + + vec[(*vecp)++] = getcpy("-authservice"); + vec[(*vecp)++] = getcpy(auth_svc); vec[(*vecp)++] = getcpy("-oauthcredfile"); vec[(*vecp)++] = getcpy(mh_oauth_cred_fn(auth_svc)); vec[(*vecp)++] = getcpy("-oauthclientid");