1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

winbindd: winbindd_list_trusted_domains() -> bool_dispatch_table

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2018-05-04 21:19:06 +02:00
parent 4f8ea6da43
commit 7b11e91759
3 changed files with 8 additions and 7 deletions

View File

@ -529,8 +529,6 @@ static struct winbindd_dispatch_table {
/* Enumeration functions */
{ WINBINDD_LIST_TRUSTDOM, winbindd_list_trusted_domains,
"LIST_TRUSTDOM" },
/* Miscellaneous */
@ -574,6 +572,9 @@ static struct winbindd_bool_dispatch_table {
{ WINBINDD_PRIV_PIPE_DIR,
winbindd_priv_pipe_dir,
"WINBINDD_PRIV_PIPE_DIR" },
{ WINBINDD_LIST_TRUSTDOM,
winbindd_list_trusted_domains,
"LIST_TRUSTDOM" },
};
struct winbindd_async_dispatch_table {

View File

@ -203,25 +203,24 @@ static bool trust_is_transitive(struct winbindd_tdc_domain *domain)
return transitive;
}
void winbindd_list_trusted_domains(struct winbindd_cli_state *state)
bool winbindd_list_trusted_domains(struct winbindd_cli_state *state)
{
struct winbindd_tdc_domain *dom_list = NULL;
size_t num_domains = 0;
int extra_data_len = 0;
char *extra_data = NULL;
int i = 0;
bool ret = false;
DEBUG(3, ("[%5lu]: list trusted domains\n",
(unsigned long)state->pid));
if( !wcache_tdc_fetch_list( &dom_list, &num_domains )) {
request_error(state);
goto done;
}
extra_data = talloc_strdup(state->mem_ctx, "");
if (extra_data == NULL) {
request_error(state);
goto done;
}
@ -269,9 +268,10 @@ void winbindd_list_trusted_domains(struct winbindd_cli_state *state)
state->response->length += extra_data_len;
}
request_ok(state);
ret = true;
done:
TALLOC_FREE( dom_list );
return ret;
}
enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,

View File

@ -381,7 +381,7 @@ struct dcerpc_binding_handle *locator_child_handle(void);
/* The following definitions come from winbindd/winbindd_misc.c */
void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
bool winbindd_list_trusted_domains(struct winbindd_cli_state *state);
enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
void winbindd_show_sequence(struct winbindd_cli_state *state);