svn commit: samba r24311 - in branches/SAMBA_3_2/source: include smbd

metze at samba.org metze at samba.org
Fri Aug 10 10:28:11 GMT 2007


Author: metze
Date: 2007-08-10 10:28:09 +0000 (Fri, 10 Aug 2007)
New Revision: 24311

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24311

Log:
add a reply_force_nterror() macro

metze
Modified:
   branches/SAMBA_3_2/source/include/smb_macros.h
   branches/SAMBA_3_2/source/smbd/error.c


Changeset:
Modified: branches/SAMBA_3_2/source/include/smb_macros.h
===================================================================
--- branches/SAMBA_3_2/source/include/smb_macros.h	2007-08-10 10:15:25 UTC (rev 24310)
+++ branches/SAMBA_3_2/source/include/smb_macros.h	2007-08-10 10:28:09 UTC (rev 24311)
@@ -170,6 +170,7 @@
 #define ERROR_BOTH(status,class,code) error_packet(inbuf,outbuf,class,code,status,__LINE__,__FILE__)
 
 #define reply_nterror(req,status) reply_nt_error(req,status,__LINE__,__FILE__)
+#define reply_force_nterror(req,status) reply_force_nt_error(req,status,__LINE__,__FILE__)
 #define reply_doserror(req,eclass,ecode) reply_dos_error(req,eclass,ecode,__LINE__,__FILE__)
 #define reply_botherror(req,status,eclass,ecode) reply_both_error(req,eclass,ecode,status,__LINE__,__FILE__)
 #define reply_unixerror(req,defclass,deferror) reply_unix_error(req,defclass,deferror,NT_STATUS_OK,__LINE__,__FILE__)

Modified: branches/SAMBA_3_2/source/smbd/error.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/error.c	2007-08-10 10:15:25 UTC (rev 24310)
+++ branches/SAMBA_3_2/source/smbd/error.c	2007-08-10 10:28:09 UTC (rev 24311)
@@ -140,6 +140,14 @@
 	error_packet_set((char *)req->outbuf, 0, 0, ntstatus, line, file);
 }
 
+void reply_force_nt_error(struct smb_request *req, NTSTATUS ntstatus,
+			  int line, const char *file)
+{
+	TALLOC_FREE(req->outbuf);
+	reply_outbuf(req, 0, 0);
+	error_packet_set((char *)req->outbuf, -1, -1, ntstatus, line, file);
+}
+
 void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
 		    int line, const char *file)
 {



More information about the samba-cvs mailing list