You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
156 lines
3.6 KiB
156 lines
3.6 KiB
12 years ago
|
--- a/source3/rpc_server/rpc_handles.c
|
||
|
+++ b/source3/rpc_server/rpc_handles.c
|
||
|
@@ -59,8 +59,11 @@ struct handle_list {
|
||
|
|
||
|
static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax)
|
||
|
{
|
||
|
- return (ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id)
|
||
|
- || ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
|
||
|
+ return
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
+ ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id) ||
|
||
|
+#endif
|
||
|
+ ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id);
|
||
|
}
|
||
|
|
||
|
size_t num_pipe_handles(struct pipes_struct *p)
|
||
|
--- a/source3/librpc/rpc/rpc_common.c
|
||
|
+++ b/source3/librpc/rpc/rpc_common.c
|
||
|
@@ -100,9 +100,11 @@ static bool initialize_interfaces(void)
|
||
|
return false;
|
||
|
}
|
||
|
#endif
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
if (!smb_register_ndr_interface(&ndr_table_samr)) {
|
||
|
return false;
|
||
|
}
|
||
|
+#endif
|
||
|
#ifdef NETLOGON_SUPPORT
|
||
|
if (!smb_register_ndr_interface(&ndr_table_netlogon)) {
|
||
|
return false;
|
||
|
--- a/source3/rpc_server/rpc_ep_setup.c
|
||
|
+++ b/source3/rpc_server/rpc_ep_setup.c
|
||
|
@@ -557,6 +557,7 @@ static bool lsarpc_init_cb(void *ptr)
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
static bool samr_init_cb(void *ptr)
|
||
|
{
|
||
|
struct dcesrv_ep_context *ep_ctx =
|
||
|
@@ -605,6 +606,7 @@ static bool samr_init_cb(void *ptr)
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
+#endif
|
||
|
|
||
|
#ifdef NETLOGON_SUPPORT
|
||
|
static bool netlogon_init_cb(void *ptr)
|
||
|
@@ -1111,12 +1113,14 @@ bool dcesrv_ep_setup(struct tevent_conte
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
samr_cb.init = samr_init_cb;
|
||
|
samr_cb.shutdown = NULL;
|
||
|
samr_cb.private_data = ep_ctx;
|
||
|
if (!NT_STATUS_IS_OK(rpc_samr_init(&samr_cb))) {
|
||
|
return false;
|
||
|
}
|
||
|
+#endif
|
||
|
|
||
|
#ifdef NETLOGON_SUPPORT
|
||
|
netlogon_cb.init = netlogon_init_cb;
|
||
|
--- a/source3/smbd/server_exit.c
|
||
|
+++ b/source3/smbd/server_exit.c
|
||
|
@@ -160,7 +160,9 @@ static void exit_server_common(enum serv
|
||
|
#ifdef NETLOGON_SUPPORT
|
||
|
rpc_netlogon_shutdown();
|
||
|
#endif
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
rpc_samr_shutdown();
|
||
|
+#endif
|
||
|
rpc_lsarpc_shutdown();
|
||
|
}
|
||
|
|
||
|
--- a/source3/rpcclient/rpcclient.c
|
||
|
+++ b/source3/rpcclient/rpcclient.c
|
||
|
@@ -623,7 +623,9 @@ static struct cmd_set *rpcclient_command
|
||
|
rpcclient_commands,
|
||
|
lsarpc_commands,
|
||
|
ds_commands,
|
||
|
+#ifdef SAMR_SUPPORT
|
||
|
samr_commands,
|
||
|
+#endif
|
||
|
#ifdef PRINTER_SUPPORT
|
||
|
spoolss_commands,
|
||
|
#endif
|
||
|
--- a/source3/smbd/lanman.c
|
||
|
+++ b/source3/smbd/lanman.c
|
||
|
@@ -2353,6 +2353,10 @@ static bool api_RNetGroupEnum(struct smb
|
||
|
NTSTATUS status, result;
|
||
|
struct dcerpc_binding_handle *b;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
if (!str1 || !str2 || !p) {
|
||
|
return False;
|
||
|
}
|
||
|
@@ -2541,6 +2545,10 @@ static bool api_NetUserGetGroups(struct
|
||
|
NTSTATUS status, result;
|
||
|
struct dcerpc_binding_handle *b;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
if (!str1 || !str2 || !UserName || !p) {
|
||
|
return False;
|
||
|
}
|
||
|
@@ -2733,6 +2741,10 @@ static bool api_RNetUserEnum(struct smbd
|
||
|
|
||
|
struct dcerpc_binding_handle *b;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
if (!str1 || !str2 || !p) {
|
||
|
return False;
|
||
|
}
|
||
|
@@ -2979,6 +2991,10 @@ static bool api_SetUserPassword(struct s
|
||
|
int min_pwd_length;
|
||
|
struct dcerpc_binding_handle *b = NULL;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
/* Skip 2 strings. */
|
||
|
p = skip_string(param,tpscnt,np);
|
||
|
p = skip_string(param,tpscnt,p);
|
||
|
@@ -3224,6 +3240,10 @@ static bool api_SamOEMChangePassword(str
|
||
|
int bufsize;
|
||
|
struct dcerpc_binding_handle *b;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
*rparam_len = 4;
|
||
|
*rparam = smb_realloc_limit(*rparam,*rparam_len);
|
||
|
if (!*rparam) {
|
||
|
@@ -4265,6 +4285,10 @@ static bool api_RNetUserGetInfo(struct s
|
||
|
union samr_UserInfo *info;
|
||
|
struct dcerpc_binding_handle *b = NULL;
|
||
|
|
||
|
+#ifndef SAMR_SUPPORT
|
||
|
+ return False;
|
||
|
+#endif
|
||
|
+
|
||
|
if (!str1 || !str2 || !UserName || !p) {
|
||
|
return False;
|
||
|
}
|