summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-27 14:35:30 -0800
committerJeremy Allison <jra@samba.org>2007-11-27 14:35:30 -0800
commit6b6655edd90850d09c7711fc3b9fe98271e3e625 (patch)
treefd0247dcf84688d1f6bdba2253d05f6dd0fe0787 /source3/rpc_client
parentf642ae837507e755d5949a61ea5ad70c7b334385 (diff)
downloadsamba-6b6655edd90850d09c7711fc3b9fe98271e3e625.tar.gz
samba-6b6655edd90850d09c7711fc3b9fe98271e3e625.tar.bz2
samba-6b6655edd90850d09c7711fc3b9fe98271e3e625.zip
Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy. (This used to be commit 0002a9e96b0ef78316295a6eb94ff29b64e2f988)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_ds.c4
-rw-r--r--source3/rpc_client/cli_lsarpc.c10
-rw-r--r--source3/rpc_client/cli_srvsvc.c44
3 files changed, 29 insertions, 29 deletions
diff --git a/source3/rpc_client/cli_ds.c b/source3/rpc_client/cli_ds.c
index 172445409e..71516b89f2 100644
--- a/source3/rpc_client/cli_ds.c
+++ b/source3/rpc_client/cli_ds.c
@@ -121,13 +121,13 @@ NTSTATUS rpccli_ds_enum_domain_trusts(struct rpc_pipe_client *cli,
}
if (r.domains.trusts[i].netbios_ptr) {
- (*trusts)[i].netbios_domain = unistr2_tdup( mem_ctx, &r.domains.trusts[i].netbios_domain );
+ (*trusts)[i].netbios_domain = unistr2_to_ascii_talloc( mem_ctx, &r.domains.trusts[i].netbios_domain );
} else {
(*trusts)[i].netbios_domain = NULL;
}
if (r.domains.trusts[i].dns_ptr) {
- (*trusts)[i].dns_domain = unistr2_tdup( mem_ctx, &r.domains.trusts[i].dns_domain );
+ (*trusts)[i].dns_domain = unistr2_to_ascii_talloc( mem_ctx, &r.domains.trusts[i].dns_domain );
} else {
(*trusts)[i].dns_domain = NULL;
}
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 7e3ce04d6c..6abc67fc35 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -573,7 +573,7 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
case 3:
if (domain_name && (r.ctr.info.id3.buffer_dom_name != 0)) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_to_ascii_talloc(mem_ctx,
&r.ctr.info.id3.
uni_domain_name);
if (!*domain_name) {
@@ -594,7 +594,7 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
case 5:
if (domain_name && (r.ctr.info.id5.buffer_dom_name != 0)) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_to_ascii_talloc(mem_ctx,
&r.ctr.info.id5.
uni_domain_name);
if (!*domain_name) {
@@ -668,7 +668,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
ZERO_STRUCTP(domain_guid);
if (domain_name && r.ctr.info.id12.hdr_nb_dom_name.buffer) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_to_ascii_talloc(mem_ctx,
&r.ctr.info.id12
.uni_nb_dom_name);
if (!*domain_name) {
@@ -676,7 +676,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
}
}
if (dns_name && r.ctr.info.id12.hdr_dns_dom_name.buffer) {
- *dns_name = unistr2_tdup(mem_ctx,
+ *dns_name = unistr2_to_ascii_talloc(mem_ctx,
&r.ctr.info.id12
.uni_dns_dom_name);
if (!*dns_name) {
@@ -684,7 +684,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
}
}
if (forest_name && r.ctr.info.id12.hdr_forest_name.buffer) {
- *forest_name = unistr2_tdup(mem_ctx,
+ *forest_name = unistr2_to_ascii_talloc(mem_ctx,
&r.ctr.info.id12
.uni_forest_name);
if (!*forest_name) {
diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c
index 50a68102a3..e5d9b4cdad 100644
--- a/source3/rpc_client/cli_srvsvc.c
+++ b/source3/rpc_client/cli_srvsvc.c
@@ -126,11 +126,11 @@ WERROR rpccli_srvsvc_net_share_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_netname);
if (s)
init_unistr2(&info1->info_1_str.uni_netname, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_remark);
if (s)
init_unistr2(&info1->info_1_str.uni_remark, s, UNI_STR_TERMINATE);
@@ -156,19 +156,19 @@ WERROR rpccli_srvsvc_net_share_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_netname);
if (s)
init_unistr2(&info2->info_2_str.uni_netname, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_remark);
if (s)
init_unistr2(&info2->info_2_str.uni_remark, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_path);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_path);
if (s)
init_unistr2(&info2->info_2_str.uni_path, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_passwd);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_passwd);
if (s)
init_unistr2(&info2->info_2_str.uni_passwd, s, UNI_STR_TERMINATE);
}
@@ -193,19 +193,19 @@ WERROR rpccli_srvsvc_net_share_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_netname);
if (s)
init_unistr2(&info502->info_502_str.uni_netname, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_remark);
if (s)
init_unistr2(&info502->info_502_str.uni_remark, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_path);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_path);
if (s)
init_unistr2(&info502->info_502_str.uni_path, s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_passwd);
+ s = unistr2_to_ascii_talloc(mem_ctx, &r.ctr.share.info502[i].info_502_str.uni_passwd);
if (s)
init_unistr2(&info502->info_502_str.uni_passwd, s, UNI_STR_TERMINATE);
@@ -271,12 +271,12 @@ WERROR rpccli_srvsvc_net_share_get_info(struct rpc_pipe_client *cli,
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &info1_str->uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info1_str->uni_netname);
if (s)
init_unistr2(&info1_str->uni_netname,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info1_str->uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info1_str->uni_remark);
if (s)
init_unistr2(&info1_str->uni_remark,
s, UNI_STR_TERMINATE);
@@ -294,22 +294,22 @@ WERROR rpccli_srvsvc_net_share_get_info(struct rpc_pipe_client *cli,
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &info2_str->uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info2_str->uni_netname);
if (s)
init_unistr2(&info2_str->uni_netname,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info2_str->uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info2_str->uni_remark);
if (s)
init_unistr2(&info2_str->uni_remark,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info2_str->uni_path);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info2_str->uni_path);
if (s)
init_unistr2(&info2_str->uni_path,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info2_str->uni_passwd);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info2_str->uni_passwd);
if (s)
init_unistr2(&info2_str->uni_passwd,
s, UNI_STR_TERMINATE);
@@ -328,22 +328,22 @@ WERROR rpccli_srvsvc_net_share_get_info(struct rpc_pipe_client *cli,
/* Duplicate strings */
- s = unistr2_tdup(mem_ctx, &info502_str->uni_netname);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info502_str->uni_netname);
if (s)
init_unistr2(&info502_str->uni_netname,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info502_str->uni_remark);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info502_str->uni_remark);
if (s)
init_unistr2(&info502_str->uni_remark,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info502_str->uni_path);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info502_str->uni_path);
if (s)
init_unistr2(&info502_str->uni_path,
s, UNI_STR_TERMINATE);
- s = unistr2_tdup(mem_ctx, &info502_str->uni_passwd);
+ s = unistr2_to_ascii_talloc(mem_ctx, &info502_str->uni_passwd);
if (s)
init_unistr2(&info502_str->uni_passwd,
s, UNI_STR_TERMINATE);
@@ -564,12 +564,12 @@ WERROR rpccli_srvsvc_net_file_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
/* Duplicate strings */
- if ( (s = unistr2_tdup(mem_ctx, r.ctr.file.info3[i].path)) != NULL ) {
+ if ( (s = unistr2_to_ascii_talloc(mem_ctx, r.ctr.file.info3[i].path)) != NULL ) {
info3->path = TALLOC_P( mem_ctx, UNISTR2 );
init_unistr2(info3->path, s, UNI_STR_TERMINATE);
}
- if ( (s = unistr2_tdup(mem_ctx, r.ctr.file.info3[i].user)) != NULL ) {
+ if ( (s = unistr2_to_ascii_talloc(mem_ctx, r.ctr.file.info3[i].user)) != NULL ) {
info3->user = TALLOC_P( mem_ctx, UNISTR2 );
init_unistr2(info3->user, s, UNI_STR_TERMINATE);
}