summaryrefslogtreecommitdiffstats
path: root/source/smbd/error.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-04 23:01:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:24 -0500
commita9d1738ebab42ab9bab73f18341d79e086e290b3 (patch)
treeaa8dc4e8271a48dc31e2b7f9879e133ee74cd919 /source/smbd/error.c
parent7f837db6e47af39b4a33e10e745823b19edb3715 (diff)
downloadsamba-a9d1738ebab42ab9bab73f18341d79e086e290b3.tar.gz
samba-a9d1738ebab42ab9bab73f18341d79e086e290b3.tar.xz
samba-a9d1738ebab42ab9bab73f18341d79e086e290b3.zip
r478: Added Volkers fix to be able to force DOS errors when needed.
Jeremy.
Diffstat (limited to 'source/smbd/error.c')
-rw-r--r--source/smbd/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/error.c b/source/smbd/error.c
index 795bf0949cc..9c81d465e7a 100644
--- a/source/smbd/error.c
+++ b/source/smbd/error.c
@@ -42,7 +42,7 @@ int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file
/* We can now delete the auxiliary struct */
free((char *)wbmpx);
fsp->wbmpx_ptr = NULL;
- return error_packet(outbuf,NT_STATUS_OK,eclass,err,line,file);
+ return error_packet(outbuf,NT_STATUS_OK,eclass,err,False,line,file);
}
/****************************************************************************
@@ -76,7 +76,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
}
}
- return error_packet(outbuf,ntstatus,eclass,ecode,line,file);
+ return error_packet(outbuf,ntstatus,eclass,ecode,False,line,file);
}
@@ -85,7 +85,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
****************************************************************************/
int error_packet(char *outbuf,NTSTATUS ntstatus,
- uint8 eclass,uint32 ecode,int line, const char *file)
+ uint8 eclass,uint32 ecode,BOOL force_dos, int line, const char *file)
{
int outsize = set_message(outbuf,0,0,True);
extern uint32 global_client_caps;
@@ -106,7 +106,7 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
* when talking with clients that normally expect nt status codes. JRA.
*/
- if ((lp_nt_status_support() || (SVAL(outbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) && (global_client_caps & CAP_STATUS32)) {
+ if ((lp_nt_status_support() || (SVAL(outbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) && (global_client_caps & CAP_STATUS32) && (!force_dos)) {
if (NT_STATUS_V(ntstatus) == 0 && eclass)
ntstatus = dos_to_ntstatus(eclass, ecode);
SIVAL(outbuf,smb_rcls,NT_STATUS_V(ntstatus));