Compare commits
7 Commits
imports/c8
...
c8
Author | SHA1 | Date | |
---|---|---|---|
f237673e97 | |||
|
91ef4d4f54 | ||
|
c14bddebd4 | ||
|
bacc772395 | ||
|
b5f8f68dc9 | ||
|
f73a09f728 | ||
|
4fbb5ac1e4 |
@ -1 +0,0 @@
|
||||
901e6d8fa4f9f4a1d41c3ad97d967da316d0ad17 SOURCES/openchange-2.3-VULCAN.tar.gz
|
159
SOURCES/openchange-2.3-samba-4.10-macros.patch
Normal file
159
SOURCES/openchange-2.3-samba-4.10-macros.patch
Normal file
@ -0,0 +1,159 @@
|
||||
diff -up openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c
|
||||
--- openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c.samba-4.10-macros 2019-02-14 15:19:53.317769411 +0100
|
||||
+++ openchange-openchange-2.3-VULCAN/libmapiadmin/mapiadmin_user.c 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
+#include "libmapi/libmapi_private.h"
|
||||
+
|
||||
static ssize_t openchange_sys_read(int fd, void *buf, size_t count)
|
||||
{
|
||||
ssize_t ret;
|
||||
@@ -101,7 +103,7 @@ static enum ndr_err_code openchange_ndr_
|
||||
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sid_rev_num));
|
||||
NDR_CHECK(ndr_push_int8(ndr, NDR_SCALARS, r->num_auths));
|
||||
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
|
||||
- if (r->num_auths < 0 || r->num_auths > ARRAY_SIZE(r->sub_auths)) {
|
||||
+ if (r->num_auths < 0 || r->num_auths > OC_ARRAY_SIZE(r->sub_auths)) {
|
||||
return ndr_push_error(ndr, NDR_ERR_RANGE, "value out of range");
|
||||
}
|
||||
for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) {
|
||||
@@ -659,7 +661,7 @@ again:
|
||||
|
||||
OC_DEBUG(3, "Setting account password '%s'", mapiadmin_ctx->password);
|
||||
|
||||
- ZERO_STRUCT(u);
|
||||
+ OC_ZERO_STRUCT(u);
|
||||
s.in.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
|
||||
s.in.info = &u;
|
||||
s.in.level = 24;
|
||||
@@ -687,7 +689,7 @@ again:
|
||||
}
|
||||
}
|
||||
|
||||
- ZERO_STRUCT(u);
|
||||
+ OC_ZERO_STRUCT(u);
|
||||
s.in.user_handle = &mapiadmin_ctx->user_ctx->user_handle;
|
||||
s.in.info = &u;
|
||||
s.in.level = 21;
|
||||
diff -up openchange-openchange-2.3-VULCAN/libmapi/libmapi_private.h.samba-4.10-macros openchange-openchange-2.3-VULCAN/libmapi/libmapi_private.h
|
||||
--- openchange-openchange-2.3-VULCAN/libmapi/libmapi_private.h.samba-4.10-macros 2019-02-14 15:19:53.313769411 +0100
|
||||
+++ openchange-openchange-2.3-VULCAN/libmapi/libmapi_private.h 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -141,6 +141,11 @@ const char *libmapi_iface_best_ip(struc
|
||||
bool libmapi_iface_is_local(struct interface *, const char *);
|
||||
bool libmapi_iface_same_net(const char *, const char *, const char *);
|
||||
|
||||
+#define OC_ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
|
||||
+#define OC_ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
|
||||
+#define OC_ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
|
||||
+#define OC_ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
+
|
||||
__END_DECLS
|
||||
|
||||
#undef _PRINTF_ATTRIBUTE
|
||||
diff -up openchange-openchange-2.3-VULCAN/libmapi/socket/interface.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/libmapi/socket/interface.c
|
||||
--- openchange-openchange-2.3-VULCAN/libmapi/socket/interface.c.samba-4.10-macros 2019-02-14 15:19:53.318769411 +0100
|
||||
+++ openchange-openchange-2.3-VULCAN/libmapi/socket/interface.c 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -70,7 +70,7 @@ static void add_interface(TALLOC_CTX *me
|
||||
if (iface == NULL)
|
||||
return;
|
||||
|
||||
- ZERO_STRUCTPN(iface);
|
||||
+ OC_ZERO_STRUCTPN(iface);
|
||||
|
||||
iface->ip = ip;
|
||||
iface->nmask = nmask;
|
||||
diff -up openchange-openchange-2.3-VULCAN/mapiproxy/dcesrv_mapiproxy.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/mapiproxy/dcesrv_mapiproxy.c
|
||||
--- openchange-openchange-2.3-VULCAN/mapiproxy/dcesrv_mapiproxy.c.samba-4.10-macros 2015-05-16 17:22:04.000000000 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/mapiproxy/dcesrv_mapiproxy.c 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -703,7 +703,7 @@ NTSTATUS dcerpc_server_mapiproxy_init(vo
|
||||
NTSTATUS ret;
|
||||
struct dcesrv_endpoint_server ep_server;
|
||||
|
||||
- ZERO_STRUCT(ep_server);
|
||||
+ OC_ZERO_STRUCT(ep_server);
|
||||
|
||||
/* Fill in our name */
|
||||
ep_server.name = "mapiproxy";
|
||||
diff -up openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/ndr_mapi.c
|
||||
--- openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.10-macros 2019-02-14 15:19:53.329769410 +0100
|
||||
+++ openchange-openchange-2.3-VULCAN/ndr_mapi.c 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -921,7 +921,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
TALLOC_CTX *_mem_save_length_0;
|
||||
|
||||
if (flags & NDR_IN) {
|
||||
- ZERO_STRUCT(r->out);
|
||||
+ OC_ZERO_STRUCT(r->out);
|
||||
|
||||
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
|
||||
NDR_PULL_ALLOC(ndr, r->in.handle);
|
||||
@@ -961,7 +961,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
NDR_PULL_ALLOC(ndr, r->out.handle);
|
||||
*r->out.handle = *r->in.handle;
|
||||
NDR_PULL_ALLOC(ndr, r->out.mapi_response);
|
||||
- ZERO_STRUCTP(r->out.mapi_response);
|
||||
+ OC_ZERO_STRUCTP(r->out.mapi_response);
|
||||
NDR_PULL_ALLOC(ndr, r->out.length);
|
||||
*r->out.length = *r->in.length;
|
||||
}
|
||||
@@ -1235,7 +1235,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
TALLOC_CTX *_mem_save_rgbAuxOut_1;
|
||||
|
||||
if (flags & NDR_IN) {
|
||||
- ZERO_STRUCT(r->out);
|
||||
+ OC_ZERO_STRUCT(r->out);
|
||||
|
||||
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.szUserDN));
|
||||
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.szUserDN));
|
||||
@@ -1294,19 +1294,19 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
}
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbAuxOut_0, LIBNDR_FLAG_REF_ALLOC);
|
||||
NDR_PULL_ALLOC(ndr, r->out.handle);
|
||||
- ZERO_STRUCTP(r->out.handle);
|
||||
+ OC_ZERO_STRUCTP(r->out.handle);
|
||||
NDR_PULL_ALLOC(ndr, r->out.pcmsPollsMax);
|
||||
- ZERO_STRUCTP(r->out.pcmsPollsMax);
|
||||
+ OC_ZERO_STRUCTP(r->out.pcmsPollsMax);
|
||||
NDR_PULL_ALLOC(ndr, r->out.pcRetry);
|
||||
- ZERO_STRUCTP(r->out.pcRetry);
|
||||
+ OC_ZERO_STRUCTP(r->out.pcRetry);
|
||||
NDR_PULL_ALLOC(ndr, r->out.pcmsRetryDelay);
|
||||
- ZERO_STRUCTP(r->out.pcmsRetryDelay);
|
||||
+ OC_ZERO_STRUCTP(r->out.pcmsRetryDelay);
|
||||
NDR_PULL_ALLOC(ndr, r->out.picxr);
|
||||
- ZERO_STRUCTP(r->out.picxr);
|
||||
+ OC_ZERO_STRUCTP(r->out.picxr);
|
||||
NDR_PULL_ALLOC(ndr, r->out.szDNPrefix);
|
||||
- ZERO_STRUCTP(r->out.szDNPrefix);
|
||||
+ OC_ZERO_STRUCTP(r->out.szDNPrefix);
|
||||
NDR_PULL_ALLOC(ndr, r->out.szDisplayName);
|
||||
- ZERO_STRUCTP(r->out.szDisplayName);
|
||||
+ OC_ZERO_STRUCTP(r->out.szDisplayName);
|
||||
NDR_PULL_ALLOC(ndr, r->out.pulTimeStamp);
|
||||
*r->out.pulTimeStamp = *r->in.pulTimeStamp;
|
||||
NDR_PULL_ALLOC(ndr, r->out.pcbAuxOut);
|
||||
diff -up openchange-openchange-2.3-VULCAN/testsuite/libmapi/mapi_property.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/testsuite/libmapi/mapi_property.c
|
||||
--- openchange-openchange-2.3-VULCAN/testsuite/libmapi/mapi_property.c.samba-4.10-macros 2015-05-16 17:22:04.000000000 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/testsuite/libmapi/mapi_property.c 2019-02-14 15:19:53.331769410 +0100
|
||||
@@ -280,7 +280,7 @@ static void _make_test_srow(TALLOC_CTX *
|
||||
{
|
||||
struct SPropValue prop_val;
|
||||
|
||||
- ZERO_STRUCT(prop_val);
|
||||
+ OC_ZERO_STRUCT(prop_val);
|
||||
/* PT_I8 */
|
||||
prop_val.ulPropTag = PR_FID;
|
||||
prop_val.value.d = 0x0123456789ABCDEFul;
|
||||
diff -up openchange-openchange-2.3-VULCAN/testsuite/libmapiproxy/openchangedb_logger.c.samba-4.10-macros openchange-openchange-2.3-VULCAN/testsuite/libmapiproxy/openchangedb_logger.c
|
||||
--- openchange-openchange-2.3-VULCAN/testsuite/libmapiproxy/openchangedb_logger.c.samba-4.10-macros 2015-05-16 17:22:04.000000000 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/testsuite/libmapiproxy/openchangedb_logger.c 2019-02-14 15:19:53.332769410 +0100
|
||||
@@ -638,7 +638,7 @@ static void ocdb_logger_setup(void)
|
||||
ck_abort();
|
||||
}
|
||||
|
||||
- ZERO_STRUCT(functions_called);
|
||||
+ OC_ZERO_STRUCT(functions_called);
|
||||
}
|
||||
|
||||
static void ocdb_logger_teardown(void)
|
34
SOURCES/openchange-2.3-samba-4.11.2.patch
Normal file
34
SOURCES/openchange-2.3-samba-4.11.2.patch
Normal file
@ -0,0 +1,34 @@
|
||||
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
|
||||
}
|
||||
|
||||
/**
|
41
SOURCES/openchange-2.3-samba-4.11.patch
Normal file
41
SOURCES/openchange-2.3-samba-4.11.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff -up openchange-openchange-2.3-VULCAN/exchange.idl.samba-4.11 openchange-openchange-2.3-VULCAN/exchange.idl
|
||||
--- openchange-openchange-2.3-VULCAN/exchange.idl.samba-4.11 2015-05-16 17:22:04.000000000 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/exchange.idl 2019-08-30 07:23:02.172309353 +0200
|
||||
@@ -465,12 +465,12 @@ System Attendant Private Interface
|
||||
would otherwise break the data alignment on wire operations.
|
||||
However, they must be defined here as they make use of the same array types. */
|
||||
|
||||
- typedef [nopush,nopull,noprint] struct {
|
||||
+ typedef [public] struct {
|
||||
[range(0,100000)] uint32 cValues;
|
||||
[size_is(cValues)] hyper *lpui8;
|
||||
} UI8Array_r;
|
||||
|
||||
- typedef [switch_type(uint32),nopush,nopull,noprint] union {
|
||||
+ typedef [switch_type(uint32)] union {
|
||||
[case(PT_I2)] uint16 i;
|
||||
[case(PT_LONG)] uint32 l;
|
||||
[case(PT_DOUBLE)] double dbl;
|
||||
@@ -495,19 +495,19 @@ System Attendant Private Interface
|
||||
[case(PT_OBJECT)] uint32 object;
|
||||
} SPropValue_CTR;
|
||||
|
||||
- typedef [public,noprint,nopush,nopull] struct {
|
||||
+ typedef [public] struct {
|
||||
MAPITAGS ulPropTag;
|
||||
uint32 dwAlignPad;
|
||||
[switch_is(ulPropTag & 0xFFFF)] SPropValue_CTR value;
|
||||
} SPropValue;
|
||||
|
||||
- typedef [public,noprint,nopush,nopull] struct {
|
||||
+ typedef [public] struct {
|
||||
uint32 ulAdrEntryPad;
|
||||
[range(0,100000)] uint32 cValues;
|
||||
[size_is(cValues)]SPropValue *lpProps;
|
||||
} SRow;
|
||||
|
||||
- typedef [public,noprint,nopush,nopull] struct {
|
||||
+ typedef [public] struct {
|
||||
[range(0,100000)] uint32 cRows;
|
||||
[size_is(cRows)] SRow aRow[];
|
||||
} SRowSet;
|
51
SOURCES/openchange-2.3-samba-4.12.patch
Normal file
51
SOURCES/openchange-2.3-samba-4.12.patch
Normal file
@ -0,0 +1,51 @@
|
||||
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:
|
40
SOURCES/openchange-2.3-samba-4.13.patch
Normal file
40
SOURCES/openchange-2.3-samba-4.13.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff -up openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c.samba-4.13 openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c
|
||||
--- openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c.samba-4.13 2020-11-13 13:37:00.953428673 +0100
|
||||
+++ openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c 2020-11-13 13:38:36.541453531 +0100
|
||||
@@ -753,7 +753,7 @@ _PUBLIC_ enum MAPISTATUS OpenProfile(str
|
||||
_PUBLIC_ enum MAPISTATUS LoadProfile(struct mapi_context *mapi_ctx,
|
||||
struct mapi_profile *profile)
|
||||
{
|
||||
- enum credentials_use_kerberos use_krb = CRED_AUTO_USE_KERBEROS;
|
||||
+ enum credentials_use_kerberos use_krb = CRED_USE_KERBEROS_DESIRED;
|
||||
|
||||
/* Sanity checks */
|
||||
OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
|
||||
@@ -777,9 +777,9 @@ _PUBLIC_ enum MAPISTATUS LoadProfile(str
|
||||
* another API in the profile */
|
||||
if (profile->kerberos) {
|
||||
if (!strncmp(profile->kerberos, "yes", 3)) {
|
||||
- use_krb = CRED_MUST_USE_KERBEROS;
|
||||
+ use_krb = CRED_USE_KERBEROS_REQUIRED;
|
||||
} else {
|
||||
- use_krb = CRED_DONT_USE_KERBEROS;
|
||||
+ use_krb = CRED_USE_KERBEROS_DISABLED;
|
||||
}
|
||||
}
|
||||
/* additionally, don't set the username in the ccache if kerberos
|
||||
@@ -787,13 +787,13 @@ _PUBLIC_ enum MAPISTATUS LoadProfile(str
|
||||
* credentials. cli_credentials_guess probably gets the right
|
||||
* thing anyway in the situations where kerberos is in use */
|
||||
if (profile->username && *(profile->username)
|
||||
- && use_krb != CRED_MUST_USE_KERBEROS) {
|
||||
+ && use_krb != CRED_USE_KERBEROS_REQUIRED) {
|
||||
cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
|
||||
}
|
||||
if (profile->password && *(profile->password)) {
|
||||
cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
|
||||
}
|
||||
- if (use_krb != CRED_AUTO_USE_KERBEROS) {
|
||||
+ if (use_krb != CRED_USE_KERBEROS_DESIRED) {
|
||||
cli_credentials_set_kerberos_state(profile->credentials, use_krb);
|
||||
}
|
||||
|
103
SOURCES/openchange-2.3-samba-4.15.patch
Normal file
103
SOURCES/openchange-2.3-samba-4.15.patch
Normal file
@ -0,0 +1,103 @@
|
||||
diff -up openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c.samba-4.15 openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c
|
||||
--- openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c.samba-4.15 2021-07-19 12:26:37.615770488 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/libmapi/IProfAdmin.c 2021-07-19 12:26:39.640771957 +0200
|
||||
@@ -794,7 +794,7 @@ _PUBLIC_ enum MAPISTATUS LoadProfile(str
|
||||
cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
|
||||
}
|
||||
if (use_krb != CRED_USE_KERBEROS_DESIRED) {
|
||||
- cli_credentials_set_kerberos_state(profile->credentials, use_krb);
|
||||
+ cli_credentials_set_kerberos_state(profile->credentials, use_krb, CRED_SPECIFIED);
|
||||
}
|
||||
|
||||
return MAPI_E_SUCCESS;
|
||||
diff -up openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.15 openchange-openchange-2.3-VULCAN/ndr_mapi.c
|
||||
--- openchange-openchange-2.3-VULCAN/ndr_mapi.c.samba-4.15 2021-07-19 12:59:29.801210983 +0200
|
||||
+++ openchange-openchange-2.3-VULCAN/ndr_mapi.c 2021-07-19 13:07:49.382594567 +0200
|
||||
@@ -1235,15 +1235,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
TALLOC_CTX *_mem_save_rgbAuxOut_1;
|
||||
|
||||
if (flags & NDR_IN) {
|
||||
+ uint32_t array_length = 0, array_size = 0;
|
||||
OC_ZERO_STRUCT(r->out);
|
||||
|
||||
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.szUserDN));
|
||||
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.szUserDN));
|
||||
- if (ndr_get_array_length(ndr, &r->in.szUserDN) > ndr_get_array_size(ndr, &r->in.szUserDN)) {
|
||||
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.szUserDN), ndr_get_array_length(ndr, &r->in.szUserDN));
|
||||
+ NDR_CHECK(ndr_get_array_length(ndr, &r->in.szUserDN, &array_length));
|
||||
+ NDR_CHECK(ndr_get_array_size(ndr, &r->in.szUserDN, &array_size));
|
||||
+ if (array_length > array_size) {
|
||||
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", array_size, array_length);
|
||||
}
|
||||
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.szUserDN), sizeof(uint8_t)));
|
||||
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.szUserDN, ndr_get_array_length(ndr, &r->in.szUserDN), sizeof(uint8_t), CH_DOS));
|
||||
+ NDR_CHECK(ndr_check_string_terminator(ndr, array_length, sizeof(uint8_t)));
|
||||
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.szUserDN, array_length, sizeof(uint8_t), CH_DOS));
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulFlags));
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ulConMod));
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbLimit));
|
||||
@@ -1317,6 +1320,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
}
|
||||
|
||||
if (flags & NDR_OUT) {
|
||||
+ uint32_t array_length = 0, array_size = 0;
|
||||
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
|
||||
NDR_PULL_ALLOC(ndr, r->out.handle);
|
||||
}
|
||||
@@ -1366,11 +1370,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
NDR_PULL_SET_MEM_CTX(ndr, *r->out.szDNPrefix, 0);
|
||||
NDR_CHECK(ndr_pull_array_size(ndr, r->out.szDNPrefix));
|
||||
NDR_CHECK(ndr_pull_array_length(ndr, r->out.szDNPrefix));
|
||||
- if (ndr_get_array_length(ndr, r->out.szDNPrefix) > ndr_get_array_size(ndr, r->out.szDNPrefix)) {
|
||||
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.szDNPrefix), ndr_get_array_length(ndr, r->out.szDNPrefix));
|
||||
+ NDR_CHECK(ndr_get_array_length(ndr, r->out.szDNPrefix, &array_length));
|
||||
+ NDR_CHECK(ndr_get_array_size(ndr, r->out.szDNPrefix, &array_size));
|
||||
+ if (array_length > array_size) {
|
||||
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", array_size, array_length);
|
||||
}
|
||||
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.szDNPrefix), sizeof(uint8_t)));
|
||||
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDNPrefix, ndr_get_array_length(ndr, r->out.szDNPrefix), sizeof(uint8_t), CH_DOS));
|
||||
+ NDR_CHECK(ndr_check_string_terminator(ndr, array_length, sizeof(uint8_t)));
|
||||
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDNPrefix, array_length, sizeof(uint8_t), CH_DOS));
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDNPrefix_1, 0);
|
||||
}
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDNPrefix_0, LIBNDR_FLAG_REF_ALLOC);
|
||||
@@ -1391,11 +1397,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
NDR_PULL_SET_MEM_CTX(ndr, *r->out.szDisplayName, 0);
|
||||
NDR_CHECK(ndr_pull_array_size(ndr, r->out.szDisplayName));
|
||||
NDR_CHECK(ndr_pull_array_length(ndr, r->out.szDisplayName));
|
||||
- if (ndr_get_array_length(ndr, r->out.szDisplayName) > ndr_get_array_size(ndr, r->out.szDisplayName)) {
|
||||
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.szDisplayName), ndr_get_array_length(ndr, r->out.szDisplayName));
|
||||
+ NDR_CHECK(ndr_get_array_length(ndr, r->out.szDisplayName, &array_length));
|
||||
+ NDR_CHECK(ndr_get_array_size(ndr, r->out.szDisplayName, &array_size));
|
||||
+ if (array_length > array_size) {
|
||||
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", array_size, array_length);
|
||||
}
|
||||
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.szDisplayName), sizeof(uint8_t)));
|
||||
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDisplayName, ndr_get_array_length(ndr, r->out.szDisplayName), sizeof(uint8_t), CH_DOS));
|
||||
+ NDR_CHECK(ndr_check_string_terminator(ndr, array_length, sizeof(uint8_t)));
|
||||
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.szDisplayName, array_length, sizeof(uint8_t), CH_DOS));
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDisplayName_1, 0);
|
||||
}
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szDisplayName_0, LIBNDR_FLAG_REF_ALLOC);
|
||||
@@ -1415,14 +1423,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
|
||||
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pulTimeStamp_0, LIBNDR_FLAG_REF_ALLOC);
|
||||
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.rgbAuxOut));
|
||||
NDR_CHECK(ndr_pull_array_length(ndr, &r->out.rgbAuxOut));
|
||||
- if (ndr_get_array_length(ndr, &r->out.rgbAuxOut) > ndr_get_array_size(ndr, &r->out.rgbAuxOut)) {
|
||||
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.rgbAuxOut), ndr_get_array_length(ndr, &r->out.rgbAuxOut));
|
||||
+ NDR_CHECK(ndr_get_array_length(ndr, &r->out.rgbAuxOut, &array_length));
|
||||
+ NDR_CHECK(ndr_get_array_size(ndr, &r->out.rgbAuxOut, &array_size));
|
||||
+ if (array_length > array_size) {
|
||||
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", array_size, array_length);
|
||||
}
|
||||
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
|
||||
- NDR_PULL_ALLOC_N(ndr, r->out.rgbAuxOut, ndr_get_array_size(ndr, &r->out.rgbAuxOut));
|
||||
+ NDR_PULL_ALLOC_N(ndr, r->out.rgbAuxOut, array_size);
|
||||
}
|
||||
/* Only try to pull rgbAuxOut if the fake array size is > 0 */
|
||||
- if (ndr_get_array_size(ndr, &r->out.rgbAuxOut)) {
|
||||
+ if (array_size) {
|
||||
_mem_save_rgbAuxOut_1 = NDR_PULL_GET_MEM_CTX(ndr);
|
||||
NDR_PULL_SET_MEM_CTX(ndr, r->out.rgbAuxOut, 0);
|
||||
NDR_CHECK(ndr_pull_mapi2k7_AuxInfo(ndr, NDR_SCALARS, r->out.rgbAuxOut));
|
@ -23,7 +23,7 @@
|
||||
|
||||
Name: openchange
|
||||
Version: 2.3
|
||||
Release: 23%{?dist}
|
||||
Release: 32%{?dist}
|
||||
Group: Applications/System
|
||||
Summary: Provides access to Microsoft Exchange servers using native protocols
|
||||
License: GPLv3+ and Public Domain
|
||||
@ -90,6 +90,12 @@ Patch12: openchange-2.3-switch-to-python3.patch
|
||||
Patch13: openchange-2.3-disable-python3.patch
|
||||
%endif
|
||||
Patch14: openchange-2.3-covscan.patch
|
||||
Patch15: openchange-2.3-samba-4.10-macros.patch
|
||||
Patch16: openchange-2.3-samba-4.11.patch
|
||||
Patch17: openchange-2.3-samba-4.11.2.patch
|
||||
Patch18: openchange-2.3-samba-4.12.patch
|
||||
Patch19: openchange-2.3-samba-4.13.patch
|
||||
Patch20: openchange-2.3-samba-4.15.patch
|
||||
|
||||
%description
|
||||
OpenChange provides libraries to access Microsoft Exchange servers
|
||||
@ -166,6 +172,12 @@ This package provides the server elements for OpenChange.
|
||||
%patch13 -p1 -b .disable-python3
|
||||
%endif
|
||||
%patch14 -p1 -b .covscan
|
||||
%patch15 -p1 -b .samba-4.10-macros
|
||||
%patch16 -p1 -b .samba-4.11
|
||||
%patch17 -p1 -b .samba-4.11.2
|
||||
%patch18 -p1 -b .samba-4.12
|
||||
%patch19 -p1 -b .samba-4.13
|
||||
%patch20 -p1 -b .samba-4.15
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
@ -208,7 +220,7 @@ cp -r doc/man/man1 $RPM_BUILD_ROOT%{_mandir}
|
||||
rm -r apidocs/man/man3
|
||||
|
||||
#%if ! %{build_python_package}
|
||||
#rm -r $RPM_BUILD_ROOT%{python_sitearch}/openchange
|
||||
#rm -r $RPM_BUILD_ROOT%{python3_sitearch}/openchange
|
||||
#%endif
|
||||
|
||||
%if ! %{build_server_package}
|
||||
@ -262,14 +274,20 @@ cp -r apidocs/html/libmapi++/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchan
|
||||
|
||||
%files
|
||||
%doc COPYING IDL_LICENSE.txt VERSION
|
||||
%{_libdir}/libmapi-openchange.so.*
|
||||
%{_libdir}/libmapiadmin.so.*
|
||||
%{_libdir}/libmapipp.so.*
|
||||
%{_libdir}/libmapi-openchange.so.0
|
||||
%{_libdir}/libmapi-openchange.so.2.3
|
||||
%{_libdir}/libmapiadmin.so.0
|
||||
%{_libdir}/libmapiadmin.so.2.3
|
||||
%{_libdir}/libmapipp.so.0
|
||||
%{_libdir}/libmapipp.so.2.3
|
||||
%if %{build_server_package}
|
||||
%{_libdir}/libmapiproxy.so.*
|
||||
%{_libdir}/libmapistore.so.*
|
||||
%{_libdir}/libmapiproxy.so.0
|
||||
%{_libdir}/libmapiproxy.so.2.3
|
||||
%{_libdir}/libmapistore.so.0
|
||||
%{_libdir}/libmapistore.so.2.3
|
||||
%endif
|
||||
%{_libdir}/libocpf.so.*
|
||||
%{_libdir}/libocpf.so.0
|
||||
%{_libdir}/libocpf.so.2.3
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
@ -293,7 +311,7 @@ cp -r apidocs/html/libmapi++/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchan
|
||||
|
||||
%if %{build_python_package}
|
||||
%files python
|
||||
%{python_sitearch}/openchange
|
||||
%{python3_sitearch}/openchange
|
||||
%endif
|
||||
|
||||
%if %{build_server_package}
|
||||
@ -308,6 +326,33 @@ cp -r apidocs/html/libmapi++/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/openchan
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 31 2023 Milan Crha <mcrha@redhat.com> - 2.3-32
|
||||
- Related: #2190417 (Rebuild for samba rebase to 4.18.x)
|
||||
|
||||
* Thu Oct 27 2022 Milan Crha <mcrha@redhat.com> - 2.3-31
|
||||
- Related: #2132051 - Rebuild for samba rebase to 4.17.x
|
||||
|
||||
* Wed May 04 2022 Milan Crha <mcrha@redhat.com> - 2.3-30
|
||||
- Related: #2081620 - Rebuild for samba rebase to 4.16.x
|
||||
|
||||
* Thu Nov 25 2021 Milan Crha <mcrha@redhat.com> - 2.3-29
|
||||
- Related: #2013596 - Rebuild for samba rebase to 4.15.x
|
||||
|
||||
* Wed May 12 2021 Milan Crha <mcrha@redhat.com> - 2.3-28
|
||||
- Related: #1944657 - Rebuild for samba rebase to 4.14.4
|
||||
|
||||
* Fri Nov 13 2020 Milan Crha <mcrha@redhat.com> - 2.3-27
|
||||
- Rebuild for newer samba
|
||||
|
||||
* Mon Jun 08 2020 Milan Crha <mcrha@redhat.com> - 2.3-26
|
||||
- Add patch to build against samba 4.12
|
||||
|
||||
* Mon Apr 20 2020 Milan Crha <mcrha@redhat.com> - 2.3-25
|
||||
- Add patch to build against samba 4.11.2
|
||||
|
||||
* Mon Dec 02 2019 Milan Crha <mcrha@redhat.com> - 2.3-24
|
||||
- Rebuild for newer samba and libldb
|
||||
|
||||
* Thu Jul 19 2018 Milan Crha <mcrha@redhat.com> - 2.3-23
|
||||
- Address some of the Coverity Scan and clang issues
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user