Projects
Kolab:3.4
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 95
View file
cyrus-imapd.spec
Changed
@@ -496,13 +496,7 @@ source %{_sysconfdir}/sysconfig/cyrus-imapd fi -if [ $CHATTRSYNC -eq 0 ]; then - # Force synchronous updates of files in the following directories - chattr -R -S \ - $(grep ^configdirectory: /etc/imapd.conf | cut -d':' -f2) \ - $(grep ^partition- /etc/imapd.conf | cut -d':' -f2) \ - $(grep ^metapartition- /etc/imapd.conf | cut -d':' -f2) 2>/dev/null ||: -else +if [ $CHATTRSYNC -eq 1 ]; then # Force synchronous updates of files in the following directories chattr -R +S \ $(grep ^configdirectory: /etc/imapd.conf | cut -d':' -f2) \
View file
cyrus-imapd-2.5.tar.gz/imap/ctl_mboxlist.c
Changed
@@ -228,7 +228,6 @@ syslog(LOG_DEBUG, "Mailbox ACL: '%s %s' (acl now: %s)", dl_ace->name, tmp, acl); } - if (tmp) free(tmp); } } else { // (dl_acl) syslog(LOG_NOTICE, "Mailbox without an ACL: '%s'", name); @@ -904,51 +903,58 @@ static int verify_cb(void *rockp, const char *key, size_t keylen, - const char *data, size_t datalen __attribute__((unused))) + const char *data, size_t datalen) { + // This function is called for every entry in the database, + // and supplied an inventory in &found. *data however does + // not pass dlist_parsemap() unlike is the case with dump_db(). + struct found_list *found = (struct found_list *) rockp; - int r; - char *p; - char *name, *part, *acl; - int mbtype; + int r = 0; + char *name, *part; + mbentry_t *mbentry = NULL; /* \0 terminate 'name' */ name = xstrndup(key, keylen); - /* Get mailbox type */ - mbtype = strtol(data, &p, 10); - if (mbtype < 0) { /* impossible, but keeps the compiler happy */ - abort(); - } + // Look up the mailbox db entry + r = mboxlist_lookup(name, &mbentry, NULL); + part = xstrdup(mbentry->partition); + mboxlist_entry_free(&mbentry); + + if (r) { + printf("'%s' has a directory '%s' but no DB entry\n", + found->data[found->idx].mboxname, + found->data[found->idx].path + ); + } else { + // Walk the directories to see if the mailbox from data does have + // paths on the filesystem. + do { + r = -1; + if ( + (found->idx >= found->size) || /* end of array */ + !(found->data[found->idx].type & MBOX) || /* end of mailboxes */ + (r = strcmp(name, found->data[found->idx].mboxname)) < 0 + ) { + printf("'%s' has a DB entry but no directory on partition '%s'\n", + name, + part + ); + + } + else if (r > 0) { + printf("'%s' has a directory '%s' but no DB entry\n", + found->data[found->idx].mboxname, + found->data[found->idx].path + ); + + found->idx++; + } + else found->idx++; + } while (r > 0); - p = strchr(data, ' '); - if (p == NULL) { - abort(); - } - p++; - acl = strchr(p, ' '); - if (acl == NULL) { - abort(); } - /* grab 'part', \0 terminate */ - part = xstrndup(p, acl - p); - - do { - r = -1; - if ((found->idx >= found->size) || /* end of array */ - !(found->data[found->idx].type & MBOX) || /* end of mailboxes */ - (r = strcmp(name, found->data[found->idx].mboxname)) < 0) { - printf("'%s' has a DB entry but no directory on partition '%s'\n", - name, part); - } - else if (r > 0) { - printf("'%s' has a directory '%s' but no DB entry\n", - found->data[found->idx].mboxname, - found->data[found->idx].path); - found->idx++; - } - else found->idx++; - } while (r > 0); free(name); free(part);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.