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 | 84fc674c89e8999f284b59888dfa2cdc47438e88 (patch) | |
tree | a3e419b11df96c5f9afddbb805a66e1baf2840c0 /source | |
parent | d096e0c3c2e182d2c94574bd8f4b1cf5c29056ff (diff) | |
download | samba-84fc674c89e8999f284b59888dfa2cdc47438e88.tar.gz samba-84fc674c89e8999f284b59888dfa2cdc47438e88.tar.xz samba-84fc674c89e8999f284b59888dfa2cdc47438e88.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.
Diffstat (limited to 'source')
-rw-r--r-- | source/smbd/mangle.c | 5 | ||||
-rw-r--r-- | source/smbd/server.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index 6d98d9e39c5..c0baa659821 100644 --- a/source/smbd/mangle.c +++ b/source/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/source/smbd/server.c b/source/smbd/server.c index 5ff60c6c6ce..6f4da9b7794 100644 --- a/source/smbd/server.c +++ b/source/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); |