summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r--source3/smbd/filename.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index a88829de9d..0910e03ee3 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -339,7 +339,10 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
int saved_errno;
BOOL component_was_mangled = False;
BOOL name_has_wildcard = False;
+#if 0
+ /* Andrew's conservative code... JRA. */
extern char magic_char;
+#endif
*dirpath = 0;
*bad_path = False;
@@ -441,9 +444,20 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
if(strchr(start,'?') || strchr(start,'*'))
name_has_wildcard = True;
+ /*
+ * is_mangled() was changed to look at an entire pathname, not
+ * just a component. JRA.
+ */
+
+ if(is_mangled(start))
+ component_was_mangled = True;
+
+#if 0
+ /* Keep Andrew's conservative code around, just in case. JRA. */
/* this is an extremely conservative test for mangled names. */
if (strchr(start,magic_char))
component_was_mangled = True;
+#endif
/*
* Now we need to recursively match the name against the real