summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-10 10:28:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:27 -0500
commita5f412f305ea2bdb0ee0efd5a38385525d4671c8 (patch)
treece6aedf900b0436ec580d512c3ec5466bc7bfeea /source3
parentc25f22562e9e7cfdf193a01f10fe571b748a6d46 (diff)
downloadsamba-a5f412f305ea2bdb0ee0efd5a38385525d4671c8.tar.gz
samba-a5f412f305ea2bdb0ee0efd5a38385525d4671c8.tar.bz2
samba-a5f412f305ea2bdb0ee0efd5a38385525d4671c8.zip
r24311: add a reply_force_nterror() macro
metze (This used to be commit b9ae00f4980c305f2f7334b139f9bc72fd9afbd6)
Diffstat (limited to 'source3')
-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)
{