summaryrefslogtreecommitdiff
path: root/source4/libcli/util
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-14 21:53:05 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-05-31 15:10:20 +1000
commitc004a932c45a4b343814eb2e3f2d611a2dfe7311 (patch)
tree0d1ba093c795abc12d6931a8d7177be723fed3bf /source4/libcli/util
parent4ac4ad21084b0cd09261ca37199c2a89607f86eb (diff)
downloadsamba-c004a932c45a4b343814eb2e3f2d611a2dfe7311.tar.gz
samba-c004a932c45a4b343814eb2e3f2d611a2dfe7311.tar.bz2
samba-c004a932c45a4b343814eb2e3f2d611a2dfe7311.zip
libcli/util Remove ntstatus_check_dos_mapping
This has been set to true since the global loadparm was removed in 2008, and removes an #ifdef SAMBA_BUILD == 4 Andrew Bartlett
Diffstat (limited to 'source4/libcli/util')
-rw-r--r--source4/libcli/util/errormap.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 6392a6208c..23432ca22f 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -570,41 +570,6 @@ static const struct {
{ WERR_OK, NT_STATUS_OK }
};
-bool ntstatus_check_dos_mapping = true;
-
-/*
- check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
-*/
-bool ntstatus_dos_equal(NTSTATUS status1, NTSTATUS status2)
-{
- /* when we negotiate nt status support, we don't want to consider
- the mapping of dos codes, as we want to catch the cases where
- a forced dos code is needed
- */
- if (ntstatus_check_dos_mapping) {
- return NT_STATUS_V(status1) == NT_STATUS_V(status2);
- }
-
- /* otherwise check if the mapping comes out right. Note that it is important
- that we do the mapping only from ntstatus -> dos and not from dos -> ntstatus,
- as that is the mapping that servers must do */
- if (!NT_STATUS_IS_DOS(status1) && NT_STATUS_IS_DOS(status2)) {
- uint8_t eclass;
- uint32_t ecode;
- ntstatus_to_dos(status1, &eclass, &ecode);
- return eclass == NT_STATUS_DOS_CLASS(status2) &&
- ecode == NT_STATUS_DOS_CODE(status2);
- }
- if (NT_STATUS_IS_DOS(status1) && !NT_STATUS_IS_DOS(status2)) {
- uint8_t eclass;
- uint32_t ecode;
- ntstatus_to_dos(status2, &eclass, &ecode);
- return eclass == NT_STATUS_DOS_CLASS(status1) &&
- ecode == NT_STATUS_DOS_CODE(status1);
- }
- return NT_STATUS_V(status1) == NT_STATUS_V(status2);
-}
-
/* Mapping between Unix, and NT error numbers */
static const struct {