summaryrefslogtreecommitdiff
path: root/pcr/openchange/openchange-samba42.patch
blob: cf005004a184b3657165888f7d378d197f1dc7b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
diff -Naurp openchange-2.2-NANOPROBE-orig/config.mk.in openchange-2.2-NANOPROBE/config.mk.in
--- openchange-2.2-NANOPROBE-orig/config.mk.in	2014-08-11 10:51:05.000000000 -0500
+++ openchange-2.2-NANOPROBE/config.mk.in	2015-03-22 23:10:47.208548756 -0500
@@ -52,6 +52,9 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
 SAMBA_CFLAGS=@SAMBA_CFLAGS@
 SAMBA_LIBS=@SAMBA_LIBS@
 
+SAMBA_DEBUG_LDFLAGS=@SAMBA_DEBUG_LDFLAGS@
+SAMBA_DEBUG_LIBS=@SAMBA_DEBUG_LIBS@
+
 LDB_CFLAGS=@LDB_CFLAGS@
 LDB_LIBS=@LDB_LIBS@
 
diff -Naurp openchange-2.2-NANOPROBE-orig/configure.ac openchange-2.2-NANOPROBE/configure.ac
--- openchange-2.2-NANOPROBE-orig/configure.ac	2014-08-11 10:51:05.000000000 -0500
+++ openchange-2.2-NANOPROBE/configure.ac	2015-03-22 23:31:08.448303310 -0500
@@ -412,6 +412,12 @@ PKG_CHECK_MODULES(SAMBASERVER, dcerpc_se
 PKG_CHECK_MODULES(TDB, tdb)
 PKG_CHECK_MODULES(LDB, ldb)
 
+SAMBA_DEBUG_LIBS="-lsamba-debug-samba4 -lsocket-blocking-samba4"
+AC_SUBST(SAMBA_DEBUG_LIBS)
+
+SAMBA_DEBUG_LDFLAGS="-L`pkg-config --variable=libdir samba-util`/samba -Wl,-rpath,`pkg-config --variable=libdir samba-util`/samba"
+AC_SUBST(SAMBA_DEBUG_LDFLAGS)
+
 dnl ---------------------------------------------------------------------------
 dnl Check a particular Samba4 git revision
 dnl ---------------------------------------------------------------------------
diff -Naurp openchange-2.2-NANOPROBE-orig/Makefile openchange-2.2-NANOPROBE/Makefile
--- openchange-2.2-NANOPROBE-orig/Makefile	2014-08-11 10:51:05.000000000 -0500
+++ openchange-2.2-NANOPROBE/Makefile	2015-03-22 23:31:08.451636651 -0500
@@ -357,7 +357,7 @@ libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION)
 	libmapi++/src/session.po \
 	libmapi.$(SHLIBEXT).$(LIBMAPI_SO_VERSION)
 	@echo "Linking $@"
-	@$(CXX) $(DSOOPT) $(CXX11FLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libmapipp.$(SHLIBEXT).$(LIBMAPIPP_SO_VERSION) -o $@ $^ $(LIBS) 
+	@$(CXX) $(DSOOPT) $(CXX11FLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libmapipp.$(SHLIBEXT).$(LIBMAPIPP_SO_VERSION) -o $@ $^ $(LIBS)  $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 libmapixx-installpc:
 	@echo "[*] install: libmapi++ pc files"
@@ -438,7 +438,7 @@ bin/libmapixx-test:	libmapi++/tests/test
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking sample application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)  $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 clean:: libmapixx-test-clean
 
@@ -453,7 +453,7 @@ bin/libmapixx-attach: libmapi++/tests/at
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking sample application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS)
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 clean:: libmapixx-attach-clean
 
@@ -463,7 +463,7 @@ bin/libmapixx-exception: libmapi++/tests
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking exception test application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS)
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 libmapixx-exception-clean:
 	rm -f bin/libmapixx-exception
@@ -483,7 +483,7 @@ bin/libmapixx-profiletest: libmapi++/tes
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking profile test application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS)
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 clean:: libmapixx-profiletest-clean
 
@@ -504,7 +504,7 @@ libmapi++/examples/foldertree: libmapi++
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking foldertree example application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS)
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 clean:: libmapixx-foldertree-clean
 
