msdfs on 3.0.25b - incorrect PATH_NOT_FOUND on deep links
Jeremy Allison
jra at samba.org
Mon Aug 6 19:19:23 GMT 2007
On Mon, Aug 06, 2007 at 04:12:16PM +0200, Jan Martin wrote:
> Note: This is the second one of three similar msdfs problems. To avoid
> confusion, we call this one the "deep link problem"
>
>
> Hi all,
>
> Samba 3.0.25b incorrectly answers PATH_NOT_FOUND when being asked about
> something in a sub-subdirectory of a DFS link.
>
> This is because dfs_path_lookop() in smbd/msdfs.c issues a call to
> unix_convert() (line 390) which does many things, including a sanity
> check of the whole path (except the last component). For example, it
> returns an error if the local(!) path doesn't exist at all. This result
> is correct and valueable - if there is no msdfs redirection in between.
> Otherwise, the result is wrong - dfs_path_lookup() gives up too early.
> It should return PATH_NOT_COVERED instead of PATH_NOT_FOUND.
>
> To fix that problem, we postponed the return of the error message to the
> end of dfs_path_lookup(), after all DFS stuff is done.
I'm pretty sure I've already fixed this in the SAMBA_3_0_25 codebase.
I still return early after the unix_convert if the error is not
NT_STATUS_OBJECT_PATH_NOT_FOUND, as any other error code means
an underlying error in the path (access denied etc.).
Please check out the SAMBA_3_0_25 code and test if it fixes the
problem for you. This is what will be in 3.0.25c.
Thanks a *lot* for your review of this code, it's greatly
appreciated.
Jeremy.
More information about the samba-technical
mailing list