summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-08 23:54:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:30 -0500
commit540911001d1bf25d9534b72b90a32fc7e5efc4b0 (patch)
treee9ed5f9507e4d8b4980aadcc12a71796a1a93192 /source3/utils
parenta39f08eec29235d9b09c169e3a95eba0484c7847 (diff)
downloadsamba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.tar.gz
samba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.tar.bz2
samba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.zip
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)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c12
1 files changed, 10 insertions, 2 deletions
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;
}