From: Timo Sirainen Date: Thu, 10 Jul 2003 15:24:10 +0000 (+0300) Subject: DEBUG: crashfix when switching modify log X-Git-Tag: 1.1.alpha1~4494 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=370a15592e698c1068e65c96d79807d83413fe9e;p=thirdparty%2Fdovecot%2Fcore.git DEBUG: crashfix when switching modify log --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-modifylog.c b/src/lib-index/mail-modifylog.c index b29aeee9f7..a90bb19144 100644 --- a/src/lib-index/mail-modifylog.c +++ b/src/lib-index/mail-modifylog.c @@ -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);