MSDfs Samba2.2.4 lower case ??

Shirish Kalele kalele at veritas.com
Wed May 8 10:38:02 GMT 2002


>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
>case?)
>

Consider this: 

You have a dfs link at /dfsroot/Directory/sub/TR

Now you get a pathname like \\SRV\DFS\DIRECTORY\SUB\TR

Doing a strlower on the path DIRECTORY\SUB\TR because the client is Win9X
would not help get us the Unix link pathname. We would need to try (using
stat()) all kinds of case-combinations for each component of the path to
finally form the correct path Directory/sub/TR.

We don't have a problem with Win2K because it sends us
\\SRV\DFS\Directory\sub\TR so we can simply take the relative path and do
an lstat on that. No case combinations needed. However, even Win2K is not
guaranteed. If a user/application tries to access
\\SRV\DFS\Directory\SUB\tr, Win2K might send us this path and we'd have to
do the same thing that we do for Win9X.

In the current situation, by restricting that links be all lowercase on
the Unix machine, your link would have to be /dfsroot/directory/sub/tr.

So we can simply strlower all the paths that we get from the clients,
and do an lstat. No case combinations needed.

Hope this is clearer..

Cheers,
Shirish






More information about the samba-technical mailing list