summaryrefslogtreecommitdiffstats
path: root/package/network/services/samba36/patches/210-remove_ad_support.patch
blob: 1a10a30bd5e4c42ed6dd193b9ac2f4c782c43267 (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
--- a/source3/librpc/rpc/rpc_common.c
+++ b/source3/librpc/rpc/rpc_common.c
@@ -95,9 +95,11 @@ static bool initialize_interfaces(void)
 	if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
 		return false;
 	}
+#ifdef ACTIVE_DIRECTORY
 	if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
 		return false;
 	}
+#endif
 	if (!smb_register_ndr_interface(&ndr_table_samr)) {
 		return false;
 	}
@@ -141,9 +143,11 @@ static bool initialize_interfaces(void)
 	if (!smb_register_ndr_interface(&ndr_table_epmapper)) {
 		return false;
 	}
+#ifdef ACTIVE_DIRECTORY
 	if (!smb_register_ndr_interface(&ndr_table_drsuapi)) {
 		return false;
 	}
+#endif
 	return true;
 }
 
--- a/source3/rpc_server/rpc_ep_setup.c
+++ b/source3/rpc_server/rpc_ep_setup.c
@@ -918,6 +918,7 @@ static bool netdfs_init_cb(void *ptr)
 	return true;
 }
 
+#ifdef ACTIVE_DIRECTORY
 static bool dssetup_init_cb(void *ptr)
 {
 	struct dcesrv_ep_context *ep_ctx =
@@ -966,6 +967,7 @@ static bool dssetup_init_cb(void *ptr)
 
 	return true;
 }
+#endif
 
 static bool wkssvc_init_cb(void *ptr)
 {
@@ -1172,12 +1174,14 @@ bool dcesrv_ep_setup(struct tevent_conte
 	}
 #endif
 
+#ifdef ACTIVE_DIRECTORY
 	dssetup_cb.init         = dssetup_init_cb;
 	dssetup_cb.shutdown     = NULL;
 	dssetup_cb.private_data = ep_ctx;
 	if (!NT_STATUS_IS_OK(rpc_dssetup_init(&dssetup_cb))) {
 		return false;
 	}
+#endif
 
 	wkssvc_cb.init         = wkssvc_init_cb;
 	wkssvc_cb.shutdown     = NULL;
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -132,7 +132,9 @@ static void exit_server_common(enum serv
 
 	if (am_parent) {
 		rpc_wkssvc_shutdown();
+#ifdef ACTIVE_DIRECTORY
 		rpc_dssetup_shutdown();
+#endif
 #ifdef DEVELOPER
 		rpc_rpcecho_shutdown();
 #endif
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2874,12 +2874,14 @@ NTSTATUS cli_rpc_pipe_open_noauth_transp
 	status = rpc_pipe_bind(result, auth);
 	if (!NT_STATUS_IS_OK(status)) {
 		int lvl = 0;
+#ifdef ACTIVE_DIRECTORY
 		if (ndr_syntax_id_equal(interface,
 					&ndr_table_dssetup.syntax_id)) {
 			/* non AD domains just don't have this pipe, avoid
 			 * level 0 statement in that case - gd */
 			lvl = 3;
 		}
+#endif
 		DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe "
 			    "%s failed with error %s\n",
 			    get_pipe_name_from_syntax(talloc_tos(), interface),