Projects
Kolab:3.4
cyrus-imapd
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 98
View file
cyrus-imapd.spec
Changed
@@ -38,13 +38,13 @@ Name: cyrus-imapd Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support Version: 2.5 -Release: 0.1.dev20140829.git1907cfc2%{?dist} +Release: 0.1.dev20141003.git44e8e7f7%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.cyrusimap.org # Upstream sources -# From 1907cfc24b5b3bee0e4f81f87ba5ab3be3a8a418 +# From 44e8e7f7d0e16cc6005441709fc7c02e7032d6b3 Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus/%{_name}-%{real_version}%{?dot_snapshot_version}.tar.gz Source1: cyrus-imapd.imap-2.3.x-conf Source2: cyrus-imapd.cvt_cyrusdb_all
View file
cyrus-imapd-2.5.tar.gz/cmulocal/sasl2.m4
Changed
@@ -65,8 +65,7 @@ fi fi AC_CHECK_HEADER([gssapi.h],, - [AC_CHECK_HEADER([gssapi/gssapi.h],, - [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])]) + [AC_CHECK_HEADER([gssapi/gssapi.h],, [gssapi=no])]) AC_CHECK_HEADERS(gssapi/gssapi_ext.h) CPPFLAGS=$cmu_saved_CPPFLAGS
View file
cyrus-imapd-2.5.tar.gz/configure.ac
Changed
@@ -866,7 +866,7 @@ fi, AC_WARN(No Kerberos V4 found); krb4=no, $KRB_LIBS), - AC_WARN(No Kerberos V4 found); krb4=no) + krb4=no) else AC_WARN(No DES library found for Kerberos V4 support) krb4=no @@ -1622,7 +1622,9 @@ Cyrus Imapd configured components event notification: $enable_event_notification + gssapi: $gssapi idled: $enable_idled + kerberos V4: $krb4 murder: $enable_murder nntpd: $enable_nntp replication: $enable_replication
View file
cyrus-imapd-2.5.tar.gz/cunit/imapurl.testc
Changed
@@ -228,6 +228,22 @@ CU_ASSERT_STRING_EQUAL(buf, URL); } +static void test_tourl_shared(void) +{ + static const char URL[] = "imap://wooster@jeeves/shared/test"; + struct imapurl iurl; + char buf[300]; + + memset(&iurl, 0, sizeof(iurl)); + iurl.user = "wooster"; + iurl.server = "jeeves"; + iurl.mailbox = "shared/test"; + memset(buf, 0x45, sizeof(buf)); + imapurl_toURL(buf, &iurl); + CU_ASSERT_STRING_EQUAL(buf, URL); +} + + static void test_tourl_options(void) { static const char URL[] = "imap://jeeves/deverill"
View file
cyrus-imapd-2.5.tar.gz/cunit/mboxname.testc
Changed
@@ -49,41 +49,278 @@ CU_ASSERT_EQUAL(c, 'J'); } -static void test_to_parts(void) +static void test_mboxname_to_parts_user(void) { - static const char FRED_DRAFTS[] = "user.fred.Drafts"; - static const char JANEAT_SENT[] = "bloggs.com!user.jane.Sent"; - static const char SHARED[] = "shared.Gossip"; - static const char SHAREDAT[] = "foonly.com!shared.Tattle"; + static const char USER[] = "user.john"; + static const char USER_SUB[] = "user.john.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(USER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(USER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_duser(void) +{ + static const char DUSER[] = "example.org!user.john"; + static const char DUSER_SUB[] = "example.org!user.john.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(DUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(DUSER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_suser(void) +{ + static const char SUSER[] = "user.john^doe"; + static const char SUSER_SUB[] = "user.john^doe.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(SUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(SUSER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_sduser(void) +{ + static const char SDUSER[] = "example.org!user.john^doe"; + static const char SDUSER_SUB[] = "example.org!user.john^doe.sub"; + struct mboxname_parts parts; int r; - r = mboxname_to_parts(FRED_DRAFTS, &parts); + r = mboxname_to_parts(SDUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(SDUSER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 0); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_xuser(void) +{ + static const char XUSER[] = "DELETED.user.john"; + static const char XUSER_SUB[] = "DELETED.user.john.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(XUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(XUSER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_sxuser(void) +{ + static const char SXUSER[] = "DELETED.user.john^doe"; + static const char SXUSER_SUB[] = "DELETED.user.john^doe.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(SXUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_PTR_NULL(parts.domain); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_PTR_NULL(parts.box); + mboxname_free_parts(&parts); + + r = mboxname_to_parts(SXUSER_SUB, &parts); CU_ASSERT_EQUAL(r, 0); CU_ASSERT_PTR_NULL(parts.domain); - CU_ASSERT_STRING_EQUAL(parts.userid, "fred"); - CU_ASSERT_STRING_EQUAL(parts.box, "Drafts"); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john^doe"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_dxuser(void) +{ + static const char DXUSER[] = "example.org!DELETED.user.john"; + static const char DXUSER_SUB[] = "example.org!DELETED.user.john.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(DXUSER, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_PTR_NULL(parts.box); mboxname_free_parts(&parts); - r = mboxname_to_parts(JANEAT_SENT, &parts); + r = mboxname_to_parts(DXUSER_SUB, &parts); + CU_ASSERT_EQUAL(r, 0); + CU_ASSERT_STRING_EQUAL(parts.domain, "example.org"); + CU_ASSERT_EQUAL(parts.is_deleted, 1); + CU_ASSERT_STRING_EQUAL(parts.userid, "john"); + CU_ASSERT_STRING_EQUAL(parts.box, "sub"); + mboxname_free_parts(&parts); +} + +static void test_mboxname_to_parts_dsxuser(void) +{ + static const char DSXUSER[] = "example.org!DELETED.user.john^doe"; + static const char DSXUSER_SUB[] = "example.org!DELETED.user.john^doe.sub"; + + struct mboxname_parts parts; + int r; + + r = mboxname_to_parts(DSXUSER, &parts); CU_ASSERT_EQUAL(r, 0); - CU_ASSERT_STRING_EQUAL(parts.domain, "bloggs.com"); - CU_ASSERT_STRING_EQUAL(parts.userid, "jane");
View file
cyrus-imapd-2.5.tar.gz/imap/mboxevent.c
Changed
@@ -661,7 +661,16 @@ return; FILL_STRING_PARAM(event, EVENT_ACL_SUBJECT, xstrdup(identifier)); - FILL_STRING_PARAM(event, EVENT_ACL_RIGHTS, xstrdup(rights)); + // If rights == 0x0, perhaps this is a Deleteacl command, that + // deletes the rights for a subject, rather than a *setting* the + // acl to an empty string like Setacl: Setacl <folder> <subject> "" + if (rights == 0x0) { + // Pretend it is filled, but do it with null or mboxevent_free + // will trip. + FILL_STRING_PARAM(event, EVENT_ACL_RIGHTS, '\0'); + } else { + FILL_STRING_PARAM(event, EVENT_ACL_RIGHTS, xstrdup(rights)); + } } EXPORTED void mboxevent_extract_record(struct mboxevent *event, struct mailbox *mailbox,
View file
cyrus-imapd-2.5.tar.gz/imap/mboxname.c
Changed
@@ -565,84 +565,41 @@ } /* Handle conversion from the internal namespace to the alternate namespace */ -static int mboxname_toexternal_alt(struct namespace *namespace, const char *name, +static int mboxname_toexternal_alt(struct namespace *namespace, const char *mboxname, const char *userid, char *result) { - char *domain; - size_t userlen, resultlen; - - /* Blank the result, just in case */ - result[0] = '\0'; - - if(strlen(name) > MAX_MAILBOX_NAME) return IMAP_MAILBOX_BADNAME; - - if (!userid) return IMAP_MAILBOX_BADNAME; - - userlen = strlen(userid); + char iresult[MAX_MAILBOX_NAME]; + int r = 0; - if (config_virtdomains && (domain = strchr(userid, '@'))) { - size_t domainlen = strlen(domain); + // Make this abundantly simple + mboxname_toexternal(namespace, mboxname, userid, iresult); - userlen = domain - userid; + r = strncasecmp(iresult, "inbox", 5); - if (!strncmp(name, domain+1, domainlen-1) && - name[domainlen-1] == '!') { - name += domainlen; + if (!r) { + if (iresult[5] == '\0') { + sprintf(result, "%s", iresult); + } else if (iresult[5] == namespace->hier_sep) { + sprintf(result, "%s", iresult+6); } - } - /* Personal (INBOX) namespace */ - if (!strncasecmp(name, "inbox", 5) && - (name[5] == '\0' || name[5] == '.')) { - if (name[5] == '\0') - strcpy(result, name); - else - strcpy(result, name+6); - } - /* paranoia - this shouldn't be needed */ - else if (!strncmp(name, "user.", 5) && - !strncmp(name+5, userid, userlen) && - (name[5+userlen] == '\0' || - name[5+userlen] == '.')) { - if (name[5+userlen] == '\0') - strcpy(result, "INBOX"); - else - strcpy(result, name+5+userlen+1); + return 0; } - /* Other Users namespace */ - else if (!strncmp(name, "user", 4) && - (name[4] == '\0' || name[4] == '.')) { - size_t prefixlen = strlen(namespace->prefix[NAMESPACE_USER]); - - if ((prefixlen > MAX_MAILBOX_NAME) || - ((name[4] == '.') && - ((prefixlen+1+strlen(name+5)) > MAX_MAILBOX_NAME))) - return IMAP_MAILBOX_BADNAME; + r = strncasecmp(iresult, "user", 4); - sprintf(result, "%.*s", - (int) (prefixlen-1), namespace->prefix[NAMESPACE_USER]); - resultlen = strlen(result); - if (name[4] == '.') { - sprintf(result+resultlen, "%c%s", namespace->hier_sep, name+5); + if (!r) { + if (iresult[4] == namespace->hier_sep) { + // The namespace already has a hierarchy separator + sprintf(result, "%s%s", namespace->prefix[NAMESPACE_USER], iresult+5); } - } - /* Shared namespace */ - else { - /* special case: LIST/LSUB "" % */ - if (!strncmp(name, namespace->prefix[NAMESPACE_SHARED], - strlen(namespace->prefix[NAMESPACE_SHARED])-1)) { - strcpy(result, name); - } - else { - strcpy(result, namespace->prefix[NAMESPACE_SHARED]); - strcat(result, name); - } + return 0; } - /* Translate any separators in mailboxname */ - mboxname_hiersep_toexternal(namespace, result, 0); + // The namespace already has a hierarchy separator + sprintf(result, "%s%s", namespace->prefix[NAMESPACE_SHARED], iresult); + return 0; }
View file
cyrus-imapd-2.5.tar.gz/sieve/bc_emit.c
Changed
@@ -512,7 +512,7 @@ if(testdist == -1)return -1; filelen +=testdist; - /*store the location for hte end of the test + /*store the location for the end of the test *this is important for short circuiting of allof/anyof*/ jumpto=filelen/4; if(lseek(fd, testEndLoc, SEEK_SET) == -1) @@ -881,7 +881,7 @@ dump(bc, 0); #endif - /*the sizeof(int) is to account for the version # at the begining*/ + /*the sizeof(int) is to account for the version # at the beginning*/ return bc_action_emit(fd, 0, bc->scriptend, bc, sizeof(int) + BYTECODE_MAGIC_LEN); }
View file
cyrus-imapd-2.5.tar.gz/sieve/bc_eval.c
Changed
@@ -360,10 +360,10 @@ switch(op) { - case BC_FALSE: + case BC_FALSE:/*0*/ res=0; i++; break; - case BC_TRUE: + case BC_TRUE:/*1*/ res=1; i++; break; case BC_NOT:/*2*/ @@ -468,7 +468,7 @@ const struct address *a; char *addr; - int headersi=address+i+5;/* the i value for the begining of the headers */ + int headersi=address+i+5;/* the i value for the beginning of the headers */ int datai=(ntohl(bc[headersi+1].value)/4); int numheaders=ntohl(bc[headersi].len); @@ -668,7 +668,7 @@ { const char** val; - int headersi=i+5;/*the i value for the begining of hte headers*/ + int headersi=i+5;/*the i value for the beginning of the headers*/ int datai=(ntohl(bc[headersi+1].value)/4); int numheaders=ntohl(bc[headersi].len); @@ -816,7 +816,7 @@ sieve_bodypart_t ** val; const char **content_types = NULL; - int typesi=i+6;/* the i value for the begining of the content-types */ + int typesi=i+6;/* the i value for the beginning of the content-types */ int datai=(ntohl(bc[typesi+1].value)/4); int numdata=ntohl(bc[datai].len); @@ -1305,17 +1305,17 @@ break; } - case B_MARK:/*8*/ + case B_MARK:/*7*/ res = do_mark(actions); ip++; break; - case B_UNMARK:/*9*/ + case B_UNMARK:/*8*/ res = do_unmark(actions); ip++; break; - case B_ADDFLAG:/*10*/ + case B_ADDFLAG:/*9*/ { int x; int list_len=ntohl(bc[ip+1].len); @@ -1333,7 +1333,7 @@ break; } - case B_SETFLAG: + case B_SETFLAG:/*10*/ { int x; int list_len=ntohl(bc[ip+1].len); @@ -1360,7 +1360,7 @@ break; } - case B_REMOVEFLAG: + case B_REMOVEFLAG:/*11*/ { int x; int list_len=ntohl(bc[ip+1].len); @@ -1378,7 +1378,7 @@ break; } - case B_NOTIFY: + case B_NOTIFY:/*12*/ { const char * id; const char * method; @@ -1428,7 +1428,7 @@ break; } - case B_DENOTIFY: + case B_DENOTIFY:/*13*/ { /* * i really have no idea what the count matchtype should do here. @@ -1511,8 +1511,8 @@ break; } - case B_VACATION_ORIG: - case B_VACATION: + case B_VACATION_ORIG:/*14*/ + case B_VACATION:/*21*/ { int respond; char *fromaddr = NULL; /* relative to message we send */
View file
cyrus-imapd.dsc
Changed
@@ -2,7 +2,7 @@ Source: cyrus-imapd Binary: cyrus-imapd Architecture: any -Version: 2.5~dev2014092501-0~kolab1 +Version: 2.5~dev2014100301-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.cyrusimap.org/
View file
debian.changelog
Changed
@@ -1,3 +1,10 @@ +cyrus-imapd (2.5~dev2014100301-0~kolab1) unstable; urgency=low + + * Ship a GIT development snapshot from git.cyrusimap.org + 44e8e7f7d0e16cc6005441709fc7c02e7032d6b3 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Fri, 3 Oct 2014 11:30:13 +0100 + cyrus-imapd (2.5~dev2014092501-0~kolab1) unstable; urgency=low * Ship a GIT development snapshot from git.cyrusimap.org
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
.