summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-12 16:23:17 +1000
committerAndrew Tridgell <tridge@samba.org>2011-04-13 14:47:07 +1000
commite3138f2ffef32ee33778e0c068c6009a58536419 (patch)
tree207ab87a4baeb36d43e66cc746fef58a52a4c0fa /source3/lib
parentd458f6b3bd7043bb78953bdc48ee6e2dcb034042 (diff)
downloadsamba-e3138f2ffef32ee33778e0c068c6009a58536419.tar.gz
samba-e3138f2ffef32ee33778e0c068c6009a58536419.tar.xz
samba-e3138f2ffef32ee33778e0c068c6009a58536419.zip
s3-lib Move isvalid83_w to mangle_hash.c
This means that there is no need for the 'valid.dat' table to be loaded by anything other than smbd, so the unloader is also removed. The concept of a 'valid dos character' has been replaced by the hash2 mangle method. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/netapi.c1
-rw-r--r--source3/lib/util.c1
-rw-r--r--source3/lib/util_unistr.c49
3 files changed, 0 insertions, 51 deletions
diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index c04ca702493..cd590273ce2 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -182,7 +182,6 @@ NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx)
gfree_names();
gfree_loadparm();
- gfree_case_tables();
gfree_charcnv();
gfree_interfaces();
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 887d21f1607..0bb46db05f6 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -156,7 +156,6 @@ void gfree_all( void )
{
gfree_names();
gfree_loadparm();
- gfree_case_tables();
gfree_charcnv();
gfree_interfaces();
gfree_debugsyms();
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 90fc6769f9b..18df993b5a6 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -21,11 +21,6 @@
#include "includes.h"
-/* these 3 tables define the unicode case handling. They are loaded
- at startup either via mmap() or read() from the lib directory */
-static uint8 *valid_table;
-static bool initialized;
-
/* Copy into a smb_ucs2_t from a possibly unaligned buffer. Return the copied smb_ucs2_t */
#define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\
((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest))
@@ -36,40 +31,6 @@ static bool initialized;
static int strncmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
-/**
- * Destroy global objects allocated by load_case_tables()
- **/
-void gfree_case_tables(void)
-{
- if ( valid_table ) {
- unmap_file(valid_table, 0x10000);
- valid_table = NULL;
- }
- initialized = false;
-}
-
-/**
- * Load the valid character map table from <tt>valid.dat</tt> or
- * create from the configured codepage.
- *
- * This function is called whenever the configuration is reloaded.
- * However, the valid character table is not changed if it's loaded
- * from a file, because we can't unmap files.
- **/
-
-static void init_valid_table(void)
-{
- if (valid_table) {
- return;
- }
-
- valid_table = (uint8 *)map_file(data_path("valid.dat"), 0x10000);
- if (!valid_table) {
- smb_panic("Could not load valid.dat file required for mangle method=hash");
- return;
- }
-}
-
/*******************************************************************
Write a string in (little-endian) unicode format. src is in
the current DOS codepage. len is the length in bytes of the
@@ -111,16 +72,6 @@ int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src)
}
/*******************************************************************
- Determine if a character is valid in a 8.3 name.
-********************************************************************/
-
-bool isvalid83_w(smb_ucs2_t c)
-{
- init_valid_table();
- return valid_table[SVAL(&c,0)] != 0;
-}
-
-/*******************************************************************
Count the number of two-byte pairs in a UTF16 string.
********************************************************************/