mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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 ad8aa47057
)
This commit is contained in:
parent
0e6eb43e6b
commit
c21ff8f762
@ -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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3021,10 +3021,10 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BO
|
||||
* Tine Smukavec <valentin.smukavec@hermes.si>.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
if (!rc && is_mangled(mask))
|
||||
check_mangled_cache( mask );
|
||||
#endif
|
||||
#else
|
||||
if (!rc)
|
||||
{
|
||||
char *unmangled;
|
||||
@ -3035,6 +3035,7 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BO
|
||||
|
||||
SAFE_FREE(unmangled);
|
||||
}
|
||||
#endif
|
||||
|
||||
has_wild = ms_has_wild(mask);
|
||||
|
||||
@ -3437,10 +3438,10 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
|
||||
* Tine Smukavec <valentin.smukavec@hermes.si>.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
if (!rc && is_mangled(mask))
|
||||
check_mangled_cache( mask );
|
||||
#endif
|
||||
#else
|
||||
if (!rc)
|
||||
{
|
||||
char *unmangled;
|
||||
@ -3451,7 +3452,7 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
|
||||
|
||||
SAFE_FREE(unmangled);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
has_wild = ms_has_wild(mask);
|
||||
|
||||
|
@ -888,10 +888,6 @@ static void usage(char *pname)
|
||||
if (!init_oplocks())
|
||||
exit(1);
|
||||
|
||||
/* Setup mangle */
|
||||
if (!init_mangle_tdb())
|
||||
exit(1);
|
||||
|
||||
/* Setup change notify */
|
||||
if (!init_change_notify())
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user