"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/conf.c" between
msmtp-1.8.16.tar.xz and msmtp-1.8.17.tar.xz

About: msmtp is an SMTP client with a sendmail compatible interface. It can be used with Mutt and other mail user agents.

conf.c  (msmtp-1.8.16.tar.xz):conf.c  (msmtp-1.8.17.tar.xz)
skipping to change at line 839 skipping to change at line 839
if (acc->tls_crl_file && !acc->tls_trust_file) if (acc->tls_crl_file && !acc->tls_trust_file)
{ {
*errstr = xasprintf(_("tls_crl_file requires tls_trust_file")); *errstr = xasprintf(_("tls_crl_file requires tls_trust_file"));
return CONF_ESYNTAX; return CONF_ESYNTAX;
} }
return CONF_EOK; return CONF_EOK;
} }
/* /*
* get_password_eval()
*
* see conf.h
*/
int get_password_eval(const char *arg, char **buf, char **errstr)
{
FILE *eval;
size_t bufsize;
size_t len;
*buf = NULL;
*errstr = NULL;
errno = 0;
bufsize = 1; /* Account for the null character. */
if (!(eval = popen(arg, "r")))
{
if (errno == 0)
{
errno = ENOMEM;
}
*errstr = xasprintf(_("cannot evaluate '%s': %s"), arg, strerror(errno))
;
return CONF_EIO;
}
do
{
bufsize += LINEBUFSIZE;
*buf = xrealloc(*buf, bufsize);
if (!fgets(&(*buf)[bufsize - LINEBUFSIZE - 1], LINEBUFSIZE + 1, eval))
{
*errstr = xasprintf(_("cannot read output of '%s'"), arg);
pclose(eval);
free(*buf);
*buf = NULL;
return CONF_EIO;
}
len = strlen(*buf);
if (len > 0 && (*buf)[len - 1] == '\n')
{
/* Read only the first line. */
break;
}
}
while (!feof(eval));
pclose(eval);
if (len > 0 && (*buf)[len - 1] == '\n')
{
(*buf)[len - 1] = '\0';
if (len - 1 > 0 && (*buf)[len - 2] == '\r')
{
(*buf)[len - 2] = '\0';
}
}
return CONF_EOK;
}
/*
* helper function for expand_from() and expand_domain() * helper function for expand_from() and expand_domain()
*/ */
static int expand_from_or_domain(char **str, int expand_U, char **errstr) static int expand_from_or_domain(char **str, int expand_U, char **errstr)
{ {
char* M = NULL; char* M = NULL;
char* U = NULL; char* U = NULL;
char* H = NULL; char* H = NULL;
char* C = NULL; char* C = NULL;
 End of changes. 1 change blocks. 
62 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)