1 --- a/source3/rpc_server/rpc_handles.c
2 +++ b/source3/rpc_server/rpc_handles.c
3 @@ -59,8 +59,11 @@ struct handle_list {
5 static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax)
7 - return (ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id)
8 - || ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
11 + ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id) ||
13 + ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id);
16 size_t num_pipe_handles(struct pipes_struct *p)
17 --- a/source3/librpc/rpc/rpc_common.c
18 +++ b/source3/librpc/rpc/rpc_common.c
19 @@ -100,9 +100,11 @@ static bool initialize_interfaces(void)
24 if (!smb_register_ndr_interface(&ndr_table_samr)) {
28 #ifdef NETLOGON_SUPPORT
29 if (!smb_register_ndr_interface(&ndr_table_netlogon)) {
31 --- a/source3/rpc_server/rpc_ep_setup.c
32 +++ b/source3/rpc_server/rpc_ep_setup.c
33 @@ -557,6 +557,7 @@ static bool lsarpc_init_cb(void *ptr)
38 static bool samr_init_cb(void *ptr)
40 struct dcesrv_ep_context *ep_ctx =
41 @@ -605,6 +606,7 @@ static bool samr_init_cb(void *ptr)
47 #ifdef NETLOGON_SUPPORT
48 static bool netlogon_init_cb(void *ptr)
49 @@ -1111,12 +1113,14 @@ bool dcesrv_ep_setup(struct tevent_conte
54 samr_cb.init = samr_init_cb;
55 samr_cb.shutdown = NULL;
56 samr_cb.private_data = ep_ctx;
57 if (!NT_STATUS_IS_OK(rpc_samr_init(&samr_cb))) {
62 #ifdef NETLOGON_SUPPORT
63 netlogon_cb.init = netlogon_init_cb;
64 --- a/source3/smbd/server_exit.c
65 +++ b/source3/smbd/server_exit.c
66 @@ -159,7 +159,9 @@ static void exit_server_common(enum serv
67 #ifdef NETLOGON_SUPPORT
68 rpc_netlogon_shutdown();
73 rpc_lsarpc_shutdown();
76 --- a/source3/rpcclient/rpcclient.c
77 +++ b/source3/rpcclient/rpcclient.c
78 @@ -623,7 +623,9 @@ static struct cmd_set *rpcclient_command
85 #ifdef PRINTER_SUPPORT
88 --- a/source3/smbd/lanman.c
89 +++ b/source3/smbd/lanman.c
90 @@ -2353,6 +2353,10 @@ static bool api_RNetGroupEnum(struct smb
91 NTSTATUS status, result;
92 struct dcerpc_binding_handle *b;
98 if (!str1 || !str2 || !p) {
101 @@ -2541,6 +2545,10 @@ static bool api_NetUserGetGroups(struct
102 NTSTATUS status, result;
103 struct dcerpc_binding_handle *b;
105 +#ifndef SAMR_SUPPORT
109 if (!str1 || !str2 || !UserName || !p) {
112 @@ -2733,6 +2741,10 @@ static bool api_RNetUserEnum(struct smbd
114 struct dcerpc_binding_handle *b;
116 +#ifndef SAMR_SUPPORT
120 if (!str1 || !str2 || !p) {
123 @@ -2979,6 +2991,10 @@ static bool api_SetUserPassword(struct s
125 struct dcerpc_binding_handle *b = NULL;
127 +#ifndef SAMR_SUPPORT
131 /* Skip 2 strings. */
132 p = skip_string(param,tpscnt,np);
133 p = skip_string(param,tpscnt,p);
134 @@ -3224,6 +3240,10 @@ static bool api_SamOEMChangePassword(str
136 struct dcerpc_binding_handle *b;
138 +#ifndef SAMR_SUPPORT
143 *rparam = smb_realloc_limit(*rparam,*rparam_len);
145 @@ -4265,6 +4285,10 @@ static bool api_RNetUserGetInfo(struct s
146 union samr_UserInfo *info;
147 struct dcerpc_binding_handle *b = NULL;
149 +#ifndef SAMR_SUPPORT
153 if (!str1 || !str2 || !UserName || !p) {