diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-09 23:48:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-09 23:48:58 +0000 |
commit | 00ab9021b0cc5fe2667d383eb9cc2973072cdaaa (patch) | |
tree | d6444c6041525e86a61c0aa70247dc332aeb1a80 /source3/rpc_client | |
parent | 0bfc10011bd5cacecda8b59c36e80f676e5c7fa3 (diff) | |
download | samba-00ab9021b0cc5fe2667d383eb9cc2973072cdaaa.tar.gz samba-00ab9021b0cc5fe2667d383eb9cc2973072cdaaa.tar.bz2 samba-00ab9021b0cc5fe2667d383eb9cc2973072cdaaa.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.
(This used to be commit 0cd37c831d79a12a10e479bf4fa89ffe64c1292a)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 28 | ||||
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 24 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 44 | ||||
-rw-r--r-- | source3/rpc_client/cli_reg.c | 64 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 44 | ||||
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 52 | ||||
-rw-r--r-- | source3/rpc_client/cli_spoolss_notify.c | 12 | ||||
-rw-r--r-- | source3/rpc_client/cli_srvsvc.c | 20 | ||||
-rw-r--r-- | source3/rpc_client/cli_wkssvc.c | 4 | ||||
-rw-r--r-- | source3/rpc_client/msrpc_spoolss.c | 2 |
10 files changed, 159 insertions, 135 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 9ba13552bc..649be20a52 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/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 */ diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 1ed1db4d0a..493e5ac152 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -64,8 +64,8 @@ BOOL cli_net_logon_ctrl2(struct cli_state *cli, uint32 status_level) NET_Q_LOGON_CTRL2 q_l; BOOL ok = False; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_LOGON_CTRL2 */ @@ -126,8 +126,8 @@ BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan, NET_Q_AUTH_2 q_a; BOOL ok = False; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_AUTH2 */ @@ -216,8 +216,8 @@ BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_ NET_Q_REQ_CHAL q_c; BOOL valid_chal = False; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_REQCHAL */ @@ -281,8 +281,8 @@ BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]) gen_next_creds( cli, &new_clnt_cred); - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_SRV_PWSET */ @@ -354,8 +354,8 @@ static uint32 cli_net_sam_logon_internal(struct cli_state *cli, NET_ID_INFO_CTR gen_next_creds( cli, &new_clnt_cred); - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_SAMLOGON */ @@ -498,8 +498,8 @@ BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr) gen_next_creds( cli, &new_clnt_cred); - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf , 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api NET_SAMLOGOFF */ diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 67cf65a4ff..b4ca34ea7d 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -106,7 +106,7 @@ static BOOL rpc_read(struct cli_state *cli, prs_struct *rdata, uint32 data_to_re } /**************************************************************************** - Checks the header. + Checks the header. This will set the endian bit in the rdata prs_struct. JRA. ****************************************************************************/ static BOOL rpc_check_hdr(prs_struct *rdata, RPC_HDR *rhdr, @@ -114,6 +114,8 @@ static BOOL rpc_check_hdr(prs_struct *rdata, RPC_HDR *rhdr, { DEBUG(5,("rpc_check_hdr: rdata->data_size = %u\n", (uint32)prs_data_size(rdata) )); + /* Next call sets endian bit. */ + if(!smb_io_rpc_hdr("rpc_hdr ", rhdr, rdata, 0)) { DEBUG(0,("rpc_check_hdr: Failed to unmarshall RPC_HDR.\n")); return False; @@ -223,7 +225,12 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata, int len, int memcpy(data, dp, sizeof(data)); - prs_init(&auth_req , 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&auth_req , 0, cli->mem_ctx, UNMARSHALL); + + /* The endianness must be preserved... JRA. */ + + prs_set_endian_data(&auth_req, rdata->bigendian_data); + prs_give_memory(&auth_req, data, RPC_HDR_AUTH_LEN, False); /* @@ -267,7 +274,11 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata, int len, int memcpy(data, dp, RPC_AUTH_NTLMSSP_CHK_LEN); dump_data(100, data, auth_len); - prs_init(&auth_verf, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&auth_verf, 0, cli->mem_ctx, UNMARSHALL); + + /* The endinness must be preserved. JRA. */ + prs_set_endian_data( &auth_verf, rdata->bigendian_data); + prs_give_memory(&auth_verf, data, RPC_AUTH_NTLMSSP_CHK_LEN, False); if(!smb_io_rpc_auth_ntlmssp_chk("auth_sign", &chk, &auth_verf, 0)) { @@ -369,6 +380,8 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, prs_struct *data, pr prs_give_memory(rdata, prdata, rdata_len, True); current_offset = rdata_len; + /* This next call sets the endian bit correctly in rdata. */ + if (!rpc_check_hdr(rdata, &rhdr, &first, &last, &len)) { prs_mem_free(rdata); return False; @@ -446,7 +459,7 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, prs_struct *data, pr * First read the header of the next PDU. */ - prs_init(&hps, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&hps, 0, cli->mem_ctx, UNMARSHALL); prs_give_memory(&hps, hdr_data, sizeof(hdr_data), False); num_read = cli_read(cli, cli->nt_pipe_fnum, hdr_data, 0, RPC_HEADER_LEN+RPC_HDR_RESP_LEN); @@ -463,9 +476,20 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, prs_struct *data, pr return False; } + /* This call sets the endianness in hps. */ + if (!rpc_check_hdr(&hps, &rhdr, &first, &last, &len)) return False; + /* Ensure the endianness in rdata is set correctly - must be same as hps. */ + + if (hps.bigendian_data != rdata->bigendian_data) { + DEBUG(0,("rpc_api_pipe: Error : Endianness changed from %s to %s\n", + rdata->bigendian_data ? "big" : "little", + hps.bigendian_data ? "big" : "little" )); + return False; + } + if(!smb_io_rpc_hdr_resp("rpc_hdr_resp", &rhdr_resp, &hps, 0)) { DEBUG(0,("rpc_api_pipe: Error in unmarshalling RPC_HDR_RESP.\n")); return False; @@ -522,7 +546,7 @@ static BOOL create_rpc_bind_req(prs_struct *rpc_out, BOOL do_auth, uint32 rpc_ca prs_struct auth_info; int auth_len = 0; - prs_init(&auth_info, 0, 4, prs_get_mem_context(rpc_out), MARSHALL); + prs_init(&auth_info, 0, prs_get_mem_context(rpc_out), MARSHALL); if (do_auth) { RPC_HDR_AUTH hdr_auth; @@ -626,7 +650,7 @@ static BOOL create_rpc_bind_resp(struct pwd_info *pwd, * Marshall the variable length data into a temporary parse * struct, pointing into a 4k local buffer. */ - prs_init(&auth_info, 0, 4, prs_get_mem_context(rpc_out), MARSHALL); + prs_init(&auth_info, 0, prs_get_mem_context(rpc_out), MARSHALL); /* * Use the 4k buffer to store the auth info. @@ -784,7 +808,7 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num, * Malloc a parse struct to hold it (and enough for alignments). */ - if(!prs_init(&outgoing_packet, data_len + 8, 4, cli->mem_ctx, MARSHALL)) { + if(!prs_init(&outgoing_packet, data_len + 8, cli->mem_ctx, MARSHALL)) { DEBUG(0,("rpc_api_pipe_req: Failed to malloc %u bytes.\n", (unsigned int)data_len )); return False; } @@ -1022,7 +1046,7 @@ static BOOL rpc_send_auth_reply(struct cli_state *cli, prs_struct *rdata, uint32 pwd_make_lm_nt_owf(&cli->pwd, rhdr_chal.challenge); - prs_init(&rpc_out, 0, 4, cli->mem_ctx, MARSHALL); + prs_init(&rpc_out, 0, cli->mem_ctx, MARSHALL); prs_give_memory( &rpc_out, buffer, sizeof(buffer), False); @@ -1094,7 +1118,7 @@ BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name, char *my_name) if (!valid_pipe_name(pipe_name, &abstract, &transfer)) return False; - prs_init(&rpc_out, 0, 4, cli->mem_ctx, MARSHALL); + prs_init(&rpc_out, 0, cli->mem_ctx, MARSHALL); /* * Use the MAX_PDU_FRAG_LEN buffer to store the bind request. @@ -1110,7 +1134,7 @@ BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name, char *my_name) global_myname, cli->domain, cli->ntlmssp_cli_flgs); /* Initialize the incoming data struct. */ - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* send data on \PIPE\. receive a response */ if (rpc_api_pipe(cli, 0x0026, &rpc_out, &rdata)) { diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index 32439e9b5d..dc547801df 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -86,8 +86,8 @@ BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level, 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 REG_OPEN_HKLM */ @@ -147,8 +147,8 @@ BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level, 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 REG_OPEN_HKU */ @@ -209,8 +209,8 @@ BOOL do_reg_flush_key(struct cli_state *cli, POLICY_HND *hnd) 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 REG_FLUSH_KEY */ @@ -271,8 +271,8 @@ BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd, 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 REG_QUERY_KEY */ @@ -339,8 +339,8 @@ BOOL do_reg_unknown_1a(struct cli_state *cli, POLICY_HND *hnd, uint32 *unk) 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 REG_UNKNOWN_1A */ @@ -399,8 +399,8 @@ BOOL do_reg_query_info(struct cli_state *cli, POLICY_HND *hnd, 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 REG_INFO */ @@ -459,8 +459,8 @@ BOOL do_reg_set_key_sec(struct cli_state *cli, POLICY_HND *hnd, SEC_DESC_BUF *se 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 REG_SET_KEY_SEC */ @@ -515,8 +515,8 @@ BOOL do_reg_get_key_sec(struct cli_state *cli, POLICY_HND *hnd, uint32 *sec_buf_ 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 REG_GET_KEY_SEC */ @@ -581,8 +581,8 @@ BOOL do_reg_delete_val(struct cli_state *cli, POLICY_HND *hnd, char *val_name) 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 REG_DELETE_VALUE */ @@ -638,8 +638,8 @@ BOOL do_reg_delete_key(struct cli_state *cli, POLICY_HND *hnd, char *key_name) 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 REG_DELETE_KEY */ @@ -720,8 +720,8 @@ BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd, 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); init_reg_q_create_key(&q_o, hnd, key_name, key_class, sam_access, sec_buf); @@ -778,8 +778,8 @@ BOOL do_reg_enum_key(struct cli_state *cli, POLICY_HND *hnd, 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 REG_ENUM_KEY */ @@ -841,8 +841,8 @@ BOOL do_reg_create_val(struct cli_state *cli, POLICY_HND *hnd, 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 REG_CREATE_VALUE */ @@ -901,8 +901,8 @@ BOOL do_reg_enum_val(struct cli_state *cli, POLICY_HND *hnd, 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 REG_ENUM_VALUE */ @@ -964,8 +964,8 @@ BOOL do_reg_open_entry(struct cli_state *cli, POLICY_HND *hnd, 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 REG_OPEN_ENTRY */ @@ -1025,8 +1025,8 @@ BOOL do_reg_close(struct cli_state *cli, POLICY_HND *hnd) /* create and send a MSRPC command with api REG_CLOSE */ - 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,("REG Close\n")); diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index f8c10abae1..eb9032f7ce 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -113,8 +113,8 @@ BOOL do_samr_chgpasswd_user(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_CHGPASSWD_USER */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Change User Password. server:%s username:%s\n", srv_name, user_name)); @@ -169,8 +169,8 @@ BOOL do_samr_unknown_38(struct cli_state *cli, char *srv_name) /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Unknown 38 server:%s\n", srv_name)); @@ -225,8 +225,8 @@ BOOL do_samr_query_dom_info(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Unknown 8 switch:%d\n", switch_value)); @@ -287,8 +287,8 @@ BOOL do_samr_enum_dom_users(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Enum SAM DB max size:%x\n", size)); @@ -374,8 +374,8 @@ BOOL do_samr_connect(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_CONNECT */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Open Policy server:%s undoc value:%x\n", srv_name, unknown_0)); @@ -435,8 +435,8 @@ BOOL do_samr_open_user(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_OPEN_USER */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Open User. unk_0: %08x RID:%x\n", unk_0, rid)); @@ -497,8 +497,8 @@ BOOL do_samr_open_domain(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_OPEN_DOMAIN */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); sid_to_string(sid_str, sid); DEBUG(4,("SAMR Open Domain. SID:%s RID:%x\n", sid_str, rid)); @@ -561,8 +561,8 @@ BOOL do_samr_query_unknown_12(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_UNKNOWN_12 */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Query Unknown 12.\n")); @@ -638,8 +638,8 @@ BOOL do_samr_query_usergroups(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_QUERY_USERGROUPS */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Query User Groups.\n")); @@ -700,8 +700,8 @@ BOOL do_samr_query_userinfo(struct cli_state *cli, /* create and send a MSRPC command with api SAMR_QUERY_USERINFO */ - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); DEBUG(4,("SAMR Query User Info. level: %d\n", switch_value)); @@ -769,8 +769,8 @@ BOOL do_samr_close(struct cli_state *cli, POLICY_HND *hnd) if (hnd == NULL) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SAMR_CLOSE_HND */ diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 75e5e66d90..7588ba152f 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -47,8 +47,8 @@ uint32 spoolss_enum_printerdrivers(const char *srv_name, const char *environment if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) return False; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ @@ -106,8 +106,8 @@ uint32 spoolss_enum_printers(uint32 flags, fstring srv_name, uint32 level, if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) return False; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ @@ -165,8 +165,8 @@ uint32 spoolss_enum_ports(fstring srv_name, uint32 level, if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) return False; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMPORTS */ @@ -221,8 +221,8 @@ uint32 spoolss_enum_jobs(const POLICY_HND *hnd, uint32 firstjob, uint32 numofjob if (hnd == NULL) return NT_STATUS_INVALID_PARAMETER; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ @@ -278,8 +278,8 @@ uint32 spoolss_enum_printerdata(const POLICY_HND *hnd, uint32 idx, DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); return False; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMPRINTERDATA*/ @@ -337,8 +337,8 @@ uint32 spoolss_getprinter(const POLICY_HND *hnd, uint32 level, if (hnd == NULL) return NT_STATUS_INVALID_PARAMETER; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ @@ -390,8 +390,8 @@ uint32 spoolss_getprinterdriver(const POLICY_HND *hnd, if (hnd == NULL) return NT_STATUS_INVALID_PARAMETER; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ @@ -464,8 +464,8 @@ BOOL spoolss_open_printer_ex( const char *printername, DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); return False; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_OPENPRINTEREX */ @@ -538,8 +538,8 @@ BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2 DEBUG(0,("spoolss_addprinterex: talloc_init() failed!\n")); return NT_STATUS_ACCESS_DENIED; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUMPORTS */ DEBUG(5,("SPOOLSS Add Printer Ex (Server: %s)\n", srv_name)); @@ -611,8 +611,8 @@ BOOL spoolss_closeprinter(POLICY_HND *hnd) DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); return False; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); DEBUG(4,("SPOOL Close Printer\n")); @@ -671,8 +671,8 @@ uint32 spoolss_getprinterdata(const POLICY_HND *hnd, const UNISTR2 *valuename, DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); return False; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_GETPRINTERDATA */ @@ -726,8 +726,8 @@ uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 le if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) return False; - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, ctx, MARSHALL); - prs_init(&rbuf, 0, 4, ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); + prs_init(&rbuf, 0, ctx, UNMARSHALL); /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ @@ -787,8 +787,8 @@ uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIV DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); return False; } - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, mem_ctx, UNMARSHALL); + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* make the ADDPRINTERDRIVER PDU */ make_spoolss_q_addprinterdriver(mem_ctx, &q_o, srv_name, level, info); diff --git a/source3/rpc_client/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c index acd53ced4c..879a4f129f 100644 --- a/source3/rpc_client/cli_spoolss_notify.c +++ b/source3/rpc_client/cli_spoolss_notify.c @@ -141,8 +141,8 @@ BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 SPOOL_Q_REPLYOPENPRINTER q_s; SPOOL_R_REPLYOPENPRINTER r_s; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf, 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); /* create and send a MSRPC command with api SPOOLSS_REPLYOPENPRINTER */ /* @@ -197,8 +197,8 @@ BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle, SPOOL_Q_REPLY_RRPCN q_s; SPOOL_R_REPLY_RRPCN r_s; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf, 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); /* create and send a MSRPC command with api */ /* @@ -251,8 +251,8 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, SPOOL_Q_REPLYCLOSEPRINTER q_s; SPOOL_R_REPLYCLOSEPRINTER r_s; - prs_init(&buf , 1024, 4, cli->mem_ctx, False); - prs_init(&rbuf, 0, 4, cli->mem_ctx, True ); + prs_init(&buf, 1024, cli->mem_ctx, MARSHALL); + prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); /* create and send a MSRPC command with api */ /* diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c index 4a3aed6d15..d4522714f2 100644 --- a/source3/rpc_client/cli_srvsvc.c +++ b/source3/rpc_client/cli_srvsvc.c @@ -49,8 +49,8 @@ BOOL do_srv_net_srv_conn_enum(struct cli_state *cli, if (server_name == NULL || ctr == NULL || preferred_len == 0) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SRV_NETCONNENUM */ @@ -129,8 +129,8 @@ BOOL do_srv_net_srv_sess_enum(struct cli_state *cli, if (server_name == NULL || ctr == NULL || preferred_len == 0) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SRV_NETSESSENUM */ @@ -206,8 +206,8 @@ BOOL do_srv_net_srv_share_enum(struct cli_state *cli, if (server_name == NULL || preferred_len == 0) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SRV_NETSHAREENUM */ @@ -277,8 +277,8 @@ BOOL do_srv_net_srv_file_enum(struct cli_state *cli, if (server_name == NULL || ctr == NULL || preferred_len == 0) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SRV_NETFILEENUM */ @@ -355,8 +355,8 @@ BOOL do_srv_net_srv_get_info(struct cli_state *cli, if (server_name == NULL || switch_value == 0 || ctr == NULL) return False; - prs_init(&data , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, 4, cli->mem_ctx, UNMARSHALL); + prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); + prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); /* create and send a MSRPC command with api SRV_NET_SRV_GET_INFO */ diff --git a/source3/rpc_client/cli_wkssvc.c b/source3/rpc_client/cli_wkssvc.c index 16968b39e4..5d4ad80707 100644 --- a/source3/rpc_client/cli_wkssvc.c +++ b/source3/rpc_client/cli_wkssvc.c @@ -47,8 +47,8 @@ BOOL do_wks_query_info(struct cli_state *cli, if (server_name == 0 || wks100 == 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 WKS_QUERY_INFO */ diff --git a/source3/rpc_client/msrpc_spoolss.c b/source3/rpc_client/msrpc_spoolss.c index a7a25caaea..bee30de854 100644 --- a/source3/rpc_client/msrpc_spoolss.c +++ b/source3/rpc_client/msrpc_spoolss.c @@ -43,7 +43,7 @@ void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) buffer->ptr = (size!=0)? 1:0; buffer->size=size; buffer->string_at_end=size; - prs_init(&buffer->prs, size, 4, ctx, MARSHALL); + prs_init(&buffer->prs, size, ctx, MARSHALL); buffer->struct_start = prs_offset(&buffer->prs); } |