aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/samba36/290-remove_lsa.patch
blob: fe37d5dae12317abbf04e46be4852e08e8bc40d2 (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
--- a/source3/librpc/rpc/rpc_common.c
+++ b/source3/librpc/rpc/rpc_common.c
@@ -92,9 +92,11 @@ bool smb_register_ndr_interface(const st
 
 static bool initialize_interfaces(void)
 {
+#ifdef LSA_SUPPORT
 	if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
 		return false;
 	}
+#endif
 #ifdef ACTIVE_DIRECTORY
 	if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
 		return false;
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -162,7 +162,9 @@ static void exit_server_common(enum serv
 #ifdef SAMR_SUPPORT
 		rpc_samr_shutdown();
 #endif
+#ifdef LSA_SUPPORT
 		rpc_lsarpc_shutdown();
+#endif
 	}
 
 	/*
--- a/source3/rpc_server/rpc_ep_setup.c
+++ b/source3/rpc_server/rpc_ep_setup.c
@@ -508,6 +508,7 @@ static bool srvsvc_init_cb(void *ptr)
 	return true;
 }
 
+#ifdef LSA_SUPPORT
 static bool lsarpc_init_cb(void *ptr)
 {
 	struct dcesrv_ep_context *ep_ctx =
@@ -556,6 +557,7 @@ static bool lsarpc_init_cb(void *ptr)
 
 	return true;
 }
+#endif
 
 #ifdef SAMR_SUPPORT
 static bool samr_init_cb(void *ptr)
@@ -1106,12 +1108,14 @@ bool dcesrv_ep_setup(struct tevent_conte
 	}
 
 
+#ifdef LSA_SUPPORT
 	lsarpc_cb.init         = lsarpc_init_cb;
 	lsarpc_cb.shutdown     = NULL;
 	lsarpc_cb.private_data = ep_ctx;
 	if (!NT_STATUS_IS_OK(rpc_lsarpc_init(&lsarpc_cb))) {
 		return false;
 	}
+#endif
 
 #ifdef SAMR_SUPPORT
 	samr_cb.init         = samr_init_cb;
--- a/source3/rpc_server/rpc_handles.c
+++ b/source3/rpc_server/rpc_handles.c
@@ -63,7 +63,10 @@ static bool is_samr_lsa_pipe(const struc
 #ifdef SAMR_SUPPORT
 		ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id) ||
 #endif
-		ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id);
+#ifdef LSA_SUPPORT
+		ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id) ||
+#endif
+		false;
 }
 
 size_t num_pipe_handles(struct pipes_struct *p)