[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Tue Jun 11 03:41:02 MDT 2013
The branch, master has been updated
via 3fba9ba dsdb: reset schema->{classes,attributes}_to_remove_size to 0
via d2f8471 dsdb: use the correct talloc parent in dsdb_repl_merge_working_schema()
via 5263f0a Revert "s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sort"
from 424a990 s4-dfs_server: check for netbios aliases in ad_get_referrals
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3fba9ba7ea85e33faac2718d2463c5d0cd2d85f4
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 10 10:46:41 2013 +0200
dsdb: reset schema->{classes,attributes}_to_remove_size to 0
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Tue Jun 11 11:40:39 CEST 2013 on sn-devel-104
commit d2f847149d3d1310c829169564704b45ac43e978
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 10 10:45:25 2013 +0200
dsdb: use the correct talloc parent in dsdb_repl_merge_working_schema()
schema->{classes,attributes} are the DLIST pointer not an array.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 5263f0a626dac3ac1fc48ece2324438279f187f0
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Jun 5 20:44:17 2013 +1000
Revert "s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sort"
This reverts commit d799b25dd3ed0f72ee03949225ba241c5538d7d6.
Sometimes the schema just isn't right. A segfault is not the correct
answer in those cases.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/repl/replicated_objects.c | 4 ++--
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 7 +++++++
source4/dsdb/schema/schema_set.c | 4 +++-
3 files changed, 12 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c
index b0abc1a..e018aa4 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -58,7 +58,7 @@ static WERROR dsdb_repl_merge_working_schema(struct ldb_context *ldb,
* as the rest won't be modified and this is for
* a short lived object.
*/
- tmp2 = talloc(dest_schema->classes, struct dsdb_class);
+ tmp2 = talloc(dest_schema, struct dsdb_class);
if (tmp2 == NULL) {
return WERR_NOMEM;
}
@@ -85,7 +85,7 @@ static WERROR dsdb_repl_merge_working_schema(struct ldb_context *ldb,
* as the rest won't be modified and this is for
* a short lived object.
*/
- tmp2 = talloc(dest_schema->attributes, struct dsdb_attribute);
+ tmp2 = talloc(dest_schema, struct dsdb_attribute);
if (tmp2 == NULL) {
return WERR_NOMEM;
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 98e60d7..24dcc6f 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -663,6 +663,13 @@ static int replmd_ldb_message_element_attid_sort(const struct ldb_message_elemen
a1 = dsdb_attribute_by_lDAPDisplayName(schema, e1->name);
a2 = dsdb_attribute_by_lDAPDisplayName(schema, e2->name);
+ /*
+ * TODO: remove this check, we should rely on e1 and e2 having valid attribute names
+ * in the schema
+ */
+ if (!a1 || !a2) {
+ return strcasecmp(e1->name, e2->name);
+ }
if (a1->attributeID_id == a2->attributeID_id) {
return 0;
}
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 73264f9..ce8facb 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -338,8 +338,10 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb,
TALLOC_FREE(schema->attributes_to_remove[i]);
}
- TALLOC_FREE(schema->attributes_to_remove);
TALLOC_FREE(schema->classes_to_remove);
+ schema->classes_to_remove_size = 0;
+ TALLOC_FREE(schema->attributes_to_remove);
+ schema->attributes_to_remove_size = 0;
/* free all caches */
dsdb_sorted_accessors_free(schema);
--
Samba Shared Repository
More information about the samba-cvs
mailing list