global variable instead.
*****************************************************************************/
NTSTATUS nt_status_string_to_code(const char *nt_status_str);
+/** Used by ntstatus_dos_equal: */
+extern bool ntstatus_check_dos_mapping;
+
#define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
#define NT_STATUS_IS_ERR(x) ((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000)
/* checking for DOS error mapping here is ugly, but unfortunately the
{NT_STATUS_OK, WERR_OK}
};
+bool ntstatus_check_dos_mapping = true;
+
/*
check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
*/
the mapping of dos codes, as we want to catch the cases where
a forced dos code is needed
*/
- if (lp_nt_status_support(global_loadparm)) {
+ if (ntstatus_check_dos_mapping) {
return NT_STATUS_V(status1) == NT_STATUS_V(status2);
}
reload_charcnv(lp_ctx);
+ ntstatus_check_dos_mapping = lp_nt_status_support(lp_ctx);
+
/* FIXME: Check locale in environment for this: */
if (strcmp(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)) != 0)
d_set_iconv(smb_iconv_open(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)));