diff options
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_rename.c | 9 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 9 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_shortname.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_util.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 1 |
5 files changed, 14 insertions, 10 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c index 5c351b2df2..3b9842db7f 100644 --- a/source4/ntvfs/posix/pvfs_rename.c +++ b/source4/ntvfs/posix/pvfs_rename.c @@ -22,6 +22,7 @@ #include "includes.h" #include "vfs_posix.h" #include "librpc/gen_ndr/security.h" +#include "param/param.h" /* @@ -107,16 +108,16 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx, while (*p2) { codepoint_t c1, c2; size_t c_size1, c_size2; - c1 = next_codepoint(global_smb_iconv_convenience, p1, &c_size1); - c2 = next_codepoint(global_smb_iconv_convenience, p2, &c_size2); + c1 = next_codepoint(lp_iconv_convenience(global_loadparm), p1, &c_size1); + c2 = next_codepoint(lp_iconv_convenience(global_loadparm), p2, &c_size2); if (c2 == '?') { - d += push_codepoint(global_smb_iconv_convenience, d, c1); + d += push_codepoint(lp_iconv_convenience(global_loadparm), d, c1); } else if (c2 == '*') { memcpy(d, p1, strlen(p1)); d += strlen(p1); break; } else { - d += push_codepoint(global_smb_iconv_convenience, d, c2); + d += push_codepoint(lp_iconv_convenience(global_loadparm), d, c2); } p1 += c_size1; diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index f1d701b343..949fa131a4 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -29,8 +29,9 @@ #include "includes.h" #include "vfs_posix.h" #include "system/dir.h" +#include "param/param.h" -/* +/** compare two filename components. This is where the name mangling hook will go */ static int component_compare(struct pvfs_state *pvfs, const char *comp, const char *name) @@ -256,7 +257,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name, while (*p) { size_t c_size; - codepoint_t c = next_codepoint(global_smb_iconv_convenience, p, &c_size); + codepoint_t c = next_codepoint(lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), p, &c_size); switch (c) { case '\\': if (name->has_wildcard) { @@ -340,7 +341,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t if (s == NULL) return NT_STATUS_NO_MEMORY; for (num_components=1, p=s; *p; p += c_size) { - c = next_codepoint(global_smb_iconv_convenience, p, &c_size); + c = next_codepoint(lp_iconv_convenience(global_loadparm), p, &c_size); if (c == '\\') num_components++; } @@ -352,7 +353,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t components[0] = s; for (i=0, p=s; *p; p += c_size) { - c = next_codepoint(global_smb_iconv_convenience, p, &c_size); + c = next_codepoint(lp_iconv_convenience(global_loadparm), p, &c_size); if (c == '\\') { *p = 0; components[++i] = p+1; diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index 68e415000e..083a281819 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -388,7 +388,7 @@ static bool is_legal_name(struct pvfs_mangle_context *ctx, const char *name) { while (*name) { size_t c_size; - codepoint_t c = next_codepoint(global_smb_iconv_convenience, name, &c_size); + codepoint_t c = next_codepoint(lp_iconv_convenience(global_loadparm), name, &c_size); if (c == INVALID_CODEPOINT) { return false; } diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c index b7cba00d9b..b52c3e387b 100644 --- a/source4/ntvfs/posix/pvfs_util.c +++ b/source4/ntvfs/posix/pvfs_util.c @@ -22,6 +22,7 @@ #include "includes.h" #include "vfs_posix.h" +#include "param/param.h" /* return true if a string contains one of the CIFS wildcard characters @@ -181,7 +182,7 @@ uint32_t pvfs_name_hash(const char *key, size_t length) while (*key && length--) { size_t c_size; - codepoint_t c = next_codepoint(global_smb_iconv_convenience, key, &c_size); + codepoint_t c = next_codepoint(lp_iconv_convenience(global_loadparm), key, &c_size); c = toupper_w(c); value *= fnv1_prime; value ^= (uint32_t)c; diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 8e5e5a6942..e058e6f546 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -214,6 +214,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, pvfs->notify_context = notify_init(pvfs, pvfs->ntvfs->ctx->server_id, pvfs->ntvfs->ctx->msg_ctx, + pvfs->ntvfs->ctx->lp_ctx, event_context_find(pvfs), pvfs->ntvfs->ctx->config); |