summaryrefslogtreecommitdiff
path: root/source4/dsdb
AgeCommit message (Collapse)AuthorFilesLines
2009-09-12s4-repl: don't be too eager to allocate new sequence numbersAndrew Tridgell1-7/+9
we only need to allocate a new sequence number when replPropertyMetaData is changing or being created on an object
2009-09-12s4-samdb: internal s4 ldb modules should be GPL not LGPLAndrew Tridgell8-95/+63
I think these modules ended up LGPL because someone based the module on an existing LGPL module in the core ldb, and it spread from there. Certainly there is no reason for the ldb modules that are not distributed as part of ldb to be LGPL.
2009-09-12s4-repl: we should only update uSNChanged when replication data changesAndrew Tridgell1-29/+39
When changing non-replicated attributes we should not update the uSNChanged attribute on the record, otherwise the DRS server will think this record needs replicating.
2009-09-12s4-kcc: we should only add to the repsFrom if it doesn't already existAndrew Tridgell2-45/+182
If we already have a repsFrom for a particular DC and naming context then we should not overwrite it, as it contains info on what replication we've already done
2009-09-12repl_meta_data: Fix include path when building with standalone ldb.Jelmer Vernooij1-1/+1
2009-09-11s4-vampire: cope with no invocationID when vampiring the schemaAndrew Tridgell1-3/+4
2009-09-11s4-repl: refresh the partitions on each cycleAndrew Tridgell2-3/+4
The KCC might have changed repsFrom, which is stored in the partitions structure
2009-09-11s4-kcc: add a very simple KCCAndrew Tridgell4-0/+533
A KCC is a 'Knowledge Consistency Checker', a fancy name for a daemon that works out who will replicate with who in a AD domain. This implements an extremely simple KCC task that just wants to replicate with everyone :-)
2009-09-11s4-repl: don't update replPropertyMetaData for non-replicated attributesAndrew Tridgell1-0/+7
thanks to Metze for spotting this
2009-09-11s4-repl: on every ldb modify we need to update replPropertyMetaDataAndrew Tridgell1-8/+171
Every time we change a ldb object with the repl_meta_data module loaded we need to update the replPropertyMetaData attribute to fix the timestamps and USNs of the attributes being changed.
2009-09-11s4-repl: don't add the RDN if it is already thereAndrew Tridgell1-3/+19
2009-09-11s4-drs: add the magic DRS SPNs on AddEntryAndrew Tridgell1-23/+2
When a DsAddEntry is used to create a nTDSDSA object we need to also create the SPNs for the NTDS GUID in the servers machine account.
2009-09-10s4/repl: give a useful error message if we can't decode an objectAndrew Tridgell1-1/+4
2009-09-10s4/schema: teach the schema_syntax code how to encode/decode more attributesAndrew Tridgell1-0/+104
We were trying to encode strings like 'top' as integers, without first looking them up in our schema. We need special handling for all the attributes that contain attributeID_id or governsID_id fields that should be translated first before encoding.
2009-09-10s4/schema: don't crash if we don't have subClassOfAndrew Tridgell1-2/+7
2009-09-09s4/repl: implement DsReplicaSyncAndrew Tridgell2-0/+42
This patch implements DsReplicaSync by passing the call via irpc to the repl server task. The repl server then triggers an immediate replication of the specified partition. This means we no longer need to set a small value for dreplsrv:periodic_interval to force frequent DRS replication. We can now wait for the DC to send us a ReplicaSync msg for any partition that changes, and we immediately sync that partition.
2009-09-09s4/repl: added refresh of repsToAndrew Tridgell1-1/+87
I've found that w2k3 deletes the repsTo records we carefully created in the vampire join if we don't refresh them frequently. After about 30mins all 3 repsTo records are gone. This patch adds automatic refresh of the repsTo by calling DSReplicaUpdateRefs every time we do a sync cycle with the server
2009-09-08s4:repl_meta_data: remove unused codeStefan Metzmacher1-11/+0
metze
2009-09-08s4:drsuapi: add an incomplete DsAddEntry implementationStefan Metzmacher1-8/+157
metze
2009-09-07s4:templates - Remove the latest relics (in "dcesrv_lsa_CreateSecret")Matthias Dieter Wallnöfer1-104/+0
2009-09-07s4:dsdb: correctly implement _dsdb_syntax_OID_oid_ldb_to_drsuapi()Stefan Metzmacher1-1/+31
Here we just need to map the oid string in the ldb value to the ATTRTYP id. metze
2009-09-07s4:simple_ldap_map - "primaryGroupId"Matthias Dieter Wallnöfer1-4/+15
Previous patch was incomplete regarding the "primaryGroupId" attribute. Complete it.
2009-09-07s4:samldb - Fix typoMatthias Dieter Wallnöfer1-1/+1
2009-09-07s4:subtree delete module - Cosmetic adaptionsMatthias Dieter Wallnöfer1-11/+16
2009-09-07s4:samldb - Major reworkMatthias Dieter Wallnöfer1-243/+1000
This fixes up the change of the primary group of a user when using the ADUC console: - When the "primaryGroupId" attribute changes, we have to delete the "member"/"memberOf" attribute reference of the new primary group and add one for the old primary group. - Deny deletion of primary groups according to Windows Server (so we cannot have invalid "primaryGroupID" attributes in our AD). - We cannot add a primary group directly before it isn't a secondary one of a user account. - We cannot add a secondary reference ("member" attribute) when the group has been chosen as primary one. This also removes the LDB templates which are basically overhead now. This should also fix bug #6599.
2009-09-06s4:simple_ldap_map - Enhance it for supporting "primaryGroupID" in the right wayMatthias Dieter Wallnöfer1-14/+25
2009-09-06s4:"linked attributes" modules - correct the commentsMatthias Dieter Wallnöfer1-2/+2
2009-09-06s4:dsdb/common/util.c - Copy parameters to prevent segfaultsMatthias Dieter Wallnöfer1-3/+8
The parameters "lmNewHash" and/or "ntNewHash" could be NULL and when we perform write operations on them (look below in the code) we could get SIGSEGVs!
2009-09-06s4:dsdb/common/util - Indentation fixesMatthias Dieter Wallnöfer1-4/+5
2009-09-04s4: fixed a missing NULL termination in a attribute list passed to ldb_searchAndrew Tridgell1-1/+1
2009-09-03Fix the dsdb_syntax_OID_ldb_to_drsuapi functionAnatoliy Atanasov1-1/+51
This replace the dsdb_syntax_FOOBAR_ldb_to_drsuapi function, which was left as a TODO code. Implementation in both added functions is completely identical and probably should differ in the future.
2009-09-03another large change to the linked_attribute moduleAndrew Tridgell1-20/+64
This one copes with deleted objects where linked attributes have been set on the module. We hit this when we do the ldb wipe at the start of a provision, which trigers linked attribute updates, but for objects that have disappeared. We need to ensure that the linked attribute updates only happen on the right object, and if the object gets re-created (as happens with a provision) then it is not the right object. To cope with this we record the GUID of the object when the operation that triggered the linked attribute update comes in, and then find the DN by suing that GUID when we apply the change in the prepare commit hook.
2009-09-03hook on prepare_commit instead of transaction_endAndrew Tridgell2-8/+11
This allows for safe transaction end aborts
2009-09-03greatly simplify the transaction processing in the partition moduleAndrew Tridgell1-51/+29
Now that ldb is calling prepare commit separately, the job of the partition module on transaction end is much simpler (and more robust!)
2009-09-03added dsdb_find_guid_by_dn()Andrew Tridgell1-1/+21
This will be used by the linked_attribute module
2009-09-03change repl_meta_data to process linked_attributes structures in end_transactionAndrew Tridgell1-4/+276
When running at functional level 2 or above, the repl_meta_data module can receive linked attribute structures from the repl replication task. These attributes can come through DRS before the associated objects have been created. To cope with this, we need to process linked attributes in the end_transaction hook.
2009-09-03fixed transaction handling in linked_attributes moduleAndrew Tridgell1-76/+4
We need to call down to the next transaction function when we finish in linked_attributes. This also changes linked_attributes to use the common dsdb_find_dn_by_guid() function
2009-09-03add the the linked attributes elements to the repl structureAndrew Tridgell2-1/+9
This exposes the linked_attributes to the repl_meta_data module
2009-09-03tell the server that we support linked attribute replicationAndrew Tridgell1-6/+1
2009-09-03added dsdb_find_dn_by_guid()Andrew Tridgell1-0/+78
This came from the linked_attributes module, but now the repl_meta_data module needs the same functionality, so move it to a common routine.
2009-09-02traverse the ac list in reverse orderAndrew Tridgell1-1/+6
items are added to the linked attribute list using DLIST_ADD(), which means to commit them to the database in the same order they came from the server we need to walk the list backwards when we traverse it
2009-09-02s4:dsdb rewrite the linked_atrributes code to commit in the end_transaction hookAndrew Tridgell1-107/+281
linked attribute changes can come in any order. This means it is possible for a forward link to come over the wire in DRS before the target even exists. To make this work this patch changed the linked attributes module to gather up all the changes it needs to make in a linked list, then execute the changes in the end_transaction hook for the module. During that commit phase we also fix up all the DNs that we got by searching for their GUID, as the objects may have moved after the linked attribute was sent, but before the end of the transaction
2009-09-02add the partition_control control to replication requestsAndrew Tridgell1-0/+22
We know the partition DN from the DRS objects, we need to pass this down the modules below us to ensure they operate on the right partition
2009-09-02change the dsdb_control_current_partition to not include internal variablesAndrew Tridgell2-82/+88
This structures was used in two ways. In one way it held variables that are logically internal to the partition module, and in the other way it was used to pass the partition DN down to other modules. This change makes the structure contain just the dn which is being passed down. This change is part of the support for linked attributes. We will be passing this control down from above the partition module to force which partition a request acts upon. The partition module now only adds this control if it isn't already there.
2009-09-02Display ldif formatted versions of all DRS changes at log level 4Andrew Tridgell1-0/+18
This helps a lot with debugging the DRS replication code
2009-09-02Wrap DRS changes in a transactionAndrew Tridgell1-0/+18
We should always apply a whole set of DRS changes or none of them. See [MS-DRSR] 3.3.2
2009-09-02fixed spellingAndrew Tridgell1-1/+1
2009-08-26s4:schema Rework dsdb_write_prefixes_from_schema_to_ldb() to use tallocAndrew Bartlett1-14/+20
This changes dsdb_write_prefixes_from_schema_to_ldb() to use an internal talloc hirarchy, so we can safely give it a NULL context from the python. It also fixes manual construction of the ldb_message - we now use the right helper functions. Andrew Bartlett
2009-08-26s4:scheam quiet a 'const' warningAndrew Bartlett1-1/+1
2009-08-26s4:dsdb Rework dsdb_write_prefixes_to_ldb() to take a schemaAndrew Bartlett1-14/+13
The aim is to create a function that is more easily wrapped for python, so that we can write the updated prefixMap in an upgrade script. Andrew Bartlett