summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-16 22:08:59 +0200
committerVolker Lendecke <vl@samba.org>2008-07-16 23:19:47 +0200
commit1bd72938176fc49c7fedd499e4860da0c78a871b (patch)
tree8c8e802d25846653c21a49c443935a78d1f835b9
parent6e6d4c1f5bd8c53e259a51ef1953f384a12bef7d (diff)
downloadsamba-1bd72938176fc49c7fedd499e4860da0c78a871b.tar.gz
samba-1bd72938176fc49c7fedd499e4860da0c78a871b.tar.bz2
samba-1bd72938176fc49c7fedd499e4860da0c78a871b.zip
In api_pipe_bind_req(), decode the bind request before checking the pipe
(This used to be commit 8be41382ed9bb4fb44a1846fff2c7652388e4f28)
-rw-r--r--source3/rpc_server/srv_pipe.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 80e2b2f9a9..f8ec4bfc91 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1565,6 +1565,16 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
DEBUG(5,("api_pipe_bind_req: decode request. %d\n", __LINE__));
+ ZERO_STRUCT(hdr_rb);
+
+ /* decode the bind request */
+
+ if(!smb_io_rpc_hdr_rb("", &hdr_rb, rpc_in_p, 0)) {
+ DEBUG(0,("api_pipe_bind_req: unable to unmarshall RPC_HDR_RB "
+ "struct.\n"));
+ goto err_exit;
+ }
+
/*
* Try and find the correct pipe name to ensure
* that this is a pipe name we support.
@@ -1606,14 +1616,6 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
}
}
- ZERO_STRUCT(hdr_rb);
-
- /* decode the bind request */
- if(!smb_io_rpc_hdr_rb("", &hdr_rb, rpc_in_p, 0)) {
- DEBUG(0,("api_pipe_bind_req: unable to unmarshall RPC_HDR_RB struct.\n"));
- goto err_exit;
- }
-
/* name has to be \PIPE\xxxxx */
fstrcpy(ack_pipe_name, "\\PIPE\\");
fstrcat(ack_pipe_name, p->pipe_srv_name);