summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD18
-rw-r--r--openchange-remove-server_id_str-1.patch399
-rw-r--r--remove-private-headers.patch45
4 files changed, 60 insertions, 410 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7f1c06f88f39..568679b911db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Dec 7 18:32:32 UTC 2015
+# Fri Apr 15 17:25:26 UTC 2016
pkgbase = openchange
pkgdesc = A portable, open source implementation of Microsoft Exchange server and Exchange protocols.
pkgver = 2.3
- pkgrel = 5
+ pkgrel = 6
url = http://www.openchange.org
arch = i686
arch = x86_64
@@ -32,16 +32,16 @@ pkgbase = openchange
source = ocsmanager.service
source = openchange-provision-type-error.patch
source = openchange-issue-249.patch
- source = openchange-remove-server_id_str-1.patch
source = openchange-add_SizedXid-1.patch
source = yyunput_flex2.6.patch
+ source = remove-private-headers.patch
sha256sums = 46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e
sha256sums = 45bd19e2a5725a94692ae606086be6d57423375c9b1c0eb5322c6e09ef2b5fb3
sha256sums = 067d25b0442ab233f47fbfd32a56042fa161b3d0aa65081f222fddde3648c439
sha256sums = e3cfd2455a52d4b68153b3d546c70edbde5cf024ebcec1088a923aedaa938834
- sha256sums = 1281c59a5d0490d9b2091535191a0aac1ae04ebc6b48cf56bd4fca656c23b25b
sha256sums = f8012d91b1c1c382e6d480dd015230e59f07d9958ac63d57f65801b1dfc6b54a
sha256sums = 569385a8666ef95a7aa024b52ea47ee308be5eee73a3d973207df43439c2c1e7
+ sha256sums = fd7c2cfae6c8b52a30fc80f8e3f4118d93172b535c0032b6cde839a57bf6da9f
pkgname = openchange
diff --git a/PKGBUILD b/PKGBUILD
index 8ea44c400ce0..7e16a5857637 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=openchange
_codename=VULCAN
pkgver=2.3
-pkgrel=5
+pkgrel=6
pkgdesc="A portable, open source implementation of Microsoft Exchange server \
and Exchange protocols."
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
@@ -24,29 +24,29 @@ source=("https://github.com/openchange/openchange/archive/${pkgname}-${pkgver}-$
"ocsmanager.service"
"openchange-provision-type-error.patch"
"openchange-issue-249.patch"
- "openchange-remove-server_id_str-1.patch"
"openchange-add_SizedXid-1.patch"
- "yyunput_flex2.6.patch")
+ "yyunput_flex2.6.patch"
+ "remove-private-headers.patch")
sha256sums=('46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e'
'45bd19e2a5725a94692ae606086be6d57423375c9b1c0eb5322c6e09ef2b5fb3'
'067d25b0442ab233f47fbfd32a56042fa161b3d0aa65081f222fddde3648c439'
'e3cfd2455a52d4b68153b3d546c70edbde5cf024ebcec1088a923aedaa938834'
- '1281c59a5d0490d9b2091535191a0aac1ae04ebc6b48cf56bd4fca656c23b25b'
'f8012d91b1c1c382e6d480dd015230e59f07d9958ac63d57f65801b1dfc6b54a'
- '569385a8666ef95a7aa024b52ea47ee308be5eee73a3d973207df43439c2c1e7')
+ '569385a8666ef95a7aa024b52ea47ee308be5eee73a3d973207df43439c2c1e7'
+ 'fd7c2cfae6c8b52a30fc80f8e3f4118d93172b535c0032b6cde839a57bf6da9f')
# Used to be pkgname-pkgver-codename, but now we have two openchanges. WAT
_srcsubdir="${pkgname}-${pkgname}-${pkgver}-${_codename}"
-build() {
+prepare() {
cd "${srcdir}/${_srcsubdir}"
patch -p1 < "${srcdir}/openchange-provision-type-error.patch"
patch -p1 < "${srcdir}/openchange-issue-249.patch"
- patch -p1 < "${srcdir}/openchange-remove-server_id_str-1.patch"
patch -p1 < "${srcdir}/openchange-add_SizedXid-1.patch"
patch -p1 < "${srcdir}/yyunput_flex2.6.patch"
+ patch -p1 < "${srcdir}/remove-private-headers.patch"
PYTHON_CALLERS="$(find ${srcdir}/${_srcsubdir} -name '*.py')
$(find ${srcdir}/${_srcsubdir} -name 'configure.ac')
@@ -60,6 +60,10 @@ build() {
# Fix linking of boost_thread in autoconf test
sed -i -e "s|-lboost_thread\$BOOST_LIB_SUFFIX|-lboost_thread\$BOOST_LIB_SUFFIX -lboost_system\$BOOST_LIB_SUFFIX|" \
configure.ac
+}
+
+build() {
+ cd "${srcdir}/${_srcsubdir}"
export PYTHON=/usr/bin/python2
diff --git a/openchange-remove-server_id_str-1.patch b/openchange-remove-server_id_str-1.patch
deleted file mode 100644
index 0edfae430507..000000000000
--- a/openchange-remove-server_id_str-1.patch
+++ /dev/null
@@ -1,399 +0,0 @@
-diff -Naurp openchange/mapiproxy/dcesrv_mapiproxy.c openchange-new/mapiproxy/dcesrv_mapiproxy.c
---- openchange/mapiproxy/dcesrv_mapiproxy.c 2015-11-27 00:00:08.903834201 -0600
-+++ openchange-new/mapiproxy/dcesrv_mapiproxy.c 2015-11-27 02:34:59.798268143 -0600
-@@ -222,16 +222,15 @@ static NTSTATUS mapiproxy_op_bind_proxy(
- */
- static NTSTATUS mapiproxy_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
- {
-+ struct server_id_buf idbuf;
- struct dcesrv_mapiproxy_private *private;
- bool server_mode;
- bool ndrdump;
-- char *server_id_printable = NULL;
-
-- server_id_printable = server_id_str(NULL, &(dce_call->conn->server_id));
- OC_DEBUG(5, "[session = 0x%x] [session server id = %s]\n",
- dce_call->context->context_id,
-- server_id_printable);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((dce_call->conn->server_id), &idbuf));
-+ talloc_free(server_id_str_buf((dce_call->conn->server_id), &idbuf));
-
- OC_DEBUG(5, "mapiproxy::mapiproxy_op_bind: [session = 0x%x] [session server id = 0x%"PRIx64" 0x%x 0x%x]", dce_call->context->context_id,
- dce_call->conn->server_id.pid, dce_call->conn->server_id.task_id, dce_call->conn->server_id.vnn);
-diff -Naurp openchange/mapiproxy/modules/mpm_cache.c openchange-new/mapiproxy/modules/mpm_cache.c
---- openchange/mapiproxy/modules/mpm_cache.c 2015-11-27 00:00:08.820500133 -0600
-+++ openchange-new/mapiproxy/modules/mpm_cache.c 2015-11-27 02:32:06.854675099 -0600
-@@ -216,40 +216,37 @@ static NTSTATUS cache_pull_Release(struc
- struct EcDoRpc *EcDoRpc,
- uint32_t handle_idx)
- {
-+ struct server_id_buf idbuf;
- struct mpm_message *message;
- struct mpm_attachment *attach;
- struct mpm_stream *stream;
-- char *server_id_printable = NULL;
-
- /* Look over messages */
- for (message = mpm->messages; message; message = message->next) {
- if ((mpm_session_cmp(message->session, dce_call) == true) &&
- (EcDoRpc->in.mapi_request->handles[handle_idx] == message->handle)) {
-- server_id_printable = server_id_str(NULL, &(message->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del: Message 0x%"PRIx64" 0x%"PRIx64": 0x%x",
-- server_id_printable, message->session->context_id,
-+ server_id_str_buf((message->session->server_id), &idbuf), message->session->context_id,
- message->FolderId, message->MessageId, message->handle);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((message->session->server_id), &idbuf));
-
- /* Loop over children attachments */
- attach = mpm->attachments;
- while (attach) {
- if ((mpm_session_cmp(attach->session, dce_call) == true) &&
- (message->handle == attach->parent_handle)) {
-- server_id_printable = server_id_str(NULL, &(attach->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del recursive 1: Attachment %d: 0x%x",
-- server_id_printable, attach->session->context_id, attach->AttachmentID, attach->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((attach->session->server_id), &idbuf), attach->session->context_id, attach->AttachmentID, attach->handle);
-+ talloc_free(server_id_str_buf((attach->session->server_id), &idbuf));
-
- /* Loop over children streams */
- stream = mpm->streams;
- while (stream) {
- if ((mpm_session_cmp(stream->session, dce_call) == true) &&
- (attach->handle == stream->parent_handle)) {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del recursive 1-2: Stream 0x%x",
-- server_id_printable, stream->session->context_id, stream->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_session_release(stream->session);
- mpm_cache_stream_close(stream);
- talloc_free(stream->filename);
-@@ -275,10 +272,9 @@ static NTSTATUS cache_pull_Release(struc
- while (stream) {
- if ((mpm_session_cmp(stream->session, dce_call) == true) &&
- (message->handle == stream->parent_handle)) {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del recursive 1: Stream 0x%x",
-- server_id_printable, stream->session->context_id, stream->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_session_release(stream->session);
- mpm_cache_stream_close(stream);
- DLIST_REMOVE(mpm->streams, stream);
-@@ -301,20 +297,18 @@ static NTSTATUS cache_pull_Release(struc
- for (attach = mpm->attachments; attach; attach = attach->next) {
- if ((mpm_session_cmp(attach->session, dce_call) == true) &&
- (EcDoRpc->in.mapi_request->handles[handle_idx] == attach->handle)) {
-- server_id_printable = server_id_str(NULL, &(attach->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del: Attachment %d: 0x%x",
-- server_id_printable, attach->session->context_id, attach->AttachmentID, attach->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((attach->session->server_id), &idbuf), attach->session->context_id, attach->AttachmentID, attach->handle);
-+ talloc_free(server_id_str_buf((attach->session->server_id), &idbuf));
-
- /* Loop over children streams */
- stream = mpm->streams;
- while (stream) {
- if ((mpm_session_cmp(stream->session, dce_call) == true) &&
- (attach->handle == stream->parent_handle)) {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del recursive 2: Stream 0x%x",
-- server_id_printable, stream->session->context_id, stream->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_session_release(stream->session);
- mpm_cache_stream_close(stream);
- DLIST_REMOVE(mpm->streams, stream);
-@@ -337,10 +331,9 @@ static NTSTATUS cache_pull_Release(struc
- for (stream = mpm->streams; stream; stream = stream->next) {
- if ((mpm_session_cmp(stream->session, dce_call) == true) &&
- (EcDoRpc->in.mapi_request->handles[handle_idx] == stream->handle)) {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Del: Stream 0x%x\n",
-- server_id_printable, stream->session->context_id, stream->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_session_release(stream->session);
- mpm_cache_stream_close(stream);
- DLIST_REMOVE(mpm->streams, stream);
-@@ -428,10 +421,10 @@ static NTSTATUS cache_push_OpenMessage(s
- struct EcDoRpc_MAPI_REPL mapi_repl,
- struct EcDoRpc *EcDoRpc)
- {
-- struct mpm_message *el;
-- struct mapi_response *mapi_response;
-- struct OpenMessage_req request;
-- char *server_id_printable = NULL;
-+ struct server_id_buf idbuf;
-+ struct mpm_message *el;
-+ struct mapi_response *mapi_response;
-+ struct OpenMessage_req request;
-
- request = mapi_req.u.mapi_OpenMessage;
-
-@@ -443,17 +436,15 @@ static NTSTATUS cache_push_OpenMessage(s
- if (mapi_repl.error_code == MAPI_E_SUCCESS) {
- mpm_cache_ldb_add_message((TALLOC_CTX *)mpm, mpm->ldb_ctx, el);
- el->handle = mapi_response->handles[request.handle_idx];
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Add: Message 0x%"PRIx64" 0x%"PRIx64" 0x%x",
-- server_id_printable, el->session->context_id, el->FolderId,
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id, el->FolderId,
- el->MessageId, el->handle);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- } else {
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(0, "* [s(%s),c(0x%x)] Del: Message OpenMessage returned %s",
-- server_id_printable, el->session->context_id,
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id,
- mapi_get_errstr(mapi_repl.error_code));
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- DLIST_REMOVE(mpm->messages, el);
- }
- return NT_STATUS_OK;
-@@ -484,11 +475,11 @@ static NTSTATUS cache_pull_OpenAttach(st
- struct EcDoRpc_MAPI_REQ mapi_req,
- struct EcDoRpc *EcDoRpc)
- {
-- struct mpm_message *el;
-- struct mpm_attachment *attach;
-- struct mapi_request *mapi_request;
-- struct OpenAttach_req request;
-- char *server_id_printable = NULL;
-+ struct server_id_buf idbuf;
-+ struct mpm_message *el;
-+ struct mpm_attachment *attach;
-+ struct mapi_request *mapi_request;
-+ struct OpenAttach_req request;
-
- mapi_request = EcDoRpc->in.mapi_request;
- request = mapi_req.u.mapi_OpenAttach;
-@@ -518,11 +509,10 @@ static NTSTATUS cache_pull_OpenAttach(st
- }
- }
-
-- server_id_printable = server_id_str(NULL, &(attach->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Add [1]: Attachment %d parent handle (0x%x) 0x%"PRIx64", 0x%"PRIx64" added to the list",
-- server_id_printable, attach->session->context_id, request.AttachmentID, attach->parent_handle,
-+ server_id_str_buf((attach->session->server_id), &idbuf), attach->session->context_id, request.AttachmentID, attach->parent_handle,
- attach->message->FolderId, attach->message->MessageId);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((attach->session->server_id), &idbuf));
- DLIST_ADD_END(mpm->attachments, attach, struct mpm_attachment *);
-
- return NT_STATUS_OK;
-@@ -558,11 +548,11 @@ static NTSTATUS cache_push_OpenAttach(st
- struct EcDoRpc_MAPI_REPL mapi_repl,
- struct EcDoRpc *EcDoRpc)
- {
-+ struct server_id_buf idbuf;
- struct mpm_attachment *el;
- struct mapi_request *mapi_request;
- struct mapi_response *mapi_response;
- struct OpenAttach_req request;
-- char *server_id_printable = NULL;
-
- mapi_request = EcDoRpc->in.mapi_request;
- mapi_response = EcDoRpc->out.mapi_response;
-@@ -574,18 +564,16 @@ static NTSTATUS cache_push_OpenAttach(st
- (request.AttachmentID == el->AttachmentID)) {
- if (mapi_repl.error_code == MAPI_E_SUCCESS) {
- el->handle = mapi_response->handles[request.handle_idx];
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Add [2]: Attachment %d with handle 0x%x and parent handle 0x%x",
-- server_id_printable, el->session->context_id, el->AttachmentID, el->handle,
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id, el->AttachmentID, el->handle,
- el->parent_handle);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- mpm_cache_ldb_add_attachment((TALLOC_CTX *)mpm, mpm->ldb_ctx, el);
- } else {
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(0, "* [s(%s),c(0x%x)] Del: Attachment OpenAttach returned %s",
-- server_id_printable, el->session->context_id,
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id,
- mapi_get_errstr(mapi_repl.error_code));
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- DLIST_REMOVE(mpm->attachments, el);
- }
- return NT_STATUS_OK;
-@@ -619,12 +607,12 @@ static NTSTATUS cache_pull_OpenStream(st
- struct EcDoRpc_MAPI_REQ mapi_req,
- struct EcDoRpc *EcDoRpc)
- {
-- struct mpm_stream *stream;
-- struct mpm_attachment *attach;
-- struct mpm_message *message;
-- struct mapi_request *mapi_request;
-- struct OpenStream_req request;
-- char *server_id_printable = NULL;
-+ struct server_id_buf idbuf;
-+ struct mpm_stream *stream;
-+ struct mpm_attachment *attach;
-+ struct mpm_message *message;
-+ struct mapi_request *mapi_request;
-+ struct OpenStream_req request;
-
- mapi_request = EcDoRpc->in.mapi_request;
- request = mapi_req.u.mapi_OpenStream;
-@@ -648,11 +636,10 @@ static NTSTATUS cache_pull_OpenStream(st
- stream->message = NULL;
- stream->ahead = (mpm->ahead == true) ? true : false;
- gettimeofday(&stream->tv_start, NULL);
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Stream::attachment added 0x%x 0x%"PRIx64" 0x%"PRIx64,
-- server_id_printable, stream->session->context_id, stream->parent_handle,
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->parent_handle,
- stream->attachment->message->FolderId, stream->attachment->message->MessageId);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- DLIST_ADD_END(mpm->streams, stream, struct mpm_stream *);
- return NT_STATUS_OK;
- }
-@@ -676,10 +663,9 @@ static NTSTATUS cache_pull_OpenStream(st
- stream->cached = false;
- stream->ahead = (mpm->ahead == true) ? true : false;
- gettimeofday(&stream->tv_start, NULL);
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Stream::message added 0x%x",
-- server_id_printable, stream->session->context_id, stream->parent_handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->parent_handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- stream->message = message;
- DLIST_ADD_END(mpm->streams, stream, struct mpm_stream *);
- return NT_STATUS_OK;
-@@ -719,12 +705,12 @@ static NTSTATUS cache_push_OpenStream(st
- struct EcDoRpc_MAPI_REPL mapi_repl,
- struct EcDoRpc *EcDoRpc)
- {
-- struct mpm_stream *el;
-- struct mapi_request *mapi_request;
-- struct mapi_response *mapi_response;
-- struct OpenStream_req request;
-- struct OpenStream_repl response;
-- char *server_id_printable = NULL;
-+ struct server_id_buf idbuf;
-+ struct mpm_stream *el;
-+ struct mapi_request *mapi_request;
-+ struct mapi_response *mapi_response;
-+ struct OpenStream_req request;
-+ struct OpenStream_repl response;
-
- mapi_request = EcDoRpc->in.mapi_request;
- mapi_response = EcDoRpc->out.mapi_response;
-@@ -738,17 +724,15 @@ static NTSTATUS cache_push_OpenStream(st
- if (mapi_repl.error_code == MAPI_E_SUCCESS) {
- el->handle = mapi_response->handles[request.handle_idx];
- el->StreamSize = response.StreamSize;
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(2, "* [s(%s),c(0x%x)] Add [2]: Stream for Property Tag 0x%x, handle 0x%x and size = %d",
-- server_id_printable, el->session->context_id, el->PropertyTag, el->handle,
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id, el->PropertyTag, el->handle,
- el->StreamSize);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- mpm_cache_ldb_add_stream(mpm, mpm->ldb_ctx, el);
- } else {
-- server_id_printable = server_id_str(NULL, &(el->session->server_id));
- OC_DEBUG(0, "* [s(%s),c(0x%x)] Del: Stream OpenStream returned %s",
-- server_id_printable, el->session->context_id, mapi_get_errstr(mapi_repl.error_code));
-- talloc_free(server_id_printable);
-+ server_id_str_buf((el->session->server_id), &idbuf), el->session->context_id, mapi_get_errstr(mapi_repl.error_code));
-+ talloc_free(server_id_str_buf((el->session->server_id), &idbuf));
- DLIST_REMOVE(mpm->streams, el);
- }
- return NT_STATUS_OK;
-@@ -782,11 +766,11 @@ static NTSTATUS cache_push_ReadStream(st
- struct EcDoRpc_MAPI_REPL mapi_repl,
- struct EcDoRpc *EcDoRpc)
- {
-- struct mpm_stream *stream;
-- struct mapi_response *mapi_response;
-- struct ReadStream_repl response;
-+ struct server_id_buf idbuf;
-+ struct mpm_stream *stream;
-+ struct mapi_response *mapi_response;
-+ struct ReadStream_repl response;
- /* struct ReadStream_req request; */
-- char *server_id_printable = NULL;
-
- mapi_response = EcDoRpc->out.mapi_response;
- response = mapi_repl.u.mapi_ReadStream;
-@@ -800,10 +784,9 @@ static NTSTATUS cache_push_ReadStream(st
- if (mpm->sync == true && stream->StreamSize > mpm->sync_min) {
- cache_exec_sync_cmd(stream);
- } else {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(5, "* [s(%s),c(0x%x)] %zd bytes from remove server",
-- server_id_printable, stream->session->context_id, response.data.length);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, response.data.length);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_cache_stream_write(stream, response.data.length, response.data.data);
- if (stream->offset == stream->StreamSize) {
- if (response.data.length) {
-@@ -1074,20 +1057,19 @@ static NTSTATUS cache_dispatch(struct dc
- */
- static NTSTATUS cache_unbind(struct server_id server_id, uint32_t context_id)
- {
-- struct mpm_message *message;
-- struct mpm_attachment *attach;
-- struct mpm_stream *stream;
-- char *server_id_printable = NULL;
-+ struct server_id_buf idbuf;
-+ struct mpm_message *message;
-+ struct mpm_attachment *attach;
-+ struct mpm_stream *stream;
-
- /* Look over messages still attached to the session */
- message = mpm->messages;
- while (message) {
- if ((mpm_session_cmp_sub(message->session, server_id, context_id) == true)) {
-- server_id_printable = server_id_str(NULL, &(message->session->server_id));
- OC_DEBUG(2, "[s(%s),c(0x%x)] Message - 0x%"PRIx64"/0x%"PRIx64" handle(0x%x)",
-- server_id_printable, message->session->context_id,
-+ server_id_str_buf((message->session->server_id), &idbuf), message->session->context_id,
- message->FolderId, message->MessageId, message->handle);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((message->session->server_id), &idbuf));
- mpm_session_release(message->session);
- DLIST_REMOVE(mpm->messages, message);
- talloc_free(message);
-@@ -1101,11 +1083,10 @@ static NTSTATUS cache_unbind(struct serv
- attach = mpm->attachments;
- while (attach) {
- if ((mpm_session_cmp_sub(attach->session, server_id, context_id) == true)) {
-- server_id_printable = server_id_str(NULL, &(attach->session->server_id));
- OC_DEBUG(2, "[s(%s),c(0x%x)] Attachment - AttachmentID(0x%x) handle(0x%x)",
-- server_id_printable, attach->session->context_id,
-+ server_id_str_buf((attach->session->server_id), &idbuf), attach->session->context_id,
- attach->AttachmentID, attach->handle);
-- talloc_free(server_id_printable);
-+ talloc_free(server_id_str_buf((attach->session->server_id), &idbuf));
- mpm_session_release(attach->session);
- DLIST_REMOVE(mpm->attachments, attach);
- talloc_free(attach);
-@@ -1118,10 +1099,9 @@ static NTSTATUS cache_unbind(struct serv
- stream = mpm->streams;
- while (stream) {
- if ((mpm_session_cmp_sub(stream->session, server_id, context_id) == true)) {
-- server_id_printable = server_id_str(NULL, &(stream->session->server_id));
- OC_DEBUG(2, "[s(%s),c(0x%x)] Stream - handle(0x%x)",
-- server_id_printable, stream->session->context_id, stream->handle);
-- talloc_free(server_id_printable);
-+ server_id_str_buf((stream->session->server_id), &idbuf), stream->session->context_id, stream->handle);
-+ talloc_free(server_id_str_buf((stream->session->server_id), &idbuf));
- mpm_session_release(stream->session);
- mpm_cache_stream_close(stream);
- talloc_free(stream->filename);
diff --git a/remove-private-headers.patch b/remove-private-headers.patch
new file mode 100644
index 000000000000..983167373b49
--- /dev/null
+++ b/remove-private-headers.patch
@@ -0,0 +1,45 @@
+From 5f5783711d2c2496a824e66c8aa439781cac67fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= <jgarcia@zentyal.com>
+Date: Sat, 26 Mar 2016 17:20:14 +0100
+Subject: [PATCH] Remove private headers (samba 4.4)
+
+emsmdbp.c didn't need that include
+mapiadmin_user.c has declaration now
+---
+ libmapiadmin/mapiadmin_user.c | 3 ++-
+ mapiproxy/servers/default/emsmdb/emsmdbp.c | 2 --
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/libmapiadmin/mapiadmin_user.c b/libmapiadmin/mapiadmin_user.c
+index 1aacd3d..518b802 100644
+--- a/libmapiadmin/mapiadmin_user.c
++++ b/libmapiadmin/mapiadmin_user.c
+@@ -30,13 +30,14 @@
+ #include <credentials.h>
+ #include <ldb_errors.h>
+ #include <ldb_wrap.h>
+-#include <ldap_ndr.h>
+
+ #include <gen_ndr/ndr_samr.h>
+ #include <gen_ndr/ndr_samr_c.h>
+
+ #include <time.h>
+
++char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
++
+ /**
+ \file
+ User management functions for mapiadmin
+diff --git a/mapiproxy/servers/default/emsmdb/emsmdbp.c b/mapiproxy/servers/default/emsmdb/emsmdbp.c
+index 0088c95..90686c6 100644
+--- a/mapiproxy/servers/default/emsmdb/emsmdbp.c
++++ b/mapiproxy/servers/default/emsmdb/emsmdbp.c
+@@ -32,8 +32,7 @@
+ #include "mapiproxy/libmapiserver/libmapiserver.h"
+ #include "mapiproxy/libmapiproxy/fault_util.h"
+
+-#include <ldap_ndr.h>
+
+ /* Expose samdb_connect prototype */
+ struct ldb_context *samdb_connect(TALLOC_CTX *, struct tevent_context *,
+ struct loadparm_context *,