summaryrefslogtreecommitdiffstats
path: root/source4/dsdb
Commit message (Collapse)AuthorAgeFilesLines
* s4-repl: make dreplsrv_partition_find_for_nc return BAD_NC onlyMatthieu Patou2012-10-071-2/+7
|
* drs-replica-info: level_not_supported is wrong when we do support (partialy ↵Matthieu Patou2012-10-071-9/+13
| | | | the level)
* drs-crackname: if there is no sid do not return the domainMatthieu Patou2012-10-071-0/+2
|
* Implement the LIST_INFO_FOR_SERVER input formatMatthieu Patou2012-10-071-0/+107
|
* s4-dsdb: Remove unused variablesAndrew Bartlett2012-09-011-3/+0
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Sep 1 05:10:47 CEST 2012 on sn-devel-104
* s4-dsdb: Remove unused tmp_ctx leaked onto long-term ldb_contextAndrew Bartlett2012-09-011-2/+0
| | | | | | | This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! Andrew Bartlett
* s4-dsdb: Remove double-free in update_keytab moduleAndrew Bartlett2012-08-281-2/+0
|
* s4-dsdb: Add secrets_tdb_sync - an ldb module to keep secrets.tdb in syncAndrew Bartlett2012-08-283-0/+539
| | | | | | | | | | | secrets_tdb_sync is a new ldb module designed to sync secrets.ldb entries with the secrets.tdb file. While not ideal to keep two copies of this data, this routine will assist in allowing the samba-tool domain join code to operate correctly in most cases where winbindd and smbd are used. Andrew Bartlett
* s4-dsdb: Remove unused variablesAndrew Bartlett2012-08-231-5/+0
|
* s4-dsdb: Do not use a possibly-old loadparm context in schema reloadAndrew Bartlett2012-08-233-19/+18
| | | | | | | | The loadparm context on the schema DB might have gone away already. Pre-cache the schema refresh interval at load time to avoid worrying about this. Andrew Bartlett
* s4:samldb LDB module - remove unused "member" attribute from search filterMatthias Dieter Wallnöfer2012-08-221-1/+1
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb - always fail if a search filter could not be parsedMatthias Dieter Wallnöfer2012-08-221-0/+3
| | | | | | A NULL string/expression returns the generic "(objectClass=*)" filter Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb_sort_objectClass_attr - simplify memory context handlingMatthias Dieter Wallnöfer2012-08-223-37/+23
| | | | | | | Do only require the out memory context and build the temporary one in the body of the function. This greatly simplifies the callers. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb_sort_objectClass_attr - use "data_blob_string_const" for setting valuesMatthias Dieter Wallnöfer2012-08-221-6/+1
| | | | | | | As shown in commit c8e6d8b487 this looks easier and in any case we can treat schema context data like global data. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: Use tmp_ctx in kccsrv_check_deleted to avoid leaking memory onto ↵Andrew Bartlett2012-08-171-6/+11
| | | | | | | | | | | | | | | | | | | part->dn The confusing use of do_dn as a memory context while legitimate created a bug when it was copied and modified to search on a DN from long-term state. By always using a temporary memory context it is clear what paramter is the memory context. This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 17 18:24:10 CEST 2012 on sn-devel-104
* s4-kcc: Avoid use-after-free of dn and add tmp_ctxAndrew Bartlett2012-08-171-2/+9
| | | | | | By using a tmp_ctx we are clearer about allocating temporary memory. Andrew Bartlett
* s4-dsdb: Ensure we always free tmp_ctx in schema refresh checkAndrew Bartlett2012-08-171-0/+2
| | | | | | | | | | | | | | This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! In that log, over 2.5 days this particular allocation was repeated: 1715099 talloc_new: ../source4/dsdb/samdb/ldb_modules/schema_load.c:120 contains 0 bytes in 1 blocks Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 17 06:21:18 CEST 2012 on sn-devel-104
* s4:dsdb/repl: fix the usage of 'GC/' prefixed principal namesStefan Metzmacher2012-08-141-21/+6
| | | | | | | | | | | | | | | | The "serverReference" attribute is available on the "server" object not on the "nTDSA" object. This allows connections to RODCs, as they don't have a E3514235-4B06-11D1-AB04-00C04FC2DCD2/${NTDSGUID}/${DNSDOMAIN} principal. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Aug 14 18:57:41 CEST 2012 on sn-devel-104
* s4-dsdb: Use samdb_dn_is_our_ntdsa()Andrew Bartlett2012-08-145-37/+61
| | | | | | | This uses a GUID based comparison, and avoids re-fetching the samdb_ntds_settings_dn each time. Andrew Bartlett
* s4-dsdb: Add samdb_dn_is_our_ntdsa()Andrew Bartlett2012-08-141-0/+25
| | | | | | This is like samdb_reference_dn_is_our_ntdsa but without the attribute de-reference. Andrew Bartlett
* s4-dsdb: Use samdb_reference_dn_is_our_ntdsa()Andrew Bartlett2012-08-141-35/+4
|
* s4-dsdb: Add helper function samdb_reference_dn_is_our_ntdsa()Andrew Bartlett2012-08-141-1/+39
| | | | | | | | We often want to know if we own an FSMO role (for example). This tries to be more efficient by comparing the GUID, rather than the string DN, as this does not need to be re-fetched each time. Andrew Bartlett
* s4-dsdb: Use ldb_dn_copy() rather than talloc_reference()Andrew Bartlett2012-08-141-1/+1
| | | | | | | | | As the normal case (outside provision) uses a copy, this avoids a case where a caller might modify a global variable accidentily. As suggested by metze. Andrew Bartlett
* s4-libnet: Improve debugging of libnet_BecomeDC LDAP errorsAndrew Bartlett2012-08-141-0/+2
|
* s4:dsdb/repl: ldb_errstring() takes a 'struct ldb_context' not 'int'Stefan Metzmacher2012-08-141-1/+2
| | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Aug 14 13:58:31 CEST 2012 on sn-devel-104
* s4:dsdb/repl: make sure instanceType_e is not changed by a reallocationStefan Metzmacher2012-08-141-1/+11
| | | | | | Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
* s4:dsdb/repl: avoid reallocation of msg->elementsStefan Metzmacher2012-08-141-1/+1
| | | | | | | | | | The index into the elements needs to match between msg->elements and md->ctr.ctr1.array, which means we should pre-allocate them with the same size. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
* s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dnAndrew Bartlett2012-08-1412-27/+42
| | | | | | | | | | | | | | As this value is calculated new each time, we need to give it a context to live on. If the value is the forced value during provision, a reference is taken. This was responsible for the memory leak in the replication process. In the example I was given, this DN appeared in memory 13596 times! Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Aug 14 10:05:14 CEST 2012 on sn-devel-104
* s4-dsdb: Improve memory handling in dsdb_schema_from_ldb_results() by adding ↵Andrew Bartlett2012-08-141-2/+14
| | | | a tmp_ctx
* s4-dsdb: Improve memory handling in kccsrv_add_connection()Andrew Bartlett2012-08-141-0/+5
|
* s4-dsdb: Improve memory handling in kccsrv_find_connections() by adding a ↵Andrew Bartlett2012-08-141-4/+15
| | | | tmp_ctx
* s4-dsdb: Add constAndrew Bartlett2012-08-141-4/+4
|
* s4-dsdb: Take more care in handling of global schema memoryAndrew Bartlett2012-08-112-28/+64
| | | | | | | | | | | | | | | This reworks dsdb_replicated_objects_commit() to have a proper local tmp_ctx and to be more careful about what schema is set (only setting a global schema if the original schema was global). In particular, the new working_schema is not given a talloc reference to the old schema. This ensures that the old schema can go away when no longer used. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Aug 11 10:31:57 CEST 2012 on sn-devel-104
* s4-dsdb: Remove support for per-partition sequence numbersAndrew Bartlett2012-08-111-23/+0
| | | | | | | | | | | These sequence numbers were only used for telling if the schema was changed, and are no longer directly related to the replication USN. The per-partition replication USN can be obtained from the @REPLCHANGED record on the per-partition database, and this is done with an ldb_search(). Andrew Bartlett
* s4-dsdb: Use only the replication USN for schema reload.Andrew Bartlett2012-08-112-66/+0
| | | | | | | | | | | This way we do not track both the partition seq number and the replication USN for schema reload purposes. We only need one indication of actual data change, and the replication per-partition sequence number is no more expensive to obtain than the ldb per-partition sequence number. Andrew Bartlett
* build: rename security → samba-securityBjörn Jacke2012-08-102-9/+9
| | | | | | | | | there is a libsecurity on OSF1 which clasheѕ with our security lib. see bug #9023. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Aug 10 14:22:21 CEST 2012 on sn-devel-104
* s4-dsdb: Explain better what records are written during schema setAndrew Bartlett2012-08-102-10/+19
| | | | | | This is controlled by setting write_indices_and_attributes. Andrew Bartlett
* s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sortAndrew Bartlett2012-08-091-7/+0
| | | | | | | | | | | In all callers, we must already have a attributeID for each of the values or else we would have already given an error, or could not have obtained the message over DRS. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 9 11:39:54 CEST 2012 on sn-devel-104
* s4-dsdb: Do not reload partition metadata except on transaction startAndrew Bartlett2012-08-091-11/+0
| | | | | | | | This ensures that we do not add objects that should go into a partition, but we simply return that an object is not present if the connection was created before the partition was loaded. It is rare to create a new partition. Andrew Bartlett
* s4-pydsdb: Provide control of if we should write index attributes when ↵Andrew Bartlett2012-08-091-2/+4
| | | | | | | | reloading a schema This allows us to carefully control the loading of the schema. Andrew Bartlett
* s4-dsdb: Change talloc parentAndrew Bartlett2012-08-091-1/+1
| | | | | | | | | This matches the rest of the function. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 9 06:26:36 CEST 2012 on sn-devel-104
* s4-dsdb: Remove ldb_sequence_type argument from ↵Andrew Bartlett2012-08-092-4/+4
| | | | | | | | partition_primary_sequence_number We always want LDB_SEQ_HIGHEST_SEQ here. Andrew Bartlett
* s4-dsdb: simplify migration of old-style seqence numbers to metadata.tdbAndrew Bartlett2012-08-092-150/+53
| | | | | | This simple operation does not need to be encased in generic ldb extended operations. Andrew Bartlett
* s4-dsdb: Reduce calls to the ldb layer by reloading less oftenAndrew Bartlett2012-08-092-14/+26
| | | | | | | We do not need to reload the partition list to get the global sequence number, as that number is stored in the metadata.tdb, not the ldb files. Andrew Bartlett
* s4:libcli/pyerrors: s/PyErr_WERROR_IS_ERR_RAISE/PyErr_WERROR_NOT_OK_RAISE/Stefan Metzmacher2012-08-061-5/+5
| | | | metze
* s4:dsdb:replicated_objects: do not move 'instanceType' to the end of ↵Stefan Metzmacher2012-08-031-1/+22
| | | | | | | | | msg->elements on RODC replication It's very important that the order of msg->elements and md->ctr.ctr1.array is the same. metze
* s4-dsdb: Replace any existing lastKnownParent attribute during deleteAndrew Bartlett2012-07-311-1/+1
| | | | | | This allows a lastKnownParent from LostAndFound to be replaced. Andrew Bartlett
* s4-dsdb: Improve tracing in repl_meta_dataAndrew Bartlett2012-07-311-7/+8
| | | | | | | When we call ldb_module_done() rather than just calling the callback, we make log entries that are critical in debugging. Andrew Bartlett
* s4-dsdb: Handle rename conflicts in both directionsAndrew Bartlett2012-07-311-49/+87
| | | | | | | | | Previously we would only consider renaming the local object, now we can cope with renaming the remote object as well. This should avoid most of the cases where Samba AD replication can just stop. Andrew Bartlett
* s4-dsdb: Request extended DN and show deleted when searching for a possible ↵Andrew Bartlett2012-07-311-2/+4
| | | | | | | | | | parent This fixes up the lastKnownParent attribute on lostAndFound objects to have a GUID (found by dbcheck). Andrew Bartlett