diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-30 17:37:46 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-30 17:37:46 +0000 |
commit | c856d9274b1a434b9ef02718e5036b224e350b11 (patch) | |
tree | 7f40c251a2d99b2071e971f1130b1384c4193749 /source3 | |
parent | de1a9986222fa578b129204dec193877b2a09abb (diff) | |
download | samba-c856d9274b1a434b9ef02718e5036b224e350b11.tar.gz samba-c856d9274b1a434b9ef02718e5036b224e350b11.tar.bz2 samba-c856d9274b1a434b9ef02718e5036b224e350b11.zip |
add a few more tidy ups. Now onto winbindd
(This used to be commit f8abdd23e1d4aed56c263c3228e702b191af4c64)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_ds.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/cmd_ds.c | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_ds.c b/source3/rpc_client/cli_ds.c index e73a0b795a..2f2111e963 100644 --- a/source3/rpc_client/cli_ds.c +++ b/source3/rpc_client/cli_ds.c @@ -114,6 +114,14 @@ NTSTATUS cli_ds_enum_domain_trusts(struct cli_state *cli, TALLOC_CTX *mem_ctx, result = r.status; + if ( NT_STATUS_IS_OK(result) ) { + + *num_domains = r.num_domains; + *trusts = (DS_DOMAIN_TRUSTS*)smb_xmalloc(r.num_domains*sizeof(DS_DOMAIN_TRUSTS)); + + memcpy( *trusts, r.domains.trusts, r.num_domains*sizeof(DS_DOMAIN_TRUSTS) ); + } + done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); diff --git a/source3/rpcclient/cmd_ds.c b/source3/rpcclient/cmd_ds.c index be677519c4..721bd59ba0 100644 --- a/source3/rpcclient/cmd_ds.c +++ b/source3/rpcclient/cmd_ds.c @@ -59,6 +59,10 @@ static NTSTATUS cmd_ds_enum_domain_trusts(struct cli_state *cli, result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags, &trusts, &num_domains ); + printf( "%d domains returned\n", num_domains ); + + SAFE_FREE( trusts ); + return result; } |