summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-01-20 15:37:46 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-02-02 12:44:20 +0100
commitd0d5d59943ac7958e95279cd8f8be3097e5e7db8 (patch)
treefb29c3fb6fc282bd7adfd853628b44e8ff272e9d /source3/rpc_server
parente3bdfd2d46cb09a42eda1012287bb82af5b8ee9b (diff)
downloadsamba-d0d5d59943ac7958e95279cd8f8be3097e5e7db8.tar.gz
samba-d0d5d59943ac7958e95279cd8f8be3097e5e7db8.tar.bz2
samba-d0d5d59943ac7958e95279cd8f8be3097e5e7db8.zip
s3-smbd: Disable the endpoint mapper by default.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_rpc_register.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_rpc_register.c b/source3/rpc_server/srv_rpc_register.c
index b3e563dd3b..73e2dc766d 100644
--- a/source3/rpc_server/srv_rpc_register.c
+++ b/source3/rpc_server/srv_rpc_register.c
@@ -48,6 +48,15 @@ static NTSTATUS _rpc_ep_register(const struct ndr_interface_table *iface,
{
struct dcerpc_binding_vector *v = NULL;
NTSTATUS status;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "none") == 0) {
+ return NT_STATUS_OK;
+ }
status = dcerpc_binding_vector_create(talloc_tos(),
iface,
@@ -71,6 +80,15 @@ static NTSTATUS _rpc_ep_unregister(const struct ndr_interface_table *iface)
{
struct dcerpc_binding_vector *v = NULL;
NTSTATUS status;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "none") == 0) {
+ return NT_STATUS_OK;
+ }
status = dcerpc_binding_vector_create(talloc_tos(),
iface,
@@ -265,8 +283,16 @@ bool srv_rpc_register(struct messaging_context *msg_ctx) {
struct rpc_srv_callbacks dssetup_cb;
struct rpc_srv_callbacks wkssvc_cb;
- if (!NT_STATUS_IS_OK(rpc_epmapper_init(NULL))) {
- return false;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
+ if (!NT_STATUS_IS_OK(rpc_epmapper_init(NULL))) {
+ return false;
+ }
}
winreg_cb.init = winreg_init_cb;