]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
DEBUG: crashfix when switching modify log
authorTimo Sirainen <tss@iki.fi>
Thu, 10 Jul 2003 15:24:10 +0000 (18:24 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 10 Jul 2003 15:24:10 +0000 (18:24 +0300)
--HG--
branch : HEAD

src/lib-index/mail-modifylog.c

index b29aeee9f73fe2dc099b7aeb3864d0a95782cf78..a90bb191445f75a77c71eff388d4bc2bc1a30a42 100644 (file)
@@ -888,6 +888,10 @@ static int mail_modifylog_try_truncate(struct modify_log_file *file)
        if (modifylog_have_other_users(file->log, TRUE) != 0)
                return FALSE;
 
+#ifdef DEBUG
+       mprotect(file->header, sizeof(struct modify_log_header),
+                PROT_READ | PROT_WRITE);
+#endif
        file->header->sync_id = 0;
        file->header->used_file_size = sizeof(struct modify_log_header);