- fix building with samba 4.12 auto/th/openchange-2.3-49
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 8 Apr 2020 08:02:13 +0000 (10:02 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 8 Apr 2020 08:02:13 +0000 (10:02 +0200)
- rel 49

openchange.spec
samba-4.12.patch [new file with mode: 0644]

index 6497d6dd004b284b951e37e50d4c80a026a20e64..1b55f9f86025a5002c013caa12c19324226093d4 100644 (file)
@@ -12,7 +12,7 @@ Summary:      OpenChange - portable implementation of MS Exchange Server and Exchange
 Summary(pl.UTF-8):     OpenChange - przenośna implementacja serwera oraz protokołów MS Exchange
 Name:          openchange
 Version:       2.3
-Release:       48
+Release:       49
 License:       GPL v3+
 Group:         Libraries
 #Source0Download: https://github.com/openchange/openchange/releases
@@ -28,6 +28,7 @@ Patch6:               %{name}-covscan.patch
 Patch7:                %{name}-samba-4.10-macros.patch
 Patch8:                %{name}-libical.patch
 Patch9:                samba-4.11.patch
+Patch10:       samba-4.12.patch
 URL:           https://github.com/openchange
 BuildRequires: QtCore-devel >= 4.3.0
 BuildRequires: QtGui-devel >= 4.3.0
@@ -223,6 +224,7 @@ Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 # no switch for verbose mode, enable manually :/
 %{__sed} -i -e 's/^    @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
diff --git a/samba-4.12.patch b/samba-4.12.patch
new file mode 100644 (file)
index 0000000..c4d1251
--- /dev/null
@@ -0,0 +1,85 @@
+diff -up openchange-openchange-2.3-VULCAN/libmapiadmin/libmapiadmin.h.samba-4.12 openchange-openchange-2.3-VULCAN/libmapiadmin/libmapiadmin.h
+--- openchange-openchange-2.3-VULCAN/libmapiadmin/libmapiadmin.h.samba-4.12    2020-01-27 11:33:02.941846935 +0100
++++ openchange-openchange-2.3-VULCAN/libmapiadmin/libmapiadmin.h       2020-01-27 11:33:19.170846710 +0100
+@@ -103,7 +103,9 @@ __BEGIN_DECLS
+ struct ldb_dn *samdb_search_dn(struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, const char *, ...) _PRINTF_ATTRIBUTE(4,5);
+ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *, const struct dom_sid *, uint32_t);
+ bool encode_pw_buffer(uint8_t buffer[516], const char *, int);
++#if 0 /* removed in samba 4.12 */
+ void arcfour_crypt_blob(uint8_t *, int, const DATA_BLOB *);
++#endif
+ /* The following public definitions come from libmapiadmin/mapiadmin.c */
+ struct mapiadmin_ctx *mapiadmin_init(struct mapi_session *);
+diff -up openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c.samba-4.12 openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c
+--- openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c.samba-4.12  2020-01-27 11:25:31.398853179 +0100
++++ openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c     2020-01-27 11:31:27.490848255 +0100
+@@ -592,6 +592,9 @@ _PUBLIC_ enum MAPISTATUS mapiadmin_user_
+  */
+ _PUBLIC_ enum MAPISTATUS mapiadmin_user_add(struct mapiadmin_ctx *mapiadmin_ctx)
+ {
++      OC_DEBUG(3, "mapiadmin_user_add(): is disabled");
++      return MAPI_E_UNABLE_TO_COMPLETE;
++#if 0 /* disable it, use samba function directly, if needed (no 'arcfour_crypt_blob' in samba 4.12) */
+       TALLOC_CTX                      *mem_ctx;
+       NTSTATUS                        status;
+       enum MAPISTATUS                 retval;
+@@ -732,6 +735,7 @@ again:
+       talloc_free(mem_ctx);
+       return MAPI_E_SUCCESS;
++#endif
+ }
+ /**
+diff -up openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.12 openchange-openchange-2.3-VULCAN/ndr_mapi.c
+--- openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.12     2020-01-27 11:04:07.136870938 +0100
++++ openchange-openchange-2.3-VULCAN/ndr_mapi.c        2020-01-27 11:12:29.978863985 +0100
+@@ -2151,7 +2151,11 @@ enum ndr_err_code ndr_push_RestrictionVa
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+               if (ndr_flags & NDR_SCALARS) {
+-                      int level = ndr_push_get_switch_value(ndr, r);
++                      uint32_t level = 0;
++
++                      if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_steal_switch_value(ndr, r, &level)))
++                              level = 0;
++
+                       switch (level) {
+                               case 0x0: {
+                                       break; }
+@@ -2165,7 +2169,9 @@ enum ndr_err_code ndr_push_RestrictionVa
+                       }
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+-                      int level = ndr_push_get_switch_value(ndr, r);
++                      uint32_t level;
++                      if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_steal_switch_value(ndr, r, &level)))
++                              level = 0;
+                       switch (level) {
+                               case 0x0:
+                               break;
+@@ -2187,9 +2193,10 @@ enum ndr_err_code ndr_push_RestrictionVa
+ enum ndr_err_code  ndr_pull_RestrictionVariable(struct ndr_pull *ndr, int ndr_flags, union RestrictionVariable *r)
+ {
+-      int level;
++      uint32_t level;
+       TALLOC_CTX *_mem_save_res_0;
+-      level = ndr_pull_get_switch_value(ndr, r);
++      if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_steal_switch_value(ndr, r, &level)))
++              level = 0;
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+@@ -2237,8 +2244,8 @@ enum ndr_err_code  ndr_pull_RestrictionV
+ _PUBLIC_ void ndr_print_RestrictionVariable(struct ndr_print *ndr, const char *name, const union RestrictionVariable *r)
+ {
+-      int level;
+-      level = ndr_print_get_switch_value(ndr, r);
++      uint32_t level;
++      level = ndr_print_steal_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "RestrictionVariable");
+       switch (level) {
+               case 0x0:
This page took 0.075192 seconds and 4 git commands to generate.