Sorry, I'm having trouble coming up with a succinct title for this. We're using the SMBJ library in an application, and we are connecting to DFS links and shares. We're seeing an issue where the DFS link is not properly evaluated if it points to something other than a top-level share. It appears that this may be limited to situations where the Share itself is a DFS link pointing to a different location.
To elaborate, I have a Samba server, that has a share configured as so:
When accessing this share from Windows, the contents of the "\fileserver1.example.com\shares\share1\" folder are (correctly) shown. When accessing this DFS share from SMBJ, the evaluation of the DFS link appears to be one level up - at the "\fileserver1.example.com\shares" folder. To be fair, smbclient seems to behave the same way as SMBJ, so I'm unsure if the fact that Windows clients traverse the entire specified path is the "correct" way or not.
If, instead of using "msdfs proxy", I create a folder and then use a DFS link within that folder, it works as expected across all client platforms. So, if I have a share:
the link is properly evaluated to the correct location. The failure to traverse to the intended directory seems to only occur with a DFS proxy share, and only when that share is pointed at a level deeper than the root share on the destination.
Sorry, I'm having trouble coming up with a succinct title for this. We're using the SMBJ library in an application, and we are connecting to DFS links and shares. We're seeing an issue where the DFS link is not properly evaluated if it points to something other than a top-level share. It appears that this may be limited to situations where the Share itself is a DFS link pointing to a different location.
To elaborate, I have a Samba server, that has a share configured as so:
When accessing this share from Windows, the contents of the "\fileserver1.example.com\shares\share1\" folder are (correctly) shown. When accessing this DFS share from SMBJ, the evaluation of the DFS link appears to be one level up - at the "\fileserver1.example.com\shares" folder. To be fair, smbclient seems to behave the same way as SMBJ, so I'm unsure if the fact that Windows clients traverse the entire specified path is the "correct" way or not.
If, instead of using "msdfs proxy", I create a folder and then use a DFS link within that folder, it works as expected across all client platforms. So, if I have a share:
and, within that /shares folder, I have a symlink:
the link is properly evaluated to the correct location. The failure to traverse to the intended directory seems to only occur with a DFS proxy share, and only when that share is pointed at a level deeper than the root share on the destination.