From c21ff8f76209a1e7138ba06ce262a3e2c2880646 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 8 Apr 2002 01:58:44 +0000 Subject: Reintroduce the 2.2 name mangling code, until we get are more flexible solution. Even for a hash/cache setup, this code needs some more work, in particular it needs to use mangle_get_prefix() etc and to move to unicode internals. Andrew Bartlett (This used to be commit ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa) --- source3/smbd/filename.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'source3/smbd/filename.c') diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 3053e8a1d8..8bd09691e4 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -75,6 +75,17 @@ static BOOL fname_equal(char *name1, char *name2) ****************************************************************************/ static BOOL mangled_equal(char *name1, char *name2) { +#if 1 + pstring tmpname; + if (is_8_3(name2, True)) { + return False; + } + + pstrcpy(tmpname, name2); + mangle_name_83(tmpname); + + return strequal(name1, tmpname); +#else char *tmpname; BOOL ret = False; @@ -86,6 +97,8 @@ static BOOL mangled_equal(char *name1, char *name2) SAFE_FREE(tmpname); } return ret; +#endif + } @@ -116,7 +129,7 @@ stat struct will be filled with zeros (and this can be detected by checking for nlinks = 0, which can never be true for any file). ****************************************************************************/ -BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, +BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_component, BOOL *bad_path, SMB_STRUCT_STAT *pst) { SMB_STRUCT_STAT st; -- cgit