Loading source3/include/smb_macros.h +4 −3 Original line number Diff line number Diff line Loading @@ -171,9 +171,10 @@ /* these are the datagram types */ #define DGRAM_DIRECT_UNIQUE 0x10 #define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,__LINE__,__FILE__) #define ERROR_NT(status) error_packet(outbuf,status,0,0,__LINE__,__FILE__) #define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,__LINE__,__FILE__) #define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,False,__LINE__,__FILE__) #define ERROR_FORCE_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,True,__LINE__,__FILE__) #define ERROR_NT(status) error_packet(outbuf,status,0,0,False,__LINE__,__FILE__) #define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,False,__LINE__,__FILE__) /* this is how errors are generated */ #define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__) Loading source3/smbd/error.c +4 −4 Original line number Diff line number Diff line Loading @@ -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); } /**************************************************************************** Loading Loading @@ -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); } Loading @@ -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; Loading @@ -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)); Loading source3/smbd/process.c +1 −1 Original line number Diff line number Diff line Loading @@ -736,7 +736,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize if (flags & AS_GUEST) flags &= ~AS_USER; else return(ERROR_DOS(ERRSRV,ERRaccess)); return(ERROR_FORCE_DOS(ERRSRV,ERRbaduid)); } /* this code is to work around a bug is MS client 3 without Loading Loading
source3/include/smb_macros.h +4 −3 Original line number Diff line number Diff line Loading @@ -171,9 +171,10 @@ /* these are the datagram types */ #define DGRAM_DIRECT_UNIQUE 0x10 #define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,__LINE__,__FILE__) #define ERROR_NT(status) error_packet(outbuf,status,0,0,__LINE__,__FILE__) #define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,__LINE__,__FILE__) #define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,False,__LINE__,__FILE__) #define ERROR_FORCE_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,True,__LINE__,__FILE__) #define ERROR_NT(status) error_packet(outbuf,status,0,0,False,__LINE__,__FILE__) #define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,False,__LINE__,__FILE__) /* this is how errors are generated */ #define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__) Loading
source3/smbd/error.c +4 −4 Original line number Diff line number Diff line Loading @@ -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); } /**************************************************************************** Loading Loading @@ -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); } Loading @@ -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; Loading @@ -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)); Loading
source3/smbd/process.c +1 −1 Original line number Diff line number Diff line Loading @@ -736,7 +736,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize if (flags & AS_GUEST) flags &= ~AS_USER; else return(ERROR_DOS(ERRSRV,ERRaccess)); return(ERROR_FORCE_DOS(ERRSRV,ERRbaduid)); } /* this code is to work around a bug is MS client 3 without Loading