summaryrefslogtreecommitdiffstats
path: root/source/rpc_client/cli_lsarpc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-09 23:48:58 +0000
committerJeremy Allison <jra@samba.org>2001-03-09 23:48:58 +0000
commit0cd37c831d79a12a10e479bf4fa89ffe64c1292a (patch)
tree24a22873ca012678363541218f9581836a2021a3 /source/rpc_client/cli_lsarpc.c
parent1d84da779a0fe3219d77686a493d2b2fa1f8072a (diff)
downloadsamba-0cd37c831d79a12a10e479bf4fa89ffe64c1292a.tar.gz
samba-0cd37c831d79a12a10e479bf4fa89ffe64c1292a.tar.xz
samba-0cd37c831d79a12a10e479bf4fa89ffe64c1292a.zip
Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.
We were reading the endainness in the RPC header and then never propagating it to the internal parse_structs used to parse the data. Also removed the "align" argument to prs_init as it was *always* set to 4, and if needed can be set differently on a case by case basis. Now ready for AS/U testing when Herb gets it set up :-). Jeremy.
Diffstat (limited to 'source/rpc_client/cli_lsarpc.c')
-rw-r--r--source/rpc_client/cli_lsarpc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c
index 9ba13552bc5..649be20a52f 100644
--- a/source/rpc_client/cli_lsarpc.c
+++ b/source/rpc_client/cli_lsarpc.c
@@ -43,8 +43,8 @@ BOOL do_lsa_open_policy(struct cli_state *cli,
if (hnd == NULL)
return False;
- prs_init(&buf , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, 4, cli->mem_ctx, UNMARSHALL );
+ prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
/* create and send a MSRPC command with api LSA_OPENPOLICY */
@@ -114,8 +114,8 @@ BOOL do_lsa_query_info_pol(struct cli_state *cli,
if (hnd == NULL || domain_name == NULL || domain_sid == NULL)
return False;
- prs_init(&buf , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, 4, cli->mem_ctx, UNMARSHALL );
+ prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
/* create and send a MSRPC command with api LSA_QUERYINFOPOLICY */
@@ -213,8 +213,8 @@ BOOL do_lsa_close(struct cli_state *cli, POLICY_HND *hnd)
/* create and send a MSRPC command with api LSA_OPENPOLICY */
- prs_init(&buf , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, 4, cli->mem_ctx, UNMARSHALL );
+ prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
DEBUG(4,("LSA Close\n"));
@@ -305,8 +305,8 @@ uint32 lsa_open_policy(const char *system_name, POLICY_HND *hnd,
if (hnd == NULL) return NT_STATUS_UNSUCCESSFUL;
- prs_init(&buf, MAX_PDU_FRAG_LEN, 4, NULL, False);
- prs_init(&rbuf, 0, 4, NULL, True);
+ prs_init(&buf, MAX_PDU_FRAG_LEN, NULL, MARSHALL);
+ prs_init(&rbuf, 0, NULL, UNMARSHALL);
/* create and send a MSRPC command with api LSA_OPENPOLICY */
@@ -371,8 +371,8 @@ uint32 lsa_close(POLICY_HND *hnd)
/* Create and send a MSRPC command with api LSA_OPENPOLICY */
- prs_init(&buf, MAX_PDU_FRAG_LEN, 4, NULL, False);
- prs_init(&rbuf, 0, 4, NULL, True);
+ prs_init(&buf, MAX_PDU_FRAG_LEN, NULL, MARSHALL);
+ prs_init(&rbuf, 0, NULL, UNMARSHALL);
DEBUG(4, ("LSA Close\n"));
@@ -437,8 +437,8 @@ uint32 lsa_lookup_sids(POLICY_HND *hnd, int num_sids, DOM_SID *sids,
*names = NULL;
}
- prs_init(&buf, MAX_PDU_FRAG_LEN, 4, ctx, False);
- prs_init(&rbuf, 0, 4, ctx, True);
+ prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL);
+ prs_init(&rbuf, 0, ctx, UNMARSHALL);
/* Create and send a MSRPC command with api LSA_LOOKUP_SIDS */
@@ -580,8 +580,8 @@ uint32 lsa_lookup_names(POLICY_HND *hnd, int num_names, char **names,
if (hnd == NULL || num_sids == 0 || sids == NULL) return False;
- prs_init(&buf, MAX_PDU_FRAG_LEN, 4, ctx, False);
- prs_init(&rbuf, 0, 4, ctx, True);
+ prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL);
+ prs_init(&rbuf, 0, ctx, UNMARSHALL);
/* create and send a MSRPC command with api LSA_LOOKUP_NAMES */