[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-117-gb65d6cf
Andrew Tridgell
tridge at samba.org
Wed Sep 9 09:28:09 MDT 2009
The branch, master has been updated
via b65d6cf0135785aa10857c107c3a094ce170bbf7 (commit)
via 557cc460f24e00dc6ede087772a5800e39e4ea63 (commit)
from a84a82335c8a76885f1637be391dff0b1c25734e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b65d6cf0135785aa10857c107c3a094ce170bbf7
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Sep 10 01:27:12 2009 +1000
s4/drs: when we don't find an attribute use zero values
thanks to metze for pointing this out
commit 557cc460f24e00dc6ede087772a5800e39e4ea63
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Sep 10 01:26:34 2009 +1000
s4/vampire: fixed i/j index mixup in vampire code
-----------------------------------------------------------------------
Summary of changes:
source4/libnet/libnet_vampire.c | 6 +++---
source4/rpc_server/drsuapi/getncchanges.c | 29 ++++++++++-------------------
2 files changed, 13 insertions(+), 22 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index ec1545e..5e516af 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -234,9 +234,9 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
for (j=0; j < a->value_ctr.num_values; j++) {
uint32_t val = 0xFFFFFFFF;
- if (a->value_ctr.values[i].blob
- && a->value_ctr.values[i].blob->length == 4) {
- val = IVAL(a->value_ctr.values[i].blob->data,0);
+ if (a->value_ctr.values[j].blob
+ && a->value_ctr.values[j].blob->length == 4) {
+ val = IVAL(a->value_ctr.values[j].blob->data,0);
}
if (val == DRSUAPI_OBJECTCLASS_attributeSchema) {
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 1455b6b..6e65e31 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -112,25 +112,16 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
if (el == NULL) {
DEBUG(0,("No element '%s' for attributeID %u in message\n",
sa->lDAPDisplayName, md.ctr.ctr1.array[i].attid));
- /* we really should find it, but let's try to
- * cope for now by going to the next one
- */
- memmove(&obj->meta_data_ctr->meta_data[i], &obj->meta_data_ctr->meta_data[i+1],
- sizeof(obj->meta_data_ctr->meta_data[i])*(obj->object.attribute_ctr.num_attributes-(i+1)));
- memmove(&md.ctr.ctr1.array[i], &md.ctr.ctr1.array[i+1],
- sizeof(md.ctr.ctr1.array[i])*(obj->object.attribute_ctr.num_attributes-(i+1)));
- obj->object.attribute_ctr.num_attributes--;
- i--;
- obj->meta_data_ctr->count--;
- continue;
- }
-
- werr = dsdb_attribute_ldb_to_drsuapi(sam_ctx, schema, el, obj,
- &obj->object.attribute_ctr.attributes[i]);
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0,("Unable to convert %s to DRS object - %s\n",
- sa->lDAPDisplayName, win_errstr(werr)));
- return werr;
+ ZERO_STRUCT(obj->object.attribute_ctr.attributes[i]);
+ obj->object.attribute_ctr.attributes[i].attid = md.ctr.ctr1.array[i].attid;
+ } else {
+ werr = dsdb_attribute_ldb_to_drsuapi(sam_ctx, schema, el, obj,
+ &obj->object.attribute_ctr.attributes[i]);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0,("Unable to convert %s to DRS object - %s\n",
+ sa->lDAPDisplayName, win_errstr(werr)));
+ return werr;
+ }
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list