summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-23 09:36:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:53 -0500
commitcc6a41017c577742af73b4bc60993d8d415ea580 (patch)
treea1705a0b1dedc300c7c728fd4fad6fe53192bf10 /source3/smbd/error.c
parent041204d1a4ec9b19287ca92fa5b291a8eb5ff10b (diff)
downloadsamba-cc6a41017c577742af73b4bc60993d8d415ea580.tar.gz
samba-cc6a41017c577742af73b4bc60993d8d415ea580.tar.bz2
samba-cc6a41017c577742af73b4bc60993d8d415ea580.zip
r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under http://www.samba.org/~vlendec/inbuf-checkin/. Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only checking into 3_2 at the moment, as it currently will slow down operations for all non-converted (i.e. all at this moment) operations, as it will copy the talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort to convert everything necessary for the normal operations an XP box does. I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More to come, but I would appreciate some help here. Volker (This used to be commit 5594af2b208c860d3f4b453af6a649d9e4295d1c)
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r--source3/smbd/error.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 12b57d5ab4..d00c61487a 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -131,3 +131,29 @@ int error_packet(const char *inbuf, char *outbuf, uint8 eclass, uint32 ecode, NT
error_packet_set(outbuf, eclass, ecode, ntstatus, line, file);
return outsize;
}
+
+void reply_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, 0, 0, ntstatus, line, file);
+}
+
+void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+ int line, const char *file)
+{
+ TALLOC_FREE(req->outbuf);
+ reply_outbuf(req, 0, 0);
+ error_packet_set((char *)req->outbuf, eclass, ecode, NT_STATUS_OK, line,
+ file);
+}
+
+void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+ NTSTATUS status, int line, const char *file)
+{
+ TALLOC_FREE(req->outbuf);
+ reply_outbuf(req, 0, 0);
+ error_packet_set((char *)req->outbuf, eclass, ecode, status,
+ line, file);
+}