The Samba-Bugzilla – Attachment 13444 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]
patch cherry-picked from master for 4.7 (only)
0001-dsdb-Do-not-force-a-re-index-of-sam.ldb-on-upgrade-t.patch (text/plain), 1.84 KB, created by
Andrew Bartlett
on 2017-08-03 02:10:43 UTC
(
hide
)
Description:
patch cherry-picked from master for 4.7 (only)
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2017-08-03 02:10:43 UTC
Size:
1.84 KB
patch
obsolete
>From 9715791f090c05ddc22ebaa662d754befcd44d21 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> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit 39c6274084e5d72d6fdfae1fb9fede439f6ad60d) >--- > 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
Flags:
garming
:
review+
Actions:
View
Attachments on
bug 12855
:
13440
| 13444