diff options
-rw-r--r-- | source3/smbd/mangle.c | 5 | ||||
-rw-r--r-- | source3/smbd/server.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 6d98d9e39c..c0baa65982 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -92,6 +92,7 @@ BOOL is_8_3(char *fname) DEBUG(5,("checking %s for 8.3\n",fname)); if (case_mangle) +#ifndef YOSTW switch (case_default) { case CASE_LOWER: @@ -101,6 +102,10 @@ BOOL is_8_3(char *fname) if (strhaslower(fname)) return(False); break; } +#endif +#ifdef YOSTW + if (strhasupper(fname) && strhaslower(fname)) return(False); +#endif /* can't be longer than 12 chars */ if (len == 0 || len > 12) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 5ff60c6c6c..6f4da9b779 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -389,6 +389,9 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component) struct stat st; char *start, *end; pstring dirpath; +#ifdef YOSTW + char szName[132], *p; +#endif *dirpath = 0; if(saved_last_component) @@ -398,6 +401,23 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component) unix_format(name); unix_clean_name(name); +#ifdef YOSTW + /* Remove leading path specifications to check for 8_3 name */ + if ( strncmp( name, "./",2) == 0 ) { + strcpy( szName, name+2 ); + } + else { + strcpy( szName, name ); + } + p = strrchr( szName, '/' ); + if ( p != NULL ) { + p++; + } + else { + p = szName; + } +#endif + if (!case_sensitive && (!case_preserve || (is_8_3(name) && !short_case_preserve))) strnorm(name); |