summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-06-13 19:29:02 +0000
committerJeremy Allison <jra@samba.org>2002-06-13 19:29:02 +0000
commit5d452f0d000ba15c2a837db8750472e5f2c93ce0 (patch)
treeaf320bfa39ae3cf1e1e8ce1dbf81875bf7799df9 /source3/smbd/dir.c
parentbad738e6536e983064eee7647229354bc9028183 (diff)
downloadsamba-5d452f0d000ba15c2a837db8750472e5f2c93ce0.tar.gz
samba-5d452f0d000ba15c2a837db8750472e5f2c93ce0.tar.bz2
samba-5d452f0d000ba15c2a837db8750472e5f2c93ce0.zip
Merge in mangle fixes from 2.2.
Jeremy. (This used to be commit 5e2571f424a40df4d67fe279517a9b21184b78e1)
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r--source3/smbd/dir.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 2f641e34fa..7dd425ef8a 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -558,6 +558,12 @@ BOOL dir_check_ftype(connection_struct *conn,int mode,SMB_STRUCT_STAT *st,int di
return True;
}
+static BOOL mangle_mask_match(connection_struct *conn, char *filename, char *mask)
+{
+ mangle_map(filename,True,False,SNUM(conn));
+ return mask_match(filename,mask,False);
+}
+
/****************************************************************************
Get an 8.3 directory entry.
****************************************************************************/
@@ -603,8 +609,7 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname,
*/
if ((strcmp(mask,"*.*") == 0) ||
mask_match(filename,mask,False) ||
- (mangle_map(filename,True,False,SNUM(conn)) &&
- mask_match(filename,mask,False)))
+ mangle_mask_match(conn,filename,mask))
{
if (isrootdir && (strequal(filename,"..") || strequal(filename,".")))
continue;