summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_lsarpc.c
diff options
context:
space:
mode:
authorMatthew Chapman <matty@samba.org>1999-02-12 00:16:09 +0000
committerMatthew Chapman <matty@samba.org>1999-02-12 00:16:09 +0000
commitfd96929ec1fa27e0affd4c4e9ba307c4ee30b978 (patch)
tree6bfb5226bc58be39aaf7cfb954dcb472ea256a11 /source3/rpc_client/cli_lsarpc.c
parentf38bfc7d9aa07c4e21448aa846956bd89a259a65 (diff)
downloadsamba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.tar.gz
samba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.tar.bz2
samba-fd96929ec1fa27e0affd4c4e9ba307c4ee30b978.zip
UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
Diffstat (limited to 'source3/rpc_client/cli_lsarpc.c')
-rw-r--r--source3/rpc_client/cli_lsarpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 4c55572b62..21eba6ddb7 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -331,8 +331,8 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum,
if (dom_idx != 0xffffffff)
{
- fstrcpy(dom_name, unistr2_to_str(&ref.ref_dom[dom_idx].uni_dom_name));
- fstrcpy(name , unistr2_to_str(&t_names.uni_name[i]));
+ unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name));
+ unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name));
memset(full_name, 0, sizeof(full_name));
@@ -427,7 +427,7 @@ BOOL lsa_query_info_pol(struct cli_state *cli, uint16 fnum,
{
if (r_q.dom.id3.buffer_dom_name != 0)
{
- fstrcpy(domain_name, unistr2_to_str(&r_q.dom.id3.uni_domain_name));
+ unistr2_to_ascii(domain_name, &r_q.dom.id3.uni_domain_name, sizeof(domain_name));
}
if (r_q.dom.id3.buffer_dom_sid != 0)
{
@@ -441,7 +441,7 @@ BOOL lsa_query_info_pol(struct cli_state *cli, uint16 fnum,
{
if (r_q.dom.id5.buffer_dom_name != 0)
{
- fstrcpy(domain_name, unistr2_to_str(&r_q.dom.id5.uni_domain_name));
+ unistr2_to_ascii(domain_name, &r_q.dom.id5.uni_domain_name, sizeof(domain_name));
}
if (r_q.dom.id5.buffer_dom_sid != 0)
{