diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-02-10 13:54:29 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-02-10 13:54:29 +0000 |
commit | 8839603f03b624e80f86395261d513bc7eb79189 (patch) | |
tree | 84218a378ab53d7425b310815a1724cb3636dd15 | |
parent | e3aff2459e5afc37812278f65e804ee70c7b7653 (diff) | |
download | samba-8839603f03b624e80f86395261d513bc7eb79189.tar.gz samba-8839603f03b624e80f86395261d513bc7eb79189.tar.bz2 samba-8839603f03b624e80f86395261d513bc7eb79189.zip |
JHT ===> William Yost patches integrated to fix leading path on 8.3
filename problem.
Problem conditions:
case sensitive = no
default case = lower
mangle case = yes
preserve case = yes
short preserve case = yes
Problem: Win95 still writes upper case file names.
Patches supplied have been incorporated into mangle.c and server.c
but needs YOSTW to be defined for it to take effect.
Action:
=======
If we are happy with the patch, delete old code in mangle.c, then
remove all YOSTW #ifdefs.
(This used to be commit 84fc674c89e8999f284b59888dfa2cdc47438e88)
-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); |