"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/conf.c" between
msmtp-1.8.19.tar.xz and msmtp-1.8.20.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.19.tar.xz):conf.c  (msmtp-1.8.20.tar.xz)
skipping to change at line 72 skipping to change at line 72
account_t *a; account_t *a;
a = xmalloc(sizeof(account_t)); a = xmalloc(sizeof(account_t));
a->id = id ? xstrdup(id) : NULL; a->id = id ? xstrdup(id) : NULL;
a->conffile = conffile ? xstrdup(conffile) : NULL; a->conffile = conffile ? xstrdup(conffile) : NULL;
a->mask = 0LL; a->mask = 0LL;
a->host = NULL; a->host = NULL;
a->port = 0; /* this must be set later */ a->port = 0; /* this must be set later */
a->timeout = 0; a->timeout = 0;
a->protocol = SMTP_PROTO_SMTP; a->protocol = SMTP_PROTO_SMTP;
a->domain = xstrdup("localhost"); a->domain = xstrdup("localhost");
a->allow_from_override = 1;
a->auto_from = 0; a->auto_from = 0;
a->from = NULL; a->from = NULL;
a->maildomain = NULL; a->maildomain = NULL;
a->dsn_return = NULL; a->dsn_return = NULL;
a->dsn_notify = NULL; a->dsn_notify = NULL;
a->auth_mech = NULL; a->auth_mech = NULL;
a->username = NULL; a->username = NULL;
a->password = NULL; a->password = NULL;
a->passwordeval = NULL; a->passwordeval = NULL;
a->ntlmdomain = NULL; a->ntlmdomain = NULL;
skipping to change at line 131 skipping to change at line 132
{ {
a = xmalloc(sizeof(account_t)); a = xmalloc(sizeof(account_t));
a->id = acc->id ? xstrdup(acc->id) : NULL; a->id = acc->id ? xstrdup(acc->id) : NULL;
a->conffile = acc->conffile ? xstrdup(acc->conffile) : NULL; a->conffile = acc->conffile ? xstrdup(acc->conffile) : NULL;
a->mask = acc->mask; a->mask = acc->mask;
a->host = acc->host ? xstrdup(acc->host) : NULL; a->host = acc->host ? xstrdup(acc->host) : NULL;
a->port = acc->port; a->port = acc->port;
a->timeout = acc->timeout; a->timeout = acc->timeout;
a->protocol = acc->protocol; a->protocol = acc->protocol;
a->domain = acc->domain ? xstrdup(acc->domain) : NULL; a->domain = acc->domain ? xstrdup(acc->domain) : NULL;
a->allow_from_override = acc->allow_from_override;
a->auto_from = acc->auto_from; a->auto_from = acc->auto_from;
a->from = acc->from ? xstrdup(acc->from) : NULL; a->from = acc->from ? xstrdup(acc->from) : NULL;
a->maildomain = acc->maildomain ? xstrdup(acc->maildomain) : NULL; a->maildomain = acc->maildomain ? xstrdup(acc->maildomain) : NULL;
a->dsn_return = acc->dsn_return ? xstrdup(acc->dsn_return) : NULL; a->dsn_return = acc->dsn_return ? xstrdup(acc->dsn_return) : NULL;
a->dsn_notify = acc->dsn_notify ? xstrdup(acc->dsn_notify) : NULL; a->dsn_notify = acc->dsn_notify ? xstrdup(acc->dsn_notify) : NULL;
a->auth_mech = acc->auth_mech ? xstrdup(acc->auth_mech) : NULL; a->auth_mech = acc->auth_mech ? xstrdup(acc->auth_mech) : NULL;
a->username = acc->username ? xstrdup(acc->username) : NULL; a->username = acc->username ? xstrdup(acc->username) : NULL;
a->password = acc->password ? xstrdup(acc->password) : NULL; a->password = acc->password ? xstrdup(acc->password) : NULL;
a->passwordeval = acc->passwordeval ? xstrdup(acc->passwordeval) : NULL; a->passwordeval = acc->passwordeval ? xstrdup(acc->passwordeval) : NULL;
a->ntlmdomain = acc->ntlmdomain ? xstrdup(acc->ntlmdomain) : NULL; a->ntlmdomain = acc->ntlmdomain ? xstrdup(acc->ntlmdomain) : NULL;
skipping to change at line 592 skipping to change at line 594
} }
if (acc2->mask & ACC_DOMAIN) if (acc2->mask & ACC_DOMAIN)
{ {
free(acc1->domain); free(acc1->domain);
acc1->domain = acc2->domain ? xstrdup(acc2->domain) : NULL; acc1->domain = acc2->domain ? xstrdup(acc2->domain) : NULL;
} }
if (acc2->mask & ACC_AUTO_FROM) if (acc2->mask & ACC_AUTO_FROM)
{ {
acc1->auto_from = acc2->auto_from; acc1->auto_from = acc2->auto_from;
} }
if (acc2->mask & ACC_FROM) if (acc1->allow_from_override && (acc2->mask & ACC_FROM))
{ {
free(acc1->from); free(acc1->from);
acc1->from = acc2->from ? xstrdup(acc2->from) : NULL; acc1->from = acc2->from ? xstrdup(acc2->from) : NULL;
} }
if (acc2->mask & ACC_MAILDOMAIN) if (acc2->mask & ACC_MAILDOMAIN)
{ {
free(acc1->maildomain); free(acc1->maildomain);
acc1->maildomain = acc2->maildomain ? xstrdup(acc2->maildomain) : NULL; acc1->maildomain = acc2->maildomain ? xstrdup(acc2->maildomain) : NULL;
} }
if (acc2->mask & ACC_AUTH_MECH) if (acc2->mask & ACC_AUTH_MECH)
skipping to change at line 1401 skipping to change at line 1403
acc->mask |= ACC_DOMAIN; acc->mask |= ACC_DOMAIN;
free(acc->domain); free(acc->domain);
acc->domain = xstrdup(arg); acc->domain = xstrdup(arg);
} }
else if (strcmp(cmd, "from") == 0) else if (strcmp(cmd, "from") == 0)
{ {
acc->mask |= ACC_FROM; acc->mask |= ACC_FROM;
free(acc->from); free(acc->from);
acc->from = xstrdup(arg); acc->from = xstrdup(arg);
} }
else if (strcmp(cmd, "allow_from_override") == 0)
{
/* There is no mask value for this command since it can only
* occur in the configuration file, not on the command line */
if (is_on(arg))
{
acc->allow_from_override = 1;
}
else if (is_off(arg))
{
acc->allow_from_override = 0;
}
else
{
*errstr = xasprintf(
_("line %d: invalid argument %s for command %s"),
line, arg, cmd);
e = CONF_ESYNTAX;
break;
}
}
else if (strcmp(cmd, "auth") == 0) else if (strcmp(cmd, "auth") == 0)
{ {
acc->mask |= ACC_AUTH_MECH; acc->mask |= ACC_AUTH_MECH;
free(acc->auth_mech); free(acc->auth_mech);
if (*arg == '\0' || is_on(arg)) if (*arg == '\0' || is_on(arg))
{ {
acc->auth_mech = xstrdup(""); acc->auth_mech = xstrdup("");
} }
else if (is_off(arg)) else if (is_off(arg))
{ {
 End of changes. 4 change blocks. 
1 lines changed or deleted 24 lines changed or added

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