diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-13 22:46:09 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:56 +0100 |
commit | d891c0c74a03d797aed1c5ac0329fd9d1d78da63 (patch) | |
tree | 65d0966014ca2bcded71ece2319a7723b03c4d3d /source4/ntvfs/posix | |
parent | 8f687a5faeaf779e88c54bea4f886eb8f410d448 (diff) | |
download | samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.gz samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.bz2 samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.zip |
r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
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 |
4 files changed, 13 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..d9a60e3857 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(global_loadparm), 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; |