diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-06-10 09:10:09 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-06-10 10:14:56 +1000 |
commit | 3e4c08096d913834143b23f4fbc662d92659a83f (patch) | |
tree | 9c1c8716bbd104b042600bc5642f08bdf29058c0 /source4/rpc_server/drsuapi | |
parent | fe02f47de04e5e83273ad012effbe15794cd99c1 (diff) | |
download | samba-3e4c08096d913834143b23f4fbc662d92659a83f.tar.gz samba-3e4c08096d913834143b23f4fbc662d92659a83f.tar.bz2 samba-3e4c08096d913834143b23f4fbc662d92659a83f.zip |
s4-drs: cope with missing RMD_ADDTIME in linked attributes
upgraded links can be missing the RMD_ADDTIME field
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 0c196aab55..72f954d2b2 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -360,10 +360,6 @@ static WERROR get_nc_changes_add_la(TALLOC_CTX *mem_ctx, la->attid = sa->attributeID_id; la->flags = active?DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE:0; - status = dsdb_get_extended_dn_nttime(dsdb_dn->dn, &la->originating_add_time, "RMD_ADDTIME"); - if (!NT_STATUS_IS_OK(status)) { - return ntstatus_to_werror(status); - } status = dsdb_get_extended_dn_uint32(dsdb_dn->dn, &la->meta_data.version, "RMD_VERSION"); if (!NT_STATUS_IS_OK(status)) { return ntstatus_to_werror(status); @@ -381,6 +377,12 @@ static WERROR get_nc_changes_add_la(TALLOC_CTX *mem_ctx, return ntstatus_to_werror(status); } + status = dsdb_get_extended_dn_nttime(dsdb_dn->dn, &la->originating_add_time, "RMD_ADDTIME"); + if (!NT_STATUS_IS_OK(status)) { + /* this is possible for upgraded links */ + la->originating_add_time = la->meta_data.originating_change_time; + } + werr = dsdb_dn_la_to_blob(sam_ctx, sa, schema, *la_list, dsdb_dn, &la->value.blob); W_ERROR_NOT_OK_RETURN(werr); |