summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-19 22:40:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:30 -0500
commit0829e1ad1c3646efecf50729f493b9ee72ef0517 (patch)
treefe0ee36b774cdd89a13745fd34be495cd5b4ed83 /source3/smbd/pipes.c
parent36da6cb5847df2754e8f9223e0784da6013c572b (diff)
downloadsamba-0829e1ad1c3646efecf50729f493b9ee72ef0517.tar.gz
samba-0829e1ad1c3646efecf50729f493b9ee72ef0517.tar.bz2
samba-0829e1ad1c3646efecf50729f493b9ee72ef0517.zip
r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy. (This used to be commit 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 52660da2ff..bec2f19f86 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -108,7 +108,7 @@ int reply_open_pipe_and_X(connection_struct *conn,
}
/* Prepare the reply */
- set_message(outbuf,15,0,True);
+ set_message(inbuf,outbuf,15,0,True);
/* Mark the opened file as an existing named pipe in message mode. */
SSVAL(outbuf,smb_vwv9,2);
@@ -162,7 +162,7 @@ int reply_pipe_write(char *inbuf,char *outbuf,int length,int dum_bufsize)
return (UNIXERROR(ERRDOS,ERRnoaccess));
}
- outsize = set_message(outbuf,1,0,True);
+ outsize = set_message(inbuf,outbuf,1,0,True);
SSVAL(outbuf,smb_vwv0,nwritten);
@@ -224,7 +224,7 @@ int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize)
return (UNIXERROR(ERRDOS,ERRnoaccess));
}
- set_message(outbuf,6,0,True);
+ set_message(inbuf,outbuf,6,0,True);
nwritten = (pipe_start_message_raw ? nwritten + 2 : nwritten);
SSVAL(outbuf,smb_vwv2,nwritten);
@@ -260,7 +260,7 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
return(ERROR_DOS(ERRDOS,ERRbadfid));
}
- set_message(outbuf,12,0,True);
+ set_message(inbuf,outbuf,12,0,True);
data = smb_buf(outbuf);
nread = read_from_pipe(p, data, smb_maxcnt, &unused);
@@ -277,7 +277,7 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
p->pnum, smb_mincnt, smb_maxcnt, nread));
/* Ensure we set up the message length to include the data length read. */
- set_message_bcc(outbuf,nread);
+ set_message_bcc(inbuf,outbuf,nread);
return chain_reply(inbuf,outbuf,length,bufsize);
}
@@ -288,7 +288,7 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
int reply_pipe_close(connection_struct *conn, char *inbuf,char *outbuf)
{
smb_np_struct *p = get_rpc_pipe_p(inbuf,smb_vwv0);
- int outsize = set_message(outbuf,0,0,True);
+ int outsize = set_message(inbuf,outbuf,0,0,True);
if (!p) {
return(ERROR_DOS(ERRDOS,ERRbadfid));