You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In timsieved it's very careful to always keep a script active:
/* ok we want to do this atomically so let's
- make <activesieve>.NEW as a hard link
- rename it to <activesieve>
*/
result = symlink(filename, "defaultbc.NEW");
if (result) {
syslog(LOG_ERR, "symlink(%s, defaultbc.NEW): %m", filename);
prot_printf(conn, "NO \"Can't make link\"\r\n");
return TIMSIEVE_FAIL;
}
result = rename("defaultbc.NEW", "defaultbc");
if (result) {
unlink("defaultbc.NEW");
syslog(LOG_ERR, "rename(defaultbc.NEW, defaultbc): %m");
prot_printf(conn,"NO \"Error renaming\"\r\n");
return TIMSIEVE_FAIL;
}
sync_log_sieve(sieved_userid);
...
In sync_support, it is not only not atomic, it has a gap while the whole file gets recompiled:
/* N.B symlink() does NOT verify target for anything but string validity,
* so activation of a nonexistent script will report success.
*/
if (symlink(target, active) < 0)
return(IMAP_IOERROR);
...
sync_support should switch to using the same logic that timsieved does to ensure there's always an active script.
The text was updated successfully, but these errors were encountered:
In timsieved it's very careful to always keep a script active:
...
In sync_support, it is not only not atomic, it has a gap while the whole file gets recompiled:
#ifdef USE_SIEVE
char *bc_fname = strconcat(sieve_path, "/", target, NULL);
sieve_rebuild(NULL, bc_fname, 0, NULL);
free(bc_fname);
#endif
...
sync_support should switch to using the same logic that timsieved does to ensure there's always an active script.
The text was updated successfully, but these errors were encountered: