summaryrefslogtreecommitdiff
path: root/source3/smbd/error.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/error.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/error.c')
-rw-r--r--source3/smbd/error.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 0860b7d1d9..dc35c0fa64 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -29,7 +29,7 @@ extern uint32 global_client_caps;
Create an error packet from a cached error.
****************************************************************************/
-int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file)
+int cached_error_packet(const char *inbuf,char *outbuf,files_struct *fsp,int line,const char *file)
{
write_bmpx_struct *wbmpx = fsp->wbmpx_ptr;
int32 eclass = wbmpx->wr_errclass;
@@ -38,14 +38,14 @@ int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file
/* We can now delete the auxiliary struct */
SAFE_FREE(fsp->wbmpx_ptr);
- return error_packet(outbuf,eclass,err,ntstatus,line,file);
+ return error_packet(inbuf,outbuf,eclass,err,ntstatus,line,file);
}
/****************************************************************************
Create an error packet from errno.
****************************************************************************/
-int unix_error_packet(char *outbuf,int def_class,uint32 def_code, NTSTATUS def_status, int line, const char *file)
+int unix_error_packet(const char *inbuf,char *outbuf,int def_class,uint32 def_code, NTSTATUS def_status, int line, const char *file)
{
int eclass=def_class;
int ecode=def_code;
@@ -66,7 +66,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code, NTSTATUS def_s
}
}
- return error_packet(outbuf,eclass,ecode,ntstatus,line,file);
+ return error_packet(inbuf,outbuf,eclass,ecode,ntstatus,line,file);
}
BOOL use_nt_status(void)
@@ -126,9 +126,9 @@ void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatu
}
}
-int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file)
+int error_packet(const char *inbuf, char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file)
{
- int outsize = set_message(outbuf,0,0,True);
+ int outsize = set_message(inbuf,outbuf,0,0,True);
error_packet_set(outbuf, eclass, ecode, ntstatus, line, file);
return outsize;
}