Compare commits

...

No commits in common. "imports/c8s/openchange-2.3-25.el8" and "c8" have entirely different histories.

5 changed files with 234 additions and 8 deletions

View File

@ -1 +0,0 @@
901e6d8fa4f9f4a1d41c3ad97d967da316d0ad17 SOURCES/openchange-2.3-VULCAN.tar.gz

View 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:

View 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);
}

View 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));

View File

@ -23,7 +23,7 @@
Name: openchange
Version: 2.3
Release: 25%{?dist}
Release: 32%{?dist}
Group: Applications/System
Summary: Provides access to Microsoft Exchange servers using native protocols
License: GPLv3+ and Public Domain
@ -93,6 +93,9 @@ 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
@ -172,6 +175,9 @@ This package provides the server elements for OpenChange.
%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
@ -268,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}/*
@ -314,6 +326,27 @@ 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