1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

r24106: Pass fnum instead of buf/offset into get_rpc_pipe_p

This commit is contained in:
Volker Lendecke 2007-07-31 13:14:07 +00:00 committed by Gerald (Jerry) Carter
parent a5e1f9fd29
commit eb353412c6
3 changed files with 6 additions and 8 deletions

View File

@ -1246,10 +1246,8 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn)
Find an rpc pipe given a pipe handle in a buffer and an offset.
****************************************************************************/
smb_np_struct *get_rpc_pipe_p(const char *buf, int where)
smb_np_struct *get_rpc_pipe_p(uint16 pnum)
{
int pnum = SVAL(buf,where);
if (chain_p) {
return chain_p;
}

View File

@ -140,7 +140,7 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
int reply_pipe_write(char *inbuf,char *outbuf,int length,int dum_bufsize)
{
smb_np_struct *p = get_rpc_pipe_p(inbuf,smb_vwv0);
smb_np_struct *p = get_rpc_pipe_p(SVAL(inbuf,smb_vwv0));
uint16 vuid = SVAL(inbuf,smb_uid);
size_t numtowrite = SVAL(inbuf,smb_vwv1);
int nwritten;
@ -185,7 +185,7 @@ int reply_pipe_write(char *inbuf,char *outbuf,int length,int dum_bufsize)
int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize)
{
smb_np_struct *p = get_rpc_pipe_p(inbuf,smb_vwv2);
smb_np_struct *p = get_rpc_pipe_p(SVAL(inbuf,smb_vwv2));
uint16 vuid = SVAL(inbuf,smb_uid);
size_t numtowrite = SVAL(inbuf,smb_vwv10);
int nwritten = -1;
@ -247,7 +247,7 @@ int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize)
int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
{
smb_np_struct *p = get_rpc_pipe_p(inbuf,smb_vwv2);
smb_np_struct *p = get_rpc_pipe_p(SVAL(inbuf,smb_vwv2));
int smb_maxcnt = SVAL(inbuf,smb_vwv5);
int smb_mincnt = SVAL(inbuf,smb_vwv6);
int nread = -1;
@ -292,7 +292,7 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
void reply_pipe_close(connection_struct *conn, struct smb_request *req)
{
smb_np_struct *p = get_rpc_pipe_p((char *)req->inbuf,smb_vwv0);
smb_np_struct *p = get_rpc_pipe_p(SVAL(req->inbuf,smb_vwv0));
if (!p) {
reply_doserror(req, ERRDOS, ERRbadfid);

View File

@ -3244,7 +3244,7 @@ static int call_trans2qpipeinfo(connection_struct *conn, char *inbuf, char *outb
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
p_pipe = get_rpc_pipe_p(params,0);
p_pipe = get_rpc_pipe_p(SVAL(params,0));
if (p_pipe == NULL) {
return ERROR_NT(NT_STATUS_INVALID_HANDLE);
}