[Pkg-Cyrus-imapd-Debian-devel] [SVN] r154 - in trunk/cyrus-imapd-2.2.12/debian/patches: 00list
45-kolab2-annotations.dpatch
pkg-cyrus-imapd-debian-devel@lists.alioth.debian.org
pkg-cyrus-imapd-debian-devel@lists.alioth.debian.org
Wed, 29 Jun 2005 14:12:44 -0000
Author: sven
Date: Wed Jun 29 16:12:41 2005
New Revision: 154
URL: https://mail.incase.de/viewcvs?root=3Dcyrus22?view=3Drev&rev=3D154
Log:
Add kolab2 annotation patch as proposed by Christopher Sacca, make debian/p=
atches/00list use consistent patch naming
Added:
trunk/cyrus-imapd-2.2.12/debian/patches/45-kolab2-annotations.dpatch =
(with props)
Modified:
trunk/cyrus-imapd-2.2.12/debian/patches/00list
Modified: trunk/cyrus-imapd-2.2.12/debian/patches/00list
URL: https://mail.incase.de/viewcvs?root=3Dcyrus22/trunk/cyrus-imapd-2.2.12=
/debian/patches/00list?view=3Ddiff&rev=3D154&p1=3Dtrunk/cyrus-imapd-2.2.12/=
debian/patches/00list&r1=3D153&p2=3Dtrunk/cyrus-imapd-2.2.12/debian/patches=
/00list&r2=3D154
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/cyrus-imapd-2.2.12/debian/patches/00list (original)
+++ trunk/cyrus-imapd-2.2.12/debian/patches/00list Wed Jun 29 16:12:41 2005
@@ -1,7 +1,8 @@
20_drac_auth.dpatch
25_update_install-sh.dpatch
30_update_perlcalling.sh.dpatch
-35_masssievec_remove_unused_variable
+35_masssievec_remove_unused_variable.dpatch
40_rehash_fix_pathes.dpatch
+45-kolab2-annotations.dpatch
50-FTBFS-gcc-4.0-fix.dpatch
51-multiple_mupdate_err.h-fix.dpatch
Added: trunk/cyrus-imapd-2.2.12/debian/patches/45-kolab2-annotations.dpatch
URL: https://mail.incase.de/viewcvs?root=3Dcyrus22/trunk/cyrus-imapd-2.2.12=
/debian/patches/45-kolab2-annotations.dpatch?view=3Dauto&rev=3D154
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/cyrus-imapd-2.2.12/debian/patches/45-kolab2-annotations.dpatch (a=
dded)
+++ trunk/cyrus-imapd-2.2.12/debian/patches/45-kolab2-annotations.dpatch We=
d Jun 29 16:12:41 2005
@@ -1,0 +1,125 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 45-kolab2-annotations.dpatch by Sven Mueller <debian@incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cyrus22-imapd-2.2.12/imap/annotate.c /tmp/dpep.djRMoj/cyrus22-=
imapd-2.2.12/imap/annotate.c
+--- cyrus22-imapd-2.2.12/imap/annotate.c 2005-03-12 23:09:22.000000000 +01=
00
++++ /tmp/dpep.djRMoj/cyrus22-imapd-2.2.12/imap/annotate.c 2005-06-29 16:09=
:13.359785195 +0200
+@@ -1606,6 +1606,11 @@
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+ };
+ =
++const struct annotate_st_entry vendor_entry =3D
++ { NULL, ATTRIB_TYPE_STRING, BACKEND_ONLY,
++ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV,
++ ACL_ADMIN, annotation_set_todb, NULL };
++
+ int annotatemore_store(char *mailbox,
+ struct entryattlist *l,
+ struct namespace *namespace,
+@@ -1618,6 +1623,7 @@
+ struct attvaluelist *av;
+ struct storedata sdata;
+ const struct annotate_st_entry *entries;
++ struct annotate_st_entry * working_entry;
+ time_t now =3D time(0);
+ =
+ memset(&sdata, 0, sizeof(struct storedata));
+@@ -1639,37 +1645,55 @@
+ while (e) {
+ int entrycount, attribs;
+ struct annotate_st_entry_list *nentry =3D NULL;
++ struct annotate_st_entry *ientry =3D NULL;
+ =
+ /* See if we support this entry */
++ working_entry =3D NULL;
+ for (entrycount =3D 0;
+ entries[entrycount].name;
+ entrycount++) {
+ if (!strcmp(e->entry, entries[entrycount].name)) {
++ working_entry =3D &(entries[entrycount]);
+ break;
+ }
+ }
+- if (!entries[entrycount].name) {
+- /* unknown annotation */
+- return IMAP_PERMISSION_DENIED;
++ if (working_entry=3D=3DNULL) {
++ /* test for generic vendor annotation */
++ if ((strncmp("/vendor/", e->entry, strlen("/vendor/"))=3D=3D0) &&
++ (strlen(e->entry)>strlen("/vendor/"))) {
++ working_entry =3D &(vendor_entry);
++ }
++ else {
++ /* unknown annotation */
++ return IMAP_PERMISSION_DENIED;
++ }
+ }
+ =
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+- if (entries[entrycount].proxytype =3D=3D PROXY_AND_BACKEND
++ if (working_entry->proxytype =3D=3D PROXY_AND_BACKEND
+ || (proxy_store_func &&
+- entries[entrycount].proxytype =3D=3D PROXY_ONLY)
++ working_entry->proxytype =3D=3D PROXY_ONLY)
+ || (!proxy_store_func &&
+- entries[entrycount].proxytype =3D=3D BACKEND_ONLY)) {
++ working_entry->proxytype =3D=3D BACKEND_ONLY)) {
++ ientry =3D xzmalloc(sizeof(struct annotate_st_entry));
++ ientry->name =3D e->entry;
++ ientry->type =3D working_entry->type;
++ ientry->proxytype =3D working_entry->proxytype;
++ ientry->attribs =3D working_entry->attribs;
++ ientry->acl =3D working_entry->acl;
++ ientry->set =3D working_entry->set;
++ ientry->rock =3D working_entry->rock; =
+ nentry =3D xzmalloc(sizeof(struct annotate_st_entry_list));
+ nentry->next =3D sdata.entry_list;
+- nentry->entry =3D &(entries[entrycount]);
++ nentry->entry =3D ientry;
+ nentry->shared.modifiedsince =3D now;
+ nentry->priv.modifiedsince =3D now;
+ sdata.entry_list =3D nentry;
+ }
+ =
+ /* See if we are allowed to set the given attributes. */
+- attribs =3D entries[entrycount].attribs;
++ attribs =3D working_entry->attribs;
+ av =3D e->attvalues;
+ while (av) {
+ const char *value;
+@@ -1679,7 +1703,7 @@
+ goto cleanup;
+ }
+ value =3D annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r =3D IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1705,7 +1729,7 @@
+ goto cleanup;
+ }
+ value =3D annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r =3D IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1807,6 +1831,12 @@
+ /* Free the entry list */
+ while (sdata.entry_list) {
+ struct annotate_st_entry_list *freeme =3D sdata.entry_list;
++ if (freeme !=3D NULL){
++ struct annotate_st_entry *freeme2 =3D freeme->entry;
++ if (freeme2 !=3D NULL) {
++ free( freeme2 );
++ }
++ }
+ sdata.entry_list =3D sdata.entry_list->next;
+ free(freeme);
+ }
Propchange: trunk/cyrus-imapd-2.2.12/debian/patches/45-kolab2-annotations.d=
patch
---------------------------------------------------------------------------=
---
svn:executable =3D *