The Samba-Bugzilla – Attachment 13914 Details for
Bug 13228
Linked attribute corruption during tombstone expunge on a upgrades database from < 4.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Simple fix for the problem using a tmp talloc array
bug-13228-simple-fix-01.patches.txt (text/plain), 1.33 KB, created by
Stefan Metzmacher
on 2018-01-17 08:21:35 UTC
(
hide
)
Description:
Simple fix for the problem using a tmp talloc array
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2018-01-17 08:21:35 UTC
Size:
1.33 KB
patch
obsolete
>From f11676248bb3947ed8f7965e7563e38cbab798dc Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 17 Jan 2018 08:07:03 +0100 >Subject: [PATCH] TODO: fix linked attribute corruption on databases with > unsorted links WITH TALLOC > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228 >--- > source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > >diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >index 0980ae8..9572428 100644 >--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >@@ -2838,11 +2838,23 @@ static int replmd_modify_la_delete(struct ldb_module *module, > > if (vanish_links) { > unsigned j = 0; >+ struct ldb_val *tmp_vals = NULL; >+ >+ tmp_vals = talloc_array(tmp_ctx, struct ldb_val, >+ old_el->num_values); >+ if (tmp_vals == NULL) { >+ talloc_free(tmp_ctx); >+ return ldb_module_oom(module); >+ } > for (i = 0; i < old_el->num_values; i++) { >- if (old_dns[i].v != NULL) { >- old_el->values[j] = *old_dns[i].v; >- j++; >+ if (old_dns[i].v == NULL) { >+ continue; > } >+ tmp_vals[j] = *old_dns[i].v; >+ j++; >+ } >+ for (i = 0; i < j; i++) { >+ old_el->values[i] = tmp_vals[i]; > } > old_el->num_values = j; > } >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13228
: 13914 |
13928
|
13929
|
13943
|
13944