summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 00:45:06 +0000
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 00:45:06 +0000
commit6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa (patch)
tree6d6f4fbb0d3a4a4763c178e32d220c76f3deae0d /source3/rpcclient
parent9788383a6c08189564cd18a824aab4ccdbe57a21 (diff)
parent9a6a5fff9ca387ec698eaae2b3abc6a1937f2bab (diff)
downloadsamba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.tar.gz
samba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.tar.bz2
samba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.zip
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit f963d57096184dd9381fcc5f175150d27460ea7a)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c22
-rw-r--r--source3/rpcclient/rpcclient.c2
2 files changed, 15 insertions, 9 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 7743269ce0..05269d7711 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -916,7 +916,8 @@ static void display_trust_dom_info_4(struct lsa_TrustDomainInfoPassword *p, cons
data_blob_free(&data_old);
}
-static void display_trust_dom_info(union lsa_TrustedDomainInfo *info,
+static void display_trust_dom_info(TALLOC_CTX *mem_ctx,
+ union lsa_TrustedDomainInfo *info,
enum lsa_TrustDomInfoEnum info_class,
const char *pass)
{
@@ -924,12 +925,17 @@ static void display_trust_dom_info(union lsa_TrustedDomainInfo *info,
case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
display_trust_dom_info_4(&info->password, pass);
break;
- default:
- NDR_PRINT_UNION_DEBUG(lsa_TrustedDomainInfo,
- info_class, info);
+ default: {
+ const char *str = NULL;
+ str = NDR_PRINT_UNION_STRING(mem_ctx,
+ lsa_TrustedDomainInfo,
+ info_class, info);
+ if (str) {
+ d_printf("%s\n", str);
+ }
break;
+ }
}
-
}
static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
@@ -967,7 +973,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)
@@ -1015,7 +1021,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobyname(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)
@@ -1069,7 +1075,7 @@ static NTSTATUS cmd_lsa_query_trustdominfo(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- display_trust_dom_info(&info, info_class, cli->pwd.password);
+ display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
done:
if (&pol)
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index dd8b911bb8..081e0fb15e 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -134,7 +134,7 @@ static void fetch_machine_sid(struct cli_state *cli)
POLICY_HND pol;
NTSTATUS result = NT_STATUS_OK;
uint32 info_class = 5;
- char *domain_name = NULL;
+ const char *domain_name = NULL;
static bool got_domain_sid;
TALLOC_CTX *mem_ctx;
DOM_SID *dom_sid = NULL;