diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-11 18:01:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:14 -0500 |
commit | 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8 (patch) | |
tree | 8e6f198af4605246bd3681c25826d8efe5c0d08b /source/smbd/mangle.c | |
parent | f131bf8f16fd8b7c49e6065ecbf6f8686b2f4269 (diff) | |
download | samba-9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8.tar.gz samba-9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8.tar.xz samba-9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8.zip |
r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
Diffstat (limited to 'source/smbd/mangle.c')
-rw-r--r-- | source/smbd/mangle.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index ed69a6210e8..16f99636eb5 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -81,22 +81,24 @@ void mangle_change_to_posix(void) /* see if a filename has come out of our mangling code */ -BOOL mangle_is_mangled(const char *s, int snum) +BOOL mangle_is_mangled(const char *s, const struct share_params *p) { - return mangle_fns->is_mangled(s, snum); + return mangle_fns->is_mangled(s, p); } /* see if a filename matches the rules of a 8.3 filename */ -BOOL mangle_is_8_3(const char *fname, BOOL check_case, int snum) +BOOL mangle_is_8_3(const char *fname, BOOL check_case, + const struct share_params *p) { - return mangle_fns->is_8_3(fname, check_case, False, snum); + return mangle_fns->is_8_3(fname, check_case, False, p); } -BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case, int snum) +BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case, + const struct share_params *p) { - return mangle_fns->is_8_3(fname, check_case, True, snum); + return mangle_fns->is_8_3(fname, check_case, True, p); } /* @@ -105,20 +107,22 @@ BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case, int snum) looking for a matching name if it doesn't. It should succeed most of the time or there will be a huge performance penalty */ -BOOL mangle_check_cache(char *s, size_t maxlen, int snum) +BOOL mangle_check_cache(char *s, size_t maxlen, + const struct share_params *p) { - return mangle_fns->check_cache(s, maxlen, snum); + return mangle_fns->check_cache(s, maxlen, p); } /* map a long filename to a 8.3 name. */ -void mangle_map(pstring OutName, BOOL need83, BOOL cache83, int snum) +void mangle_map(pstring OutName, BOOL need83, BOOL cache83, + const struct share_params *p) { /* name mangling can be disabled for speed, in which case we just truncate the string */ - if (!lp_manglednames(snum)) { + if (!lp_manglednames(p)) { if (need83) { string_truncate(OutName, 12); } @@ -126,6 +130,6 @@ void mangle_map(pstring OutName, BOOL need83, BOOL cache83, int snum) } /* invoke the inane "mangled map" code */ - mangle_map_filename(OutName, snum); - mangle_fns->name_map(OutName, need83, cache83, lp_defaultcase(snum), snum); + mangle_map_filename(OutName, p); + mangle_fns->name_map(OutName, need83, cache83, lp_defaultcase(p->service), p); } |