diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 20 | ||||
-rw-r--r-- | source4/dsdb/schema/schema.h | 7 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_inferiors.c | 21 | ||||
-rw-r--r-- | source4/libcli/config.mk | 43 | ||||
-rw-r--r-- | source4/main.mk | 1 | ||||
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 2 |
6 files changed, 39 insertions, 55 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index f9411fe95f..26703528a7 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -1352,16 +1352,6 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) replmd_replPropertyMetaDataCtr1_sort(&nmd.ctr.ctr1, &rdn_p->attid); } - /* create the meta data value */ - ndr_err = ndr_push_struct_blob(&nmd_value, msg, - lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), - &nmd, - (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); - return replmd_replicated_request_werror(ar, ntstatus_to_werror(nt_status)); - } - /* * check if some replicated attributes left, otherwise skip the ldb_modify() call */ @@ -1385,6 +1375,16 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) nmd.ctr.ctr1.array[i].local_usn = seq_num; } + /* create the meta data value */ + ndr_err = ndr_push_struct_blob(&nmd_value, msg, + lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), + &nmd, + (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); + return replmd_replicated_request_werror(ar, ntstatus_to_werror(nt_status)); + } + /* * when we know that we'll modify the record, add the whenChanged, uSNChanged * and replPopertyMetaData attributes diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h index a605e2f707..4e7e503931 100644 --- a/source4/dsdb/schema/schema.h +++ b/source4/dsdb/schema/schema.h @@ -146,6 +146,13 @@ struct dsdb_class { uint32_t *mustContain_ids; uint32_t *mayContain_ids; uint32_t *systemPossSuperiors_ids; + + /* An ordered index showing how this subClass fits into the + * subClass tree. that is, an objectclass that is not + * subClassOf anything is 0 (just in case), and top is 1, and + * subClasses of top are 2, subclasses of those classes are + * 3 */ + uint32_t subClass_order; }; struct dsdb_schema_oid_prefix { diff --git a/source4/dsdb/schema/schema_inferiors.c b/source4/dsdb/schema/schema_inferiors.c index b0ecc08600..493b425b72 100644 --- a/source4/dsdb/schema/schema_inferiors.c +++ b/source4/dsdb/schema/schema_inferiors.c @@ -127,6 +127,20 @@ static char **schema_subclasses_recurse(struct dsdb_schema *schema, struct dsdb_ return list; } +/* Walk down the subClass tree, setting a higher index as we go down + * each level. top is 1, subclasses of top are 2, etc */ +void schema_subclasses_order_recurse(struct dsdb_schema *schema, struct dsdb_class *schema_class, int order) +{ + const char **list = schema_class->subclasses_direct; + int i; + schema_class->subClass_order = order; + for (i=0;list && list[i]; i++) { + struct dsdb_class *schema_class2 = dsdb_class_by_lDAPDisplayName(schema, list[i]); + schema_subclasses_order_recurse(schema, schema_class2, order+1); + } + return; +} + static void schema_create_subclasses(struct dsdb_schema *schema) { struct dsdb_class *schema_class; @@ -148,7 +162,12 @@ static void schema_create_subclasses(struct dsdb_schema *schema) for (schema_class=schema->classes; schema_class; schema_class=schema_class->next) { schema_class->subclasses = str_list_unique(schema_subclasses_recurse(schema, schema_class)); - } + + /* Initilise the subClass order, to ensure we can't have uninitilised sort on the subClass hirarchy */ + schema_class->subClass_order = 0; + } + + schema_subclasses_order_recurse(schema, dsdb_class_by_lDAPDisplayName(schema, "top"), 1); } static void schema_fill_possible_inferiors(struct dsdb_schema *schema, struct dsdb_class *schema_class) diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk index b6a9f112a0..340cd2ae41 100644 --- a/source4/libcli/config.mk +++ b/source4/libcli/config.mk @@ -37,49 +37,6 @@ LIBCLI_SMB_COMPOSITE_OBJ_FILES = $(addprefix $(libclisrcdir)/smb_composite/, \ $(eval $(call proto_header_template,$(libclisrcdir)/smb_composite/proto.h,$(LIBCLI_SMB_COMPOSITE_OBJ_FILES:.o=.c))) -[SUBSYSTEM::NDR_NBT_BUF] - -NDR_NBT_BUF_OBJ_FILES = $(libclinbtsrcdir)/nbtname.o - -$(eval $(call proto_header_template,$(libclinbtsrcdir)/nbtname.h,$(NDR_NBT_BUF_OBJ_FILES:.o=.c))) - -[SUBSYSTEM::LIBCLI_NBT] -PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT LIBCLI_COMPOSITE LIBEVENTS \ - NDR_SECURITY samba_socket LIBSAMBA-UTIL - -LIBCLI_NBT_OBJ_FILES = $(addprefix $(libclinbtsrcdir)/, \ - nbtsocket.o \ - namequery.o \ - nameregister.o \ - namerefresh.o \ - namerelease.o) - -[BINARY::nmblookup] -INSTALLDIR = BINDIR -PRIVATE_DEPENDENCIES = \ - LIBSAMBA-HOSTCONFIG \ - LIBSAMBA-UTIL \ - LIBCLI_NBT \ - LIBPOPT \ - POPT_SAMBA \ - LIBNETIF \ - LIBCLI_RESOLVE - -nmblookup_OBJ_FILES = $(libclinbtsrcdir)/tools/nmblookup.o -MANPAGES += $(libclinbtsrcdir)/man/nmblookup.1 - -[SUBSYSTEM::LIBCLI_NDR_NETLOGON] -PUBLIC_DEPENDENCIES = LIBNDR \ - NDR_SECURITY - -LIBCLI_NDR_NETLOGON_OBJ_FILES = $(addprefix $(libclinbtsrcdir)/../, ndr_netlogon.o) - -[SUBSYSTEM::LIBCLI_NETLOGON] -PUBLIC_DEPENDENCIES = LIBSAMBA-UTIL LIBCLI_NDR_NETLOGON - -LIBCLI_NETLOGON_OBJ_FILES = $(addprefix $(libclinbtsrcdir)/, \ - ../netlogon.o) - [PYTHON::python_netbios] LIBRARY_REALNAME = samba/netbios.$(SHLIBEXT) PUBLIC_DEPENDENCIES = LIBCLI_NBT DYNCONFIG LIBSAMBA-HOSTCONFIG diff --git a/source4/main.mk b/source4/main.mk index 63eea36cdf..880d877e50 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -56,6 +56,7 @@ mkinclude ../lib/smbconf/config.mk mkinclude ../lib/async_req/config.mk mkinclude ../libcli/security/config.mk mkinclude ../libcli/ldap/config.mk +mkinclude ../libcli/nbt/config.mk mkinclude ../libcli/auth/config.mk mkinclude ../libcli/drsuapi/config.mk mkinclude ../libcli/samsync/config.mk diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 165e485d45..a05ddb9a5d 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -86,7 +86,7 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem obj->meta_data_ctr->meta_data = talloc_array(obj, struct drsuapi_DsReplicaMetaData, md.ctr.ctr1.count); for (n=i=0; i<md.ctr.ctr1.count; i++) { - if (md.ctr.ctr1.array[i].originating_usn < highest_usn) continue; + if (md.ctr.ctr1.array[i].local_usn < highest_usn) continue; obj->meta_data_ctr->meta_data[n].originating_change_time = md.ctr.ctr1.array[i].originating_change_time; obj->meta_data_ctr->meta_data[n].version = md.ctr.ctr1.array[i].version; obj->meta_data_ctr->meta_data[n].originating_invocation_id = md.ctr.ctr1.array[i].originating_invocation_id; |