summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
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);
+}