MSDfs Samba2.2.4 lower case ??
hxpro at cinesite.co.uk
Wed May 8 10:13:02 GMT 2002
Shirish Kalele wrote:
> > and wondered why the strlower() call is
> > needed in msdfs/msdfs.c line 168, I need my redirects to contain mixed
> > case letters. It appears to work in my initial testing without it.
> The strlower() call is done because some clients (Win9X) send paths in all
> uppercase, and so you'd need to try out case-combinations of all the
> components of the path to figure out what the path is; a simple lstat with
> the pathname would not work. By doing this, we of course restrict link names
> and all intermediate directories to be all lowercase.
Is it just Win9X ? because I notice there is some code to detect the
client OS in some parts of samba, in this case you could only
strlower() on those client you know have the upper case 'feature' (or
perhaps the reverse and don't do it on those you know work with mixed
> Simply removing strlower() won't do it. You could use unix_convert() to do
> this, and set a flag so that unix_convert() is not called a second time
> following RESOLVE_DFSPATH if the path is not a dfs link.
Thinking about this more, (and grepping the code for 'DFSPATH') I
notice that unix_convert() is called all over the place, is there a
reason why this couldn't be called once per request in a more central
place so that at any time you've got access to the requested file and
the file it should map to ? Perhaps some kind of run once macro may be
suitable to cache the result allowing the sprinkling of the calls
throughout the code thus getting a form of lazy evaluation + caching
Not that I'm offering to do this, as I don't know the code well enough
to trust me to do it :-)
or am I simply playing a different ball game all together ?
| Kevin Wheatley | These are the opinions of nobody |
| Special Services (Projects) | and are not shared by my employers |
| Cinesite Digital Studios | |
More information about the samba-technical