diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-05 15:31:10 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-05 15:31:10 +0000 |
commit | fd33412fa0ebd7de6c8749caeb111bdf4390dd47 (patch) | |
tree | fbd6ed2473bbe5ab42a957935ace7de31df407e2 /source3/smbd | |
parent | b28284007838c5802930691f1bd0aa77627ae7a2 (diff) | |
download | samba-fd33412fa0ebd7de6c8749caeb111bdf4390dd47.tar.gz samba-fd33412fa0ebd7de6c8749caeb111bdf4390dd47.tar.bz2 samba-fd33412fa0ebd7de6c8749caeb111bdf4390dd47.zip |
fixed a stat cache bug (the one found by Matthew Geier).
The fix I used is a very conservative fix. I'll leave it up to Jeremy
to put in a better fix. The problem was the detection of mangled
names.
(This used to be commit c96b5fde5ae12bd0d4d6bcff095cf090738c92a4)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/filename.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 8b81d6df2a..ee9ce3f835 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -331,6 +331,7 @@ 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; + extern char magic_char; *dirpath = 0; *bad_path = False; @@ -432,6 +433,10 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, if(strchr(start,'?') || strchr(start,'*')) name_has_wildcard = True; + /* this is an extremely conservative test for mangled names. */ + if (strchr(start,magic_char)) + component_was_mangled = True; + /* * Now we need to recursively match the name against the real * directory structure. @@ -528,7 +533,6 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, */ if (is_mangled(start)) { - component_was_mangled = True; check_mangled_cache( start ); } |