mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
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>
This commit is contained in:
parent
8ab6e51def
commit
39c6274084
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user