summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-04 02:54:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:09 -0500
commit950f6624842628b770bf58424f3b2ab9a7036263 (patch)
treef17c440e8306eb0c1198d49f58717e1fe8ebf05f /source4/include
parentdbd2688c9042faaa44f4d89068a8351523233875 (diff)
downloadsamba-950f6624842628b770bf58424f3b2ab9a7036263.tar.gz
samba-950f6624842628b770bf58424f3b2ab9a7036263.tar.bz2
samba-950f6624842628b770bf58424f3b2ab9a7036263.zip
r8111: fixed the client library to work against w2k3 with nt status codes
disabled. The main change is to turn off spnego, which cannot work at all without nt status codes (w2k3 gives a ERRHRD:ERRgeneral error when you try) I also modified NT_STATUS_EQUAL() to allow for nt->dos code equality, but only when nt status codes are disabled in smb.conf. That keeps all the existing torture code working, while still allowing us to correctly catch the cases where forced dos error codes are needed The dos->ntstatus mapping table has been removed completely, as it doesn't really make sense, is impossible to get right, and with the new dos status handling isn't needed. When matching a nt status code to a dos status code it makes far more sense to map from the nt code to the dos code and compare, rather than the reverse, as the nt->dos mapping is what windows has to do internally, so there really is a valid mapping table. (This used to be commit f21274e07b361ef40fdc0fe23e96f1c9c63a091c)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/nt_status.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/include/nt_status.h b/source4/include/nt_status.h
index e427257aa9..a805a1cfbd 100644
--- a/source4/include/nt_status.h
+++ b/source4/include/nt_status.h
@@ -56,7 +56,9 @@ typedef uint32_t WERROR;
#define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
#define NT_STATUS_IS_ERR(x) ((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000)
-#define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
+/* checking for DOS error mapping here is ugly, but unfortunately the
+ alternative is a very intrusive rewrite of the torture code */
+#define NT_STATUS_EQUAL(x,y) (NT_STATUS_IS_DOS(x)||NT_STATUS_IS_DOS(y)?ntstatus_dos_equal(x,y):NT_STATUS_V(x) == NT_STATUS_V(y))
#define NT_STATUS_HAVE_NO_MEMORY(x) do { \
if (!(x)) {\