summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-15 23:06:23 +0100
committerGünther Deschner <gd@samba.org>2008-01-15 23:07:10 +0100
commite021eb6d7b060bbd06c996a3ab8efe4322aea265 (patch)
tree41cf0bdf540ff279f03f4fdfa503c32697b75d6d /source3
parent767fe3943da1b8c7a507ca7828714c5154eb7568 (diff)
downloadsamba-e021eb6d7b060bbd06c996a3ab8efe4322aea265.tar.gz
samba-e021eb6d7b060bbd06c996a3ab8efe4322aea265.tar.bz2
samba-e021eb6d7b060bbd06c996a3ab8efe4322aea265.zip
Use NDR_PRINT_UNION_STRING instead of NDR_PRINT_UNION_DEBUG in rpcclient.
Guenther (This used to be commit 2c045a8c817b4ec200830c4f8b508c1cd4c4d9aa)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c22
1 files changed, 14 insertions, 8 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)