summaryrefslogtreecommitdiffstats
path: root/source/libsmb/cli_lsarpc.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
committerGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
commit1e6e5b299c235b513095a76a4cd9fffc41e8fc9c (patch)
tree9f741529073ad411cc7328334e26d3e35b1d33f1 /source/libsmb/cli_lsarpc.c
parenta11c5d7ad07d259d764aede4745d13f8163a8212 (diff)
downloadsamba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.gz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.xz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.zip
beginning to sync up for 2.2.5 release....
Diffstat (limited to 'source/libsmb/cli_lsarpc.c')
-rw-r--r--source/libsmb/cli_lsarpc.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c
index 3234c366568..0a0c5323304 100644
--- a/source/libsmb/cli_lsarpc.c
+++ b/source/libsmb/cli_lsarpc.c
@@ -217,7 +217,10 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/** Lookup a list of sids */
+/** Lookup a list of sids */
+/********************************************************************
+ Converts SIDs to names. Outgoing names are in UNIX charset.
+*********************************************************************/
NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, int num_sids, DOM_SID *sids,
@@ -308,8 +311,8 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
if (dom_idx != 0xffffffff) {
- unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)- 1);
- unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name) - 1);
+ unistr2_to_unix(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)- 1);
+ unistr2_to_unix(name, &t_names.uni_name[i], sizeof(name) - 1);
(*names)[i] = talloc_strdup(mem_ctx, name);
(*domains)[i] = talloc_strdup(mem_ctx, dom_name);
@@ -335,6 +338,9 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
}
/** Lookup a list of names */
+/********************************************************************
+ Converts names to SIDs. Incoming names are in UNIX charset.
+*********************************************************************/
NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, int num_names,
@@ -358,6 +364,7 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Marshall data and send request */
+ /* This call converts from UNIX to DOS charset then to unicode. */
init_q_lookup_names(mem_ctx, &q, pol, num_names, names);
if (!lsa_io_q_lookup_names("", &q, &qbuf, 0) ||
@@ -488,7 +495,7 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
case 3:
if (r.dom.id3.buffer_dom_name != 0) {
- unistr2_to_ascii(domain_name,
+ unistr2_to_unix(domain_name,
&r.dom.id3.
uni_domain_name,
sizeof (fstring) - 1);
@@ -503,7 +510,7 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
case 5:
if (r.dom.id5.buffer_dom_name != 0) {
- unistr2_to_ascii(domain_name, &r.dom.id5.
+ unistr2_to_unix(domain_name, &r.dom.id5.
uni_domain_name,
sizeof (fstring) - 1);
}
@@ -604,7 +611,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx,
for (i = 0; i < r.num_domains; i++) {
fstring tmp;
- unistr2_to_ascii(tmp, &r.uni_domain_name[i],
+ unistr2_to_unix(tmp, &r.uni_domain_name[i],
sizeof(tmp) - 1);
(*domain_names)[i] = talloc_strdup(mem_ctx, tmp);
sid_copy(&(*domain_sids)[i], &r.domain_sid[i].sid);
@@ -688,7 +695,7 @@ NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx,
for (i = 0; i < r.count; i++) {
fstring name;
- unistr2_to_ascii( name, &r.privs[i].name, sizeof(name)-1);
+ unistr2_to_unix( name, &r.privs[i].name, sizeof(name)-1);
(*privs_name)[i] = talloc_strdup(mem_ctx, name);
@@ -745,7 +752,7 @@ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Return output parameters */
- unistr2_to_ascii(description ,&r.desc, sizeof(description)-1);
+ unistr2_to_unix(description ,&r.desc, sizeof(description)-1);
*lang_id_desc = r.lang_id;
done: