diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-15 05:47:29 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-15 05:47:29 +0000 |
commit | a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0 (patch) | |
tree | d5f55708810d375cb906e8deea7dd21e522be07f /source3/rpc_client | |
parent | ba22030ed7e81749116191bce26e948ebf35e2cb (diff) | |
download | samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.tar.gz samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.tar.bz2 samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.zip |
bug-fixing against:
AS/U:
it returns dce/rpc "first" and "last" bits _clear_ in a bind/ack
response, when they should be set in a (small) packet. they also,
in the bind/ack do not set a secondary address string at all, so
we can't check against that...
Win95:
client-side dce/rpc code is a bit odd. it does a "WaitNamedPipeState"
and has slightly different pipe-naming (\PIPE\LANMAN is joined by
\PIPE\SRVSVC, \PIPE\WINREG etc whereas nt just has \PIPE\LANMAN
and \PIPE\).
Win95-USRMGR.EXE:
added LsaOpenPolicy (renamed existing to LsaOpenPolicy2).
added SamrConnect (renamed existing to SamrConnect2).
(This used to be commit a7fccd807b938cbb51002ebae8c7a48b40dbb655)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 26 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 3 |
2 files changed, 24 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 405b6abe66..4ea38fa828 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -51,7 +51,7 @@ static BOOL rpc_read(struct cli_state *cli, prs_struct *rdata, uint32 data_to_read, uint32 rdata_offset) { - int size = 0x1630; + int size = cli->max_recv_frag; int file_offset = rdata_offset; int num_read; char *data = rdata->data->data; @@ -249,6 +249,8 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, setup[0] = cmd; setup[1] = cli->nt_pipe_fnum; /* pipe file handle. got this from an SMBOpenX. */ + DEBUG(5,("rpc_api_pipe: cmd:%x fnum:%x\n", cmd, cli->nt_pipe_fnum)); + /* send the data: receive a response. */ if (!cli_api_pipe(cli, "\\PIPE\\\0\0\0", 8, setup, 2, 0, /* Setup, length, max */ @@ -278,6 +280,16 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, return False; } + if (rhdr.pkt_type == RPC_BINDACK) + { + if (!last && !first) + { + DEBUG(5,("rpc_api_pipe: bug in AS/U, setting fragment first/last ON\n")); + first = True; + last = True; + } + } + if (rhdr.pkt_type == RPC_RESPONSE) { RPC_HDR_RESP rhdr_resp; @@ -731,7 +743,7 @@ static BOOL check_bind_response(RPC_HDR_BA *hdr_ba, char *pipe_name, RPC_IFACE * { int i = 0; - while ((pipe_names[i].client_pipe != NULL)) + while ((pipe_names[i].client_pipe != NULL) && hdr_ba->addr.len > 0) { DEBUG(6,("bind_rpc_pipe: searching pipe name: client:%s server:%s\n", pipe_names[i].client_pipe , pipe_names[i].server_pipe )); @@ -746,10 +758,10 @@ static BOOL check_bind_response(RPC_HDR_BA *hdr_ba, char *pipe_name, RPC_IFACE * } else { - DEBUG(2,("bind_rpc_pipe: pipe_name %s != expected pipe %s\n", + DEBUG(4,("bind_rpc_pipe: pipe_name %s != expected pipe %s. oh well!\n", pipe_names[i].server_pipe , hdr_ba->addr.str)); - return False; + break; } } else @@ -853,6 +865,12 @@ static BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name, valid_ack = check_bind_response(&hdr_ba, pipe_name, transfer); } + if (valid_ack) + { + cli->max_xmit_frag = hdr_ba.bba.max_tsize; + cli->max_recv_frag = hdr_ba.bba.max_rsize; + } + if (valid_ack && ntlmssp_auth) { smb_io_rpc_hdr_auth("", &rhdr_auth, &rdata, 0); diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 9fe4c0a16a..fae96b561c 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -186,13 +186,14 @@ BOOL do_samr_unknown_38(struct cli_state *cli, char *srv_name) samr_io_r_unknown_38("", &r_e, &rdata, 0); p = rdata.offset != 0; +#if 0 if (p && r_e.status != 0) { /* report error code */ DEBUG(0,("SAMR_R_UNKNOWN_38: %s\n", get_nt_error_msg(r_e.status))); p = False; } - +#endif if (p) { valid_un8 = True; |