summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c38
-rw-r--r--source3/rpc_client/cli_netlogon.c136
2 files changed, 0 insertions, 174 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 514b8f5dfd..150d55d1c3 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -721,44 +721,6 @@ NTSTATUS rpccli_lsa_enum_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/** Open a LSA user handle
- *
- * @param cli Handle on an initialised SMB connection */
-
-NTSTATUS rpccli_lsa_open_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access,
- POLICY_HND *user_pol)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_OPENACCOUNT q;
- LSA_R_OPENACCOUNT r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise input parameters */
-
- init_lsa_q_open_account(&q, dom_pol, sid, des_access);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_OPENACCOUNT,
- q, r,
- qbuf, rbuf,
- lsa_io_q_open_account,
- lsa_io_r_open_account,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- result = r.status;
-
- if (NT_STATUS_IS_OK(result)) {
- *user_pol = r.pol;
- }
-
- return result;
-}
-
/** Enumerate user privileges
*
* @param cli Handle on an initialised SMB connection */
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 5a0c5816e6..a6167bb851 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -379,142 +379,6 @@ NTSTATUS rpccli_netlogon_logon_ctrl2(struct rpc_pipe_client *cli, TALLOC_CTX *me
return result;
}
-static WERROR pull_domain_controller_info_from_getdcname_reply(TALLOC_CTX *mem_ctx,
- struct DS_DOMAIN_CONTROLLER_INFO **info_out,
- NET_R_DSR_GETDCNAME *r)
-{
- struct DS_DOMAIN_CONTROLLER_INFO *info;
-
- info = TALLOC_ZERO_P(mem_ctx, struct DS_DOMAIN_CONTROLLER_INFO);
- if (!info) {
- return WERR_NOMEM;
- }
-
- if (&r->uni_dc_unc) {
-
- char *tmp;
- tmp = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_dc_unc);
- if (tmp == NULL) {
- return WERR_GENERAL_FAILURE;
- }
- if (*tmp == '\\') tmp += 1;
- if (*tmp == '\\') tmp += 1;
-
- info->domain_controller_name = talloc_strdup(mem_ctx, tmp);
- if (info->domain_controller_name == NULL) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- if (&r->uni_dc_address) {
-
- char *tmp;
- tmp = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_dc_address);
- if (tmp == NULL) {
- return WERR_GENERAL_FAILURE;
- }
- if (*tmp == '\\') tmp += 1;
- if (*tmp == '\\') tmp += 1;
-
- info->domain_controller_address = talloc_strdup(mem_ctx, tmp);
- if (info->domain_controller_address == NULL) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- info->domain_controller_address_type = r->dc_address_type;
-
- info->domain_guid = (struct GUID *)talloc_memdup(
- mem_ctx, &r->domain_guid, sizeof(struct GUID));
- if (!info->domain_guid) {
- return WERR_GENERAL_FAILURE;
- }
-
- if (&r->uni_domain_name) {
- info->domain_name = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_domain_name);
- if (!info->domain_name) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- if (&r->uni_forest_name) {
- info->dns_forest_name = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_forest_name);
- if (!info->dns_forest_name) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- info->flags = r->dc_flags;
-
- if (&r->uni_dc_site_name) {
- info->dc_site_name = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_dc_site_name);
- if (!info->dc_site_name) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- if (&r->uni_client_site_name) {
- info->client_site_name = rpcstr_pull_unistr2_talloc(mem_ctx, &r->uni_client_site_name);
- if (!info->client_site_name) {
- return WERR_GENERAL_FAILURE;
- }
- }
-
- *info_out = info;
-
- return WERR_OK;
-}
-
-/* Dsr_GetDCName */
-
-WERROR rpccli_netlogon_dsr_getdcname(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- const char *server_name,
- const char *domain_name,
- struct GUID *domain_guid,
- struct GUID *site_guid,
- uint32_t flags,
- struct DS_DOMAIN_CONTROLLER_INFO **info_out)
-{
- prs_struct qbuf, rbuf;
- NET_Q_DSR_GETDCNAME q;
- NET_R_DSR_GETDCNAME r;
- char *tmp_str;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialize input parameters */
-
- tmp_str = talloc_asprintf(mem_ctx, "\\\\%s", server_name);
- if (tmp_str == NULL) {
- return WERR_NOMEM;
- }
-
- init_net_q_dsr_getdcname(&q, tmp_str, domain_name, domain_guid,
- site_guid, flags);
-
- /* Marshall data and send request */
-
- CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_DSR_GETDCNAME,
- q, r,
- qbuf, rbuf,
- net_io_q_dsr_getdcname,
- net_io_r_dsr_getdcname,
- WERR_GENERAL_FAILURE);
-
- if (!W_ERROR_IS_OK(r.result)) {
- return r.result;
- }
-
- r.result = pull_domain_controller_info_from_getdcname_reply(mem_ctx, info_out, &r);
- if (!W_ERROR_IS_OK(r.result)) {
- return r.result;
- }
-
- return WERR_OK;
-}
-
/* Sam synchronisation */
NTSTATUS rpccli_netlogon_sam_sync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,