Bug 9487 - DFS file transfer returning error
Summary: DFS file transfer returning error
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.5.19
Hardware: All All
: P5 critical
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-10 05:29 UTC by Dheeraj Reddy (dead mail address)
Modified: 2018-03-27 21:31 UTC (History)
1 user (show)

See Also:


Attachments
Networkcapture when issue is observed. (15.93 KB, application/octet-stream)
2012-12-10 08:07 UTC, Dheeraj Reddy (dead mail address)
no flags Details
Network capture after changing the code (524.36 KB, application/octet-stream)
2012-12-10 08:08 UTC, Dheeraj Reddy (dead mail address)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dheeraj Reddy (dead mail address) 2012-12-10 05:29:41 UTC
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?
Comment 1 Dheeraj Reddy (dead mail address) 2012-12-10 08:07:35 UTC
Created attachment 8319 [details]
Networkcapture when issue is observed.
Comment 2 Dheeraj Reddy (dead mail address) 2012-12-10 08:08:06 UTC
Created attachment 8320 [details]
Network capture after changing the code
Comment 3 Dheeraj Reddy (dead mail address) 2012-12-10 08:11:40 UTC
"Unable to follow dfs referral" samba log was observed for second cli_cm_open in cli_resolve_path function.
Comment 4 Björn Jacke 2018-03-27 21:31:19 UTC
sorry for the late reply. Do you still see this issue with recent samba versions?