summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-02 17:11:20 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-02 17:11:20 +0100
commit62c57cb4006ca8678ac5a94cdd1d31af3f9f0a21 (patch)
tree69385de7f3301219984bf2f8c43d9235bf86127f /source4
parenta1cc27814240bf50bd546dcfc8b80d3838a6a38d (diff)
downloadsamba-62c57cb4006ca8678ac5a94cdd1d31af3f9f0a21.tar.gz
samba-62c57cb4006ca8678ac5a94cdd1d31af3f9f0a21.tar.bz2
samba-62c57cb4006ca8678ac5a94cdd1d31af3f9f0a21.zip
Remove use of global_loadparm when comparing nt status error - use
global variable instead.
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/errormap.c4
-rw-r--r--source4/param/loadparm.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 4260c0dd7d..5c0d0af8d8 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1160,6 +1160,8 @@ static const struct {
{NT_STATUS_OK, WERR_OK}
};
+bool ntstatus_check_dos_mapping = true;
+
/*
check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
*/
@@ -1169,7 +1171,7 @@ bool ntstatus_dos_equal(NTSTATUS status1, NTSTATUS status2)
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);
}
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 201013609e..b79be28ac0 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2480,6 +2480,8 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
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)));