Root/package/network/services/samba36/patches/210-remove_ad_support.patch

1--- a/source3/librpc/rpc/rpc_common.c
2+++ b/source3/librpc/rpc/rpc_common.c
3@@ -95,9 +95,11 @@ static bool initialize_interfaces(void)
4     if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
5         return false;
6     }
7+#ifdef ACTIVE_DIRECTORY
8     if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
9         return false;
10     }
11+#endif
12     if (!smb_register_ndr_interface(&ndr_table_samr)) {
13         return false;
14     }
15@@ -141,9 +143,11 @@ static bool initialize_interfaces(void)
16     if (!smb_register_ndr_interface(&ndr_table_epmapper)) {
17         return false;
18     }
19+#ifdef ACTIVE_DIRECTORY
20     if (!smb_register_ndr_interface(&ndr_table_drsuapi)) {
21         return false;
22     }
23+#endif
24     return true;
25 }
26 
27--- a/source3/rpc_server/rpc_ep_setup.c
28+++ b/source3/rpc_server/rpc_ep_setup.c
29@@ -918,6 +918,7 @@ static bool netdfs_init_cb(void *ptr)
30     return true;
31 }
32 
33+#ifdef ACTIVE_DIRECTORY
34 static bool dssetup_init_cb(void *ptr)
35 {
36     struct dcesrv_ep_context *ep_ctx =
37@@ -966,6 +967,7 @@ static bool dssetup_init_cb(void *ptr)
38 
39     return true;
40 }
41+#endif
42 
43 static bool wkssvc_init_cb(void *ptr)
44 {
45@@ -1172,12 +1174,14 @@ bool dcesrv_ep_setup(struct tevent_conte
46     }
47 #endif
48 
49+#ifdef ACTIVE_DIRECTORY
50     dssetup_cb.init = dssetup_init_cb;
51     dssetup_cb.shutdown = NULL;
52     dssetup_cb.private_data = ep_ctx;
53     if (!NT_STATUS_IS_OK(rpc_dssetup_init(&dssetup_cb))) {
54         return false;
55     }
56+#endif
57 
58     wkssvc_cb.init = wkssvc_init_cb;
59     wkssvc_cb.shutdown = NULL;
60--- a/source3/smbd/server_exit.c
61+++ b/source3/smbd/server_exit.c
62@@ -133,7 +133,9 @@ static void exit_server_common(enum serv
63 
64     if (am_parent) {
65         rpc_wkssvc_shutdown();
66+#ifdef ACTIVE_DIRECTORY
67         rpc_dssetup_shutdown();
68+#endif
69 #ifdef DEVELOPER
70         rpc_rpcecho_shutdown();
71 #endif
72--- a/source3/rpc_client/cli_pipe.c
73+++ b/source3/rpc_client/cli_pipe.c
74@@ -2874,12 +2874,14 @@ NTSTATUS cli_rpc_pipe_open_noauth_transp
75     status = rpc_pipe_bind(result, auth);
76     if (!NT_STATUS_IS_OK(status)) {
77         int lvl = 0;
78+#ifdef ACTIVE_DIRECTORY
79         if (ndr_syntax_id_equal(interface,
80                     &ndr_table_dssetup.syntax_id)) {
81             /* non AD domains just don't have this pipe, avoid
82              * level 0 statement in that case - gd */
83             lvl = 3;
84         }
85+#endif
86         DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe "
87                 "%s failed with error %s\n",
88                 get_pipe_name_from_syntax(talloc_tos(), interface),
89

Archive Download this file



interactive