summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/smb_macros.h1
-rw-r--r--source3/smbd/error.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 15789a938a..7c786b03c8 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -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__)
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 023e1b7dcc..dd9ff85640 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -140,6 +140,14 @@ void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
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)
{