From 540911001d1bf25d9534b72b90a32fc7e5efc4b0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Mar 2007 23:54:57 +0000 Subject: r21768: Fix the client dfs code such that smbclient can process deep dfs links (ie. links that go to non root parts of a share). Make the directory handling conanonical in POSIX and Windows pathname processing. dfs should not be fully working in client tools. Please bug me if not. Jeremy. (This used to be commit 1c9e10569cd97ee41de39f9f012bea4e4c932b5d) --- source3/utils/net_rpc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 66cb6e6ea6..b4a68b2058 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -3507,15 +3507,23 @@ static void copy_fn(const char *mnt, file_info *f, const char *mask, void *state **/ BOOL sync_files(struct copy_clistate *cp_clistate, pstring mask) { + struct cli_state *targetcli; + pstring targetpath; DEBUG(3,("calling cli_list with mask: %s\n", mask)); - if (cli_list(cp_clistate->cli_share_src, mask, cp_clistate->attribute, copy_fn, cp_clistate) == -1) { - d_fprintf(stderr, "listing %s failed with error: %s\n", + if ( !cli_resolve_path( "", cp_clistate->cli_share_src, mask, &targetcli, targetpath ) ) { + d_fprintf(stderr, "cli_resolve_path %s failed with error: %s\n", mask, cli_errstr(cp_clistate->cli_share_src)); return False; } + if (cli_list(targetcli, targetpath, cp_clistate->attribute, copy_fn, cp_clistate) == -1) { + d_fprintf(stderr, "listing %s failed with error: %s\n", + mask, cli_errstr(targetcli)); + return False; + } + return True; } -- cgit