Commit f697923a f697923aaf4a171efe5a074fc064edf415d6643f by Sergey Poznyakoff

Bugfix.

* libmu_cfg/tls.c (cb2_safety_checks): Fix handling of "all" and "none".
* maidag/maidag.c (cb2_forward_file_checks): Likewise.
* maidag/forward.c (maidag_forward): Handle MU_ERR_EXISTS return properly.
1 parent 7b85649a
......@@ -64,9 +64,15 @@ cb2_safety_checks (const char *name, void *data)
name++;
if (strcmp (name, "none") == 0)
val = MU_FILE_SAFETY_NONE;
{
*res = negate ? MU_FILE_SAFETY_ALL : MU_FILE_SAFETY_NONE;
return 0;
}
else if (strcmp (name, "all") == 0)
val = MU_FILE_SAFETY_ALL;
{
*res = negate ? MU_FILE_SAFETY_NONE : MU_FILE_SAFETY_ALL;
return 0;
}
else if (strcmp (name, "default") == 0)
{
if (data == &tls_settings.ssl_key)
......
......@@ -216,7 +216,7 @@ maidag_forward (mu_message_t msg, struct mu_auth_data *auth, char *fwfile)
auth, idlist);
if (rc == 0)
result = process_forward (msg, filename, auth->name);
else if (rc)
else if (rc == MU_ERR_EXISTS)
mu_diag_output (MU_DIAG_NOTICE,
_("skipping forward file %s: already processed"),
filename);
......
......@@ -348,9 +348,15 @@ cb2_forward_file_checks (const char *name, void *data)
name++;
if (strcmp (name, "none") == 0)
forward_file_checks = MU_FILE_SAFETY_NONE;
{
forward_file_checks = negate ? MU_FILE_SAFETY_ALL : MU_FILE_SAFETY_NONE;
return 0;
}
else if (strcmp (name, "all") == 0)
forward_file_checks = MU_FILE_SAFETY_ALL;
{
forward_file_checks = negate ? MU_FILE_SAFETY_NONE : MU_FILE_SAFETY_ALL;
return 0;
}
else if (strcmp (name, "default") == 0)
forward_file_checks = FORWARD_FILE_PERM_CHECK;
else if (mu_file_safety_name_to_code (name, &val))
......