summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2013-02-04 19:04:39 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-02-07 15:50:36 +0100
commit64eba0a8421bf4648f79085dd23b3e55d5a322df (patch)
treea3424c39b7194a78d64e630da7d061331808d7cb
parent62e6ea408a20197420eadb133df6ba233c7874b4 (diff)
downloadsamba-64eba0a8421bf4648f79085dd23b3e55d5a322df.tar.gz
samba-64eba0a8421bf4648f79085dd23b3e55d5a322df.tar.bz2
samba-64eba0a8421bf4648f79085dd23b3e55d5a322df.zip
BUG 9633: Recursive mget should continue on EPERM.
Regression introduced by 14ff2e8de9bd8d0064762234555260f5eea643fe. When downloading files recursively, smbclient halts if it encounters a folder to which it does not have permission to traverse. Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 7 15:50:36 CET 2013 on sn-devel-104
-rw-r--r--source3/client/client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 6aed9d3891..8038021d83 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1321,8 +1321,17 @@ static NTSTATUS do_mget(struct cli_state *cli_state, struct file_info *finfo,
return NT_STATUS_NO_MEMORY;
}
- status = do_list(mget_mask, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY,do_mget,false, true);
- if (!NT_STATUS_IS_OK(status)) {
+ status = do_list(mget_mask,
+ (FILE_ATTRIBUTE_SYSTEM
+ | FILE_ATTRIBUTE_HIDDEN
+ | FILE_ATTRIBUTE_DIRECTORY),
+ do_mget, false, true);
+ if (!NT_STATUS_IS_OK(status)
+ && !NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+ /*
+ * Ignore access denied errors to ensure all permitted files are
+ * pulled down.
+ */
return status;
}