In cli_resolve_path function of source3/libsmb/clidfs.c file. WriteFile to 2008R2 DFS is failed while cli_cm_open function is called second time in cli_resolve_path function. if following code /* Open the connection to the target server & share */ if ((*targetcli = cli_cm_open(ctx, rootcli, server, share, dfs_auth_info, false, (rootcli->trans_enc_state != NULL), rootcli->protocol, 0, 0x20)) == NULL) { d_printf("Unable to follow dfs referral [\\%s\\%s]\n", server, share ); return false; } is Modified to /* Open the connection to the target server & share */ if ((*targetcli = cli_cm_open(ctx, rootcli, /*server*/rootcli->desthost, share, dfs_auth_info, false, (rootcli->trans_enc_state != NULL), rootcli->protocol, 0, 0x20)) == NULL) { d_printf("Unable to follow dfs referral [\\%s\\%s]\n", server, share ); return false; } Write File is success. Is above fix OK or does this have some side effects?
Created attachment 8319 [details] Networkcapture when issue is observed.
Created attachment 8320 [details] Network capture after changing the code
"Unable to follow dfs referral" samba log was observed for second cli_cm_open in cli_resolve_path function.
sorry for the late reply. Do you still see this issue with recent samba versions?