summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-07 11:56:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:47 -0500
commit7e921fb96d9310e649a7d73972a0a87af8cb1233 (patch)
tree1895821c52a4938a714ec9a223b8e615269f98ee /source4/include
parent998aab3d29611b712dcf4ee69b07b5ec683a2ebe (diff)
downloadsamba-7e921fb96d9310e649a7d73972a0a87af8cb1233.tar.gz
samba-7e921fb96d9310e649a7d73972a0a87af8cb1233.tar.bz2
samba-7e921fb96d9310e649a7d73972a0a87af8cb1233.zip
r549: added support for DOS error codes in NTSTATUS returns. This uses a
range of NTSTATUS codes that are normally invalid to prevent conflicts with real error codes. use the new DOS facility to fix the ERRbaduid return that volker found (This used to be commit 10fdfb52398857b604fff9684ee65a96d970bdaa)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/nt_status.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/include/nt_status.h b/source4/include/nt_status.h
index 9747f73eb1..d2cf1ceae4 100644
--- a/source4/include/nt_status.h
+++ b/source4/include/nt_status.h
@@ -60,4 +60,12 @@ typedef uint32 WERROR;
#define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0)
#define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y))
+/* this defines special NTSTATUS codes to represent DOS errors. I
+ have chosen this macro to produce status codes in the invalid
+ NTSTATUS range */
+#define NT_STATUS_DOS(class, code) NT_STATUS(0xF1000000 | ((class)<<16) | code)
+#define NT_STATUS_IS_DOS(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF1000000)
+#define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status) >> 16) & 0xFF)
+#define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status) & 0xFFFF)
+
#endif