The Samba-Bugzilla – Attachment 13440 Details for
Bug 12855
Samba 4.7 will trigger a re-index of the DB on first startup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
possible patch for master
0001-dsdb-Do-not-force-a-re-index-of-sam.ldb-on-upgrade-t.patch (text/plain), 1.72 KB, created by
Andrew Bartlett
on 2017-07-31 22:27:16 UTC
(
hide
)
Description:
possible patch for master
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2017-07-31 22:27:16 UTC
Size:
1.72 KB
patch
obsolete
>From 4fc5a5e6c6bccb2adaf8c1de5589bfc3b6efdc31 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Tue, 1 Aug 2017 10:26:34 +1200 >Subject: [PATCH] dsdb: Do not force a re-index of sam.ldb on upgrade to 4.7 > >This means that no compatibleFeatures or incompatibleFeatures will be honoured >until a re-index, but that can be triggered when these features are set. > >New databases will still get this support. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12855 >Signed-off-by: Andrew Bartlett <abartlet@samba.org> >--- > source4/dsdb/schema/schema_set.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c >index df27e19a944..12a3cab2743 100644 >--- a/source4/dsdb/schema/schema_set.c >+++ b/source4/dsdb/schema/schema_set.c >@@ -214,7 +214,27 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, > if (ret != LDB_SUCCESS) { > goto op_error; > } >- if (mod_msg->num_elements > 0) { >+ >+ /* >+ * We don't want to re-index just because we didn't >+ * see this flag >+ * >+ * DO NOT backport this logic earlier than 4.7, it >+ * isn't needed and would be dangerous before 4.6, >+ * where we add logic to samba_dsdb to manage >+ * @SAMBA_FEATURES_SUPPORTED and need to know if the >+ * DB has been re-opened by an earlier version. >+ * >+ */ >+ >+ if (mod_msg->num_elements == 1 >+ && ldb_attr_cmp(mod_msg->elements[0].name, >+ SAMBA_FEATURES_SUPPORTED_FLAG) == 0) { >+ /* >+ * Ignore only adding >+ * @SAMBA_FEATURES_SUPPORTED >+ */ >+ } else if (mod_msg->num_elements > 0) { > /* > * Do the replace with the constructed message, > * to avoid needing a lock between this search >-- >2.11.0 >
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 12855
: 13440 |
13444