@@ -512,7 +512,7 @@ libmapi++/examples/messages: libmapi++/e
 		libmapipp.$(SHLIBEXT).$(PACKAGE_VERSION) \
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking messages example application $@"
-	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS)
+	@$(CXX) $(CXX11FLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 clean:: libmapixx-messages-clean
 
@@ -579,7 +579,7 @@ libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSI
 	libmapiadmin/mapiadmin.po 		\
 	libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) -o $@ $^ $(LIBS) $(LIBMAPIADMIN_LIBS) 
+	@$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiadmin.$(SHLIBEXT).$(LIBMAPIADMIN_SO_VERSION) -o $@ $^ $(LIBS) $(LIBMAPIADMIN_LIBS)  $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 
@@ -656,7 +656,7 @@ libocpf.$(SHLIBEXT).$(PACKAGE_VERSION):
 	libocpf/ocpf_write.po			\
 	libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) -o $@ $^ $(LIBS)
+	@$(CC) $(DSOOPT) $(LDFLAGS) -Wl,-soname,libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION) -o $@ $^ $(LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 libocpf.$(SHLIBEXT).$(LIBOCPF_SO_VERSION): libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
 	ln -fs $< $@
@@ -728,7 +728,7 @@ mapiproxy/dcesrv_mapiproxy.$(SHLIBEXT):
 						gen_ndr/ndr_exchange.po				
 
 	@echo "Linking $@"
-	@$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(SAMBASERVER_LIBS) $(SAMDB_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+	@$(CC) -o $@ $(DSOOPT) $^ -L. $(LDFLAGS) $(LIBS) $(SAMBASERVER_LIBS) $(SAMDB_LIBS) -Lmapiproxy mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 mapiproxy/dcesrv_mapiproxy.c: gen_ndr/ndr_exchange_s.c gen_ndr/ndr_exchange.c
 
@@ -783,7 +783,7 @@ mapiproxy/libmapiproxy.$(SHLIBEXT).$(PAC
 							mapiproxy/util/mysql.po					\
 							libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION) $^ -L. $(LIBS) $(TDB_LIBS) $(DL_LIBS) $(MYSQL_LIBS)
+	@$(CC) -o $@ $(DSOOPT) $(LDFLAGS) -Wl,-soname,libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION) $^ -L. $(LIBS) $(TDB_LIBS) $(DL_LIBS) $(MYSQL_LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 libmapiproxy.$(SHLIBEXT).$(LIBMAPIPROXY_SO_VERSION): mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 	ln -fs $< $@
@@ -939,7 +939,7 @@ mapiproxy/libmapistore.$(SHLIBEXT).$(PAC
 							mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)		\
 							libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(DSOOPT) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION) -o $@ $^ $(LIBS) $(TDB_LIBS) $(DL_LIBS) $(MYSQL_LIBS)
+	@$(CC) $(DSOOPT) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION) -o $@ $^ $(LIBS) $(TDB_LIBS) $(DL_LIBS) $(MYSQL_LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 mapiproxy/libmapistore/mapistore_interface.po: mapiproxy/libmapistore/mapistore_nameid.h
 
@@ -960,7 +960,7 @@ bin/mapistore_test: 	mapiproxy/libmapist
 			mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)	\
 			mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt -L. libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt -L. libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 mapistore_clean:
 	rm -f mapiproxy/libmapistore/tests/*.o
@@ -1138,7 +1138,7 @@ bin/openchangeclient: 	utils/openchangec
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)		\
 			libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+	@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 ##############
@@ -1166,7 +1166,7 @@ bin/mapiprofile: 	utils/mapiprofile.o
 			utils/openchange-tools.o 		\
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+	@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 ###################
@@ -1195,7 +1195,7 @@ bin/openchangepfadmin:	utils/openchangep
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) 		\
 			libmapiadmin.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBMAPIADMIN_LIBS) -lpopt			
+	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBMAPIADMIN_LIBS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 ###################
@@ -1226,7 +1226,7 @@ bin/exchange2mbox:	utils/exchange2mbox.o
 			utils/openchange-tools.o			\
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt  $(MAGIC_LIBS)
+	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt $(MAGIC_LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 ###################
@@ -1290,7 +1290,7 @@ bin/exchange2ical:	utils/exchange2ical_t
 			utils/openchange-tools.o			\
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(ICAL_LIBS) -lpopt
+	@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(ICAL_LIBS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 ######################
 # testsuite
@@ -1321,7 +1321,7 @@ bin/openchange-testsuite: 	testsuite/tes
 				mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)	\
 				mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(CFLAGS) $(CHECK_CFLAGS) $(TDB_CFLAGS) -I. -Itestsuite/ -Imapiproxy -o $@ $^ $(LDFLAGS) $(LIBS) $(TDB_LIBS) $(CHECK_LIBS) $(MYSQL_LIBS) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
+	@$(CC) $(CFLAGS) $(CHECK_CFLAGS) $(TDB_CFLAGS) -I. -Itestsuite/ -Imapiproxy -o $@ $^ $(LDFLAGS) $(LIBS) $(TDB_LIBS) $(CHECK_LIBS) $(MYSQL_LIBS) libmapi.$(SHLIBEXT).$(PACKAGE_VERSION) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 testsuite-check:	testsuite
 	@LD_LIBRARY_PATH=. CK_XML_LOG_FILE_NAME=test_results.xml ./bin/openchange-testsuite
@@ -1390,7 +1390,7 @@ bin/mapitest:	utils/mapitest/mapitest.o
 		utils/mapitest/modules/module_lzxpress.o	\
 		libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)		
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SUBUNIT_LIBS)
+	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SUBUNIT_LIBS) $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 utils/mapitest/proto.h:					\
 	utils/mapitest/mapitest_suite.c			\
@@ -1450,7 +1450,7 @@ bin/openchangemapidump:	utils/backup/ope
 			utils/openchange-tools.o			\
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt
+	@$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 
 ###############
@@ -1503,7 +1503,7 @@ bin/check_fasttransfer:	testprogs/check_
 			mapiproxy/libmapistore.$(SHLIBEXT).$(PACKAGE_VERSION)	\
 			mapiproxy/libmapiproxy.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
+	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 ###################
 # test_asyncnotif test app.
@@ -1529,7 +1529,7 @@ clean:: test_asyncnotif-clean
 bin/test_asyncnotif:	testprogs/test_asyncnotif.o			\
 			libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt
+	@$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lpopt $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 ###################
 # python code
@@ -1574,7 +1574,7 @@ $(pythonscriptdir)/openchange/mapi.$(SHL
 						pyopenchange/pymapi_properties.c		\
 						libmapi.$(SHLIBEXT).$(PACKAGE_VERSION)
 	@echo "Linking $@"
-	@$(CC) $(CFLAGS) -fno-strict-aliasing $(DSOOPT) $(LDFLAGS) -o $@ $^ $(PYTHON_CFLAGS) $(PYTHON_LIBS) $(LIBS) 
+	@$(CC) $(CFLAGS) -fno-strict-aliasing $(DSOOPT) $(LDFLAGS) -o $@ $^ $(PYTHON_CFLAGS) $(PYTHON_LIBS) $(LIBS)  $(SAMBA_DEBUG_LDFLAGS) $(SAMBA_DEBUG_LIBS)
 
 # $(pythonscriptdir)/openchange/ocpf.$(SHLIBEXT):	pyopenchange/pyocpf.c				\
 # 						libocpf.$(SHLIBEXT).$(PACKAGE_VERSION)		\
diff -Naurp openchange-2.2-NANOPROBE-orig/mapiproxy/dcesrv_mapiproxy.c openchange-2.2-NANOPROBE/mapiproxy/dcesrv_mapiproxy.c
--- openchange-2.2-NANOPROBE-orig/mapiproxy/dcesrv_mapiproxy.c	2014-08-11 10:51:05.000000000 -0500
+++ openchange-2.2-NANOPROBE/mapiproxy/dcesrv_mapiproxy.c	2015-03-22 23:41:19.793032062 -0500
@@ -132,10 +132,10 @@ static NTSTATUS mapiproxy_op_connect(str
 		
 		switch (dce_call->pkt.ptype) {
 		case DCERPC_PKT_BIND:
-			b->assoc_group_id = dce_call->pkt.u.bind.assoc_group_id;
+			status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.bind.assoc_group_id);
 			break;
 		case DCERPC_PKT_ALTER:
-			b->assoc_group_id = dce_call->pkt.u.alter.assoc_group_id;
+			status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.alter.assoc_group_id);
 			break;
 		default:
 			break;
@@ -152,7 +152,7 @@ static NTSTATUS mapiproxy_op_connect(str
 		if (!NT_STATUS_IS_OK(status)) {
 			return status;
 		}
-		dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
+		dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
 		
 	} else {
 		status = dcerpc_pipe_connect(dce_call->context,
@@ -167,7 +167,7 @@ static NTSTATUS mapiproxy_op_connect(str
 		if (!NT_STATUS_IS_OK(status)) {
 			return status;
 		}
-		dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
+		dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
 	}
 
 	private->connected = true;