summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-10-14 03:50:27 +0000
committerTim Potter <tpot@samba.org>2003-10-14 03:50:27 +0000
commitbde2b4a8ec725229584125a054c2c169bc9bd1aa (patch)
tree13edf9416386717248db90ea0760c61f6859513c /source3/utils
parentb12866dfc702fa7e585838c0baa98b6a7615f2eb (diff)
downloadsamba-bde2b4a8ec725229584125a054c2c169bc9bd1aa.tar.gz
samba-bde2b4a8ec725229584125a054c2c169bc9bd1aa.tar.bz2
samba-bde2b4a8ec725229584125a054c2c169bc9bd1aa.zip
Break out of samsync loop on error.
(This used to be commit f8994483484cab47f0d6a6934979f69402dba894)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_samsync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 64f2d3f68f..d1c8300a49 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -182,6 +182,9 @@ static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret
result = cli_netlogon_sam_sync(cli, mem_ctx, ret_creds, db_type,
sync_context,
&num_deltas, &hdr_deltas, &deltas);
+ if (NT_STATUS_IS_ERR(result))
+ break;
+
clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), ret_creds);
for (i = 0; i < num_deltas; i++) {
display_sam_entry(&hdr_deltas[i], &deltas[i]);