diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
commit | e90b65284812aaa5ff9e9935ce9bbad7791cbbcd (patch) | |
tree | 9e744d1dc2f93934a4b49166a37383d3cb2b2139 /source3/smbd/mangle.c | |
parent | ec167dc9cc0ec2ee461837c25a371d2981744208 (diff) | |
download | samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.gz samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.bz2 samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.zip |
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
Diffstat (limited to 'source3/smbd/mangle.c')
-rw-r--r-- | source3/smbd/mangle.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 20b2b419cf..392e48afc1 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -29,6 +29,7 @@ static struct { } mangle_backends[] = { { "hash", mangle_hash_init }, { "hash2", mangle_hash2_init }, + /*{ "tdb", mangle_tdb_init }, */ { NULL, NULL } }; @@ -40,11 +41,12 @@ static void mangle_init(void) int i; char *method; - if (mangle_fns) return; + if (mangle_fns) + return; method = lp_mangling_method(); - /* find the first mangling method that manages to initialise and + /* find the first mangling method that manages to initialise and matches the "mangling method" parameter */ for (i=0; mangle_backends[i].name && !mangle_fns; i++) { if (!method || !*method || strcmp(method, mangle_backends[i].name) == 0) { @@ -82,7 +84,12 @@ BOOL mangle_is_mangled(const char *s) */ BOOL mangle_is_8_3(const char *fname, BOOL check_case) { - return mangle_fns->is_8_3(fname, check_case); + return mangle_fns->is_8_3(fname, check_case, False); +} + +BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case) +{ + return mangle_fns->is_8_3(fname, check_case, True); } /* @@ -99,7 +106,8 @@ BOOL mangle_check_cache(char *s) /* map a long filename to a 8.3 name. */ -BOOL mangle_map(char *OutName, BOOL need83, BOOL cache83, int snum) + +void mangle_map(char *OutName, BOOL need83, BOOL cache83, int snum) { /* name mangling can be disabled for speed, in which case we just truncate the string */ @@ -107,11 +115,10 @@ BOOL mangle_map(char *OutName, BOOL need83, BOOL cache83, int snum) if (need83) { string_truncate(OutName, 12); } - return True; + return; } /* invoke the inane "mangled map" code */ mangle_map_filename(OutName, snum); - - return mangle_fns->name_map(OutName, need83, cache83); + mangle_fns->name_map(OutName, need83, cache83); } |