mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
smbclient: Don't give up in allinfo if getting advanced info fails
Getting streams might fail, but further down getting reparse info might succeed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
47509eb7f0
commit
914e0cf6f8
@ -1697,9 +1697,11 @@ static int do_allinfo(const char *name)
|
|||||||
status = cli_qpathinfo_streams(cli, name, talloc_tos(), &num_streams,
|
status = cli_qpathinfo_streams(cli, name, talloc_tos(), &num_streams,
|
||||||
&streams);
|
&streams);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
d_printf("%s getting streams for %s\n", nt_errstr(status),
|
d_fprintf(stderr,
|
||||||
name);
|
"%s getting streams for %s\n",
|
||||||
return false;
|
nt_errstr(status),
|
||||||
|
name);
|
||||||
|
num_streams = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<num_streams; i++) {
|
for (i=0; i<num_streams; i++) {
|
||||||
@ -1765,15 +1767,20 @@ static int do_allinfo(const char *name)
|
|||||||
|
|
||||||
status = cli_shadow_copy_data(talloc_tos(), cli, fnum,
|
status = cli_shadow_copy_data(talloc_tos(), cli, fnum,
|
||||||
false, &snapshots, &num_snapshots);
|
false, &snapshots, &num_snapshots);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (NT_STATUS_IS_OK(status)) {
|
||||||
cli_close(cli, fnum);
|
status = cli_shadow_copy_data(talloc_tos(),
|
||||||
return 0;
|
cli,
|
||||||
|
fnum,
|
||||||
|
true,
|
||||||
|
&snapshots,
|
||||||
|
&num_snapshots);
|
||||||
}
|
}
|
||||||
status = cli_shadow_copy_data(talloc_tos(), cli, fnum,
|
|
||||||
true, &snapshots, &num_snapshots);
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
cli_close(cli, fnum);
|
d_fprintf(stderr,
|
||||||
return 0;
|
"%s getting shadow copy data for %s\n",
|
||||||
|
nt_errstr(status),
|
||||||
|
name);
|
||||||
|
num_snapshots = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j=0; j<num_snapshots; j++) {
|
for (j=0; j<num_snapshots; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user