summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-08-18 19:05:27 +0200
committerSimo Sorce <idra@samba.org>2011-08-21 09:05:07 -0400
commit8efdac83ff764de66f3fba63faf6c8fddc409c03 (patch)
tree5f57e0d47e2eca579096520e52f33ace2b0cc459
parentb501f6f75823b98ac349affe8e6e1bd7ba76cd3e (diff)
downloadsamba-8efdac83ff764de66f3fba63faf6c8fddc409c03.tar.gz
samba-8efdac83ff764de66f3fba63faf6c8fddc409c03.tar.xz
samba-8efdac83ff764de66f3fba63faf6c8fddc409c03.zip
s3-lsasd: Add missing ncalrpc listeners.
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
-rw-r--r--source3/rpc_server/lsasd.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c
index 9855641036..5eb0fe5617 100644
--- a/source3/rpc_server/lsasd.c
+++ b/source3/rpc_server/lsasd.c
@@ -644,6 +644,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
goto done;
}
+ fd = create_dcerpc_ncalrpc_socket("lsarpc");
+ if (fd < 0) {
+ ok = false;
+ goto done;
+ }
+ listen_fd[*listen_fd_size] = fd;
+ (*listen_fd_size)++;
+
+ rc = listen(fd, pf_lsasd_cfg.max_allowed_clients);
+ if (rc == -1) {
+ DEBUG(0, ("Failed to listen on lsarpc ncalrpc - %s\n",
+ strerror(errno)));
+ ok = false;
+ goto done;
+ }
+
v = dcerpc_binding_vector_dup(tmp_ctx, v_orig);
if (v == NULL) {
ok = false;
@@ -661,6 +677,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
goto done;
}
+ status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "lsarpc");
+ if (!NT_STATUS_IS_OK(status)) {
+ ok = false;
+ goto done;
+ }
+
status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_lsarpc, v);
if (!NT_STATUS_IS_OK(status)) {
ok = false;
@@ -684,6 +706,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
listen_fd[*listen_fd_size] = fd;
(*listen_fd_size)++;
+ fd = create_dcerpc_ncalrpc_socket("samr");
+ if (fd < 0) {
+ ok = false;
+ goto done;
+ }
+ listen_fd[*listen_fd_size] = fd;
+ (*listen_fd_size)++;
+
+ rc = listen(fd, pf_lsasd_cfg.max_allowed_clients);
+ if (rc == -1) {
+ DEBUG(0, ("Failed to listen on samr ncalrpc - %s\n",
+ strerror(errno)));
+ ok = false;
+ goto done;
+ }
+
v = dcerpc_binding_vector_dup(tmp_ctx, v_orig);
if (v == NULL) {
ok = false;
@@ -701,6 +739,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
goto done;
}
+ status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "samr");
+ if (!NT_STATUS_IS_OK(status)) {
+ ok = false;
+ goto done;
+ }
+
status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_samr, v);
if (!NT_STATUS_IS_OK(status)) {
ok = false;
@@ -724,6 +768,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
listen_fd[*listen_fd_size] = fd;
(*listen_fd_size)++;
+ fd = create_dcerpc_ncalrpc_socket("netlogon");
+ if (fd < 0) {
+ ok = false;
+ goto done;
+ }
+ listen_fd[*listen_fd_size] = fd;
+ (*listen_fd_size)++;
+
+ rc = listen(fd, pf_lsasd_cfg.max_allowed_clients);
+ if (rc == -1) {
+ DEBUG(0, ("Failed to listen on netlogon ncalrpc - %s\n",
+ strerror(errno)));
+ ok = false;
+ goto done;
+ }
+
v = dcerpc_binding_vector_dup(tmp_ctx, v_orig);
if (v == NULL) {
ok = false;
@@ -741,6 +801,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx,
goto done;
}
+ status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "netlogon");
+ if (!NT_STATUS_IS_OK(status)) {
+ ok = false;
+ goto done;
+ }
+
status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_netlogon, v);
if (!NT_STATUS_IS_OK(status)) {
ok = false;