summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_samsync_ldif.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-06-17 19:49:58 +0200
committerGünther Deschner <gd@samba.org>2008-06-17 19:55:16 +0200
commitfefcb70f870cae351d29a937df674db8c4ee9abe (patch)
tree7834142cc66f48f796f5641302d4ff8e438ed1df /source3/libnet/libnet_samsync_ldif.c
parent49b269f50fc2fc2817bdee97e9670b8579113060 (diff)
downloadsamba-fefcb70f870cae351d29a937df674db8c4ee9abe.tar.gz
samba-fefcb70f870cae351d29a937df674db8c4ee9abe.tar.bz2
samba-fefcb70f870cae351d29a937df674db8c4ee9abe.zip
net_vampire: add error and result_message to samsync_context.
Guenther (This used to be commit e0b117200441f842fbc11cc817ab2cde4d63a22e)
Diffstat (limited to 'source3/libnet/libnet_samsync_ldif.c')
-rw-r--r--source3/libnet/libnet_samsync_ldif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libnet/libnet_samsync_ldif.c b/source3/libnet/libnet_samsync_ldif.c
index 86de2ab253..60acb7db40 100644
--- a/source3/libnet/libnet_samsync_ldif.c
+++ b/source3/libnet/libnet_samsync_ldif.c
@@ -1186,7 +1186,7 @@ NTSTATUS fetch_sam_entries_ldif(TALLOC_CTX *mem_ctx,
for (i = 0; i < r->num_deltas; i++) {
status = fetch_sam_entry_ldif(mem_ctx, database_id,
&r->delta_enum[i], ctx,
- &g_index, &a_index);
+ &a_index, &g_index);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
@@ -1195,6 +1195,11 @@ NTSTATUS fetch_sam_entries_ldif(TALLOC_CTX *mem_ctx,
/* This was the last query */
if (NT_STATUS_IS_OK(result)) {
ldif_write_output(database_id, ldif_ctx);
+ if (ldif_ctx->ldif_file != stdout) {
+ ctx->result_message = talloc_asprintf(mem_ctx,
+ "Vampired %d accounts and %d groups to %s",
+ a_index, g_index, ctx->output_filename);
+ }
ldif_free_context(ldif_ctx);
ctx->private_data = NULL;
}