svn commit: samba r24106 - in branches/SAMBA_3_2/source: rpc_server smbd

vlendec at samba.org vlendec at samba.org
Tue Jul 31 13:14:09 GMT 2007


Author: vlendec
Date: 2007-07-31 13:14:07 +0000 (Tue, 31 Jul 2007)
New Revision: 24106

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24106

Log:
Pass fnum instead of buf/offset into get_rpc_pipe_p
Modified:
   branches/SAMBA_3_2/source/rpc_server/srv_pipe_hnd.c
   branches/SAMBA_3_2/source/smbd/pipes.c
   branches/SAMBA_3_2/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_2/source/rpc_server/srv_pipe_hnd.c
===================================================================
--- branches/SAMBA_3_2/source/rpc_server/srv_pipe_hnd.c	2007-07-31 12:32:01 UTC (rev 24105)
+++ branches/SAMBA_3_2/source/rpc_server/srv_pipe_hnd.c	2007-07-31 13:14:07 UTC (rev 24106)
@@ -1246,10 +1246,8 @@
  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;
 	}

Modified: branches/SAMBA_3_2/source/smbd/pipes.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/pipes.c	2007-07-31 12:32:01 UTC (rev 24105)
+++ branches/SAMBA_3_2/source/smbd/pipes.c	2007-07-31 13:14:07 UTC (rev 24106)
@@ -140,7 +140,7 @@
 
 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_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_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 @@
 
 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);

Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c	2007-07-31 12:32:01 UTC (rev 24105)
+++ branches/SAMBA_3_2/source/smbd/trans2.c	2007-07-31 13:14:07 UTC (rev 24106)
@@ -3244,7 +3244,7 @@
 		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);
 	}



More information about the samba-cvs mailing list