Bug 9487 - DFS file transfer returning error
DFS file transfer returning error
Status: NEW
Product: Samba 3.5
Classification: Unclassified
Component: libsmbclient
3.5.19
All Linux
: P5 critical
: ---
Assigned To: Derrell Lipman
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-10 05:29 UTC by Dheeraj Reddy
Modified: 2012-12-10 08:11 UTC (History)
0 users

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Dheeraj Reddy 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 2012-12-10 08:07:35 UTC
Created attachment 8319 [details]
Networkcapture when issue is observed.
Comment 2 Dheeraj Reddy 2012-12-10 08:08:06 UTC
Created attachment 8320 [details]
Network capture after changing the code
Comment 3 Dheeraj Reddy 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.