samba36: reorganize patches, fix windows 7 compatibility
[openwrt/svn-archive/archive.git] / net / samba36 / patches / 260-remove_samr.patch
1 --- a/source3/librpc/rpc/rpc_common.c
2 +++ b/source3/librpc/rpc/rpc_common.c
3 @@ -100,9 +100,11 @@ static bool initialize_interfaces(void)
4 return false;
5 }
6 #endif
7 +#ifdef SAMR_SUPPORT
8 if (!smb_register_ndr_interface(&ndr_table_samr)) {
9 return false;
10 }
11 +#endif
12 #ifdef NETLOGON_SUPPORT
13 if (!smb_register_ndr_interface(&ndr_table_netlogon)) {
14 return false;
15 --- a/source3/rpc_server/rpc_ep_setup.c
16 +++ b/source3/rpc_server/rpc_ep_setup.c
17 @@ -557,6 +557,7 @@ static bool lsarpc_init_cb(void *ptr)
18 return true;
19 }
20
21 +#ifdef SAMR_SUPPORT
22 static bool samr_init_cb(void *ptr)
23 {
24 struct dcesrv_ep_context *ep_ctx =
25 @@ -605,6 +606,7 @@ static bool samr_init_cb(void *ptr)
26
27 return true;
28 }
29 +#endif
30
31 #ifdef NETLOGON_SUPPORT
32 static bool netlogon_init_cb(void *ptr)
33 @@ -1111,12 +1113,14 @@ bool dcesrv_ep_setup(struct tevent_conte
34 return false;
35 }
36
37 +#ifdef SAMR_SUPPORT
38 samr_cb.init = samr_init_cb;
39 samr_cb.shutdown = NULL;
40 samr_cb.private_data = ep_ctx;
41 if (!NT_STATUS_IS_OK(rpc_samr_init(&samr_cb))) {
42 return false;
43 }
44 +#endif
45
46 #ifdef NETLOGON_SUPPORT
47 netlogon_cb.init = netlogon_init_cb;
48 --- a/source3/smbd/server_exit.c
49 +++ b/source3/smbd/server_exit.c
50 @@ -160,7 +160,9 @@ static void exit_server_common(enum serv
51 #ifdef NETLOGON_SUPPORT
52 rpc_netlogon_shutdown();
53 #endif
54 +#ifdef SAMR_SUPPORT
55 rpc_samr_shutdown();
56 +#endif
57 rpc_lsarpc_shutdown();
58 }
59
60 --- a/source3/rpcclient/rpcclient.c
61 +++ b/source3/rpcclient/rpcclient.c
62 @@ -623,7 +623,9 @@ static struct cmd_set *rpcclient_command
63 rpcclient_commands,
64 lsarpc_commands,
65 ds_commands,
66 +#ifdef SAMR_SUPPORT
67 samr_commands,
68 +#endif
69 #ifdef PRINTER_SUPPORT
70 spoolss_commands,
71 #endif