Skip to content

Conversation

@ashutoshbhole-Druva
Copy link

@ashutoshbhole-Druva ashutoshbhole-Druva commented Jul 11, 2023

This PR implements the DFS requests & responses via IOCTL call where we have handled multiple referral entries. Please note that DFS requests are invoked on IPC$.

This enabled us to invoke the Readdir, and other RPC calls using DFS.

NOTE: In the DFS request, if the NAS device is Windows DFS, for converting dirname in the request, we need to append one extra space. If not done, the response is not formed properly. This is not required for DFS based on Nutanix setups. I am not sure why this behavior and need inputs to understand.

Below is the code snippet for the
dfsRefReq := DFSReferralRequest{
MaxReferralLevel: 4,
RequestFileName: fmt.Sprintf("%s ", dfsname), // ---> This works with Windows DFS
//RequestFileName: fmt.Sprintf("%s", dfsname), // ---> This will work with Non-Windows DFS
}

Kindly refer to the example and let me know if any changes are necessary!

This was referenced Jul 11, 2023
@ashutoshbhole-Druva
Copy link
Author

ashutoshbhole-Druva commented Jul 11, 2023

are u going to implement the windows todo?
@tooptoop4 - Windows DFS is implemented. We are just not sure why we need extra space in the DFS request only for Windows DFS systems. If you have a DFS setup on Nutanix, or other systems, then probably you will need to use the other type of request.

dfsRefReq := DFSReferralRequest{
MaxReferralLevel: 4,
RequestFileName: fmt.Sprintf("%s ", dfsname), ---> This works with Windows DFS
//RequestFileName: fmt.Sprintf("%s", dfsname), ----> This will work with Non-Windows DFS
}

Hope this helps

@tooptoop4
Copy link

tooptoop4 commented Jul 11, 2023

@hirochachacha 🦗🌵

@tooptoop4
Copy link

@ashutosh-bhole-druva can u raise the PR in https://github.com/CloudSoda/go-smb2 instead (it seems like an active repo) and I note rclone will use it (rclone/rclone#6733 (comment))?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants