summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_set.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-10s4-dsdb: Explain better what records are written during schema setAndrew Bartlett1-7/+16
This is controlled by setting write_indices_and_attributes. Andrew Bartlett
2012-06-22s4-schema: keep track of the timestamp of the most recently changed/created ↵Matthieu Patou1-1/+11
object
2012-04-18s4-schema: rename dsdb_attribute_from_ldb to dsdb_set_attribute_from_ldb ↵Matthieu Patou1-2/+2
and dsdb_class_from_ldb to dsdb_set_class_from_ldb
2011-11-15s4:dsdb/schema: add "dsdb:schema update allowed" option to enable schema updatesStefan Metzmacher1-0/+1
By default schema updates are not allowed anymore, as we don't have complete validation code to prevent database corruption. metze
2011-11-15s4:dsdb/schema: pass and remember the schema_dn in dsdb_set_schema_from_ldif()Stefan Metzmacher1-3/+11
metze
2011-10-07s4-dsdb: fixed one_way_link calculationAndrew Tridgell1-1/+2
we need to check for the other end of the link, not the current linkID Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09move schema_fill_constructed() call to dsdb_setup_sorted_accessors()Andrew Bartlett1-5/+7
2011-08-09s4-dsdb Remove unused schema functionAndrew Bartlett1-18/+0
2011-08-09s4-dsdb: added SAMDB_INDEXING_VERSION to @INDEXLISTAndrew Tridgell1-0/+11
this can be used to force re-indexing of samdb when we change something that affects index comparison, in this case the canonicalisation of booleans Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09s4-dsdb: ensure we setup the dn_format field in schema attributesAndrew Tridgell1-0/+40
this ensures we setup dn_format when we do runtime schema changes Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21update/add my copyrightMatthieu Patou1-0/+1
2011-02-10ldb: use #include <ldb.h> for ldbAndrew Tridgell1-1/+1
thi ensures we are using the header corresponding to the version of ldb we're linking against. Otherwise we could use the system ldb for link and the in-tree one for include Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-15s4-dsdb_schema: Seize using global_schema when referencing new schema for an LDBKamen Mazdrashki1-0/+6
Without this change, when a schema is set to ldb, the effect is that dsdb_get_schema() returns global_schema preferably. Thus we end up with two schemas in effect: - global one, which is the old one and it is still used everywhere - new one, which is just cached in ldb, but can't be used, as there is no way to access it
2010-10-12torture/becomedc: Add test for global schema, use samdb_connect().Jelmer Vernooij1-1/+6
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Tue Oct 12 18:35:33 UTC 2010 on sn-devel-104
2010-10-10s4-dsdb: Make dsdb_setup_sorted_accessors() publicKamen Mazdrashki1-2/+2
We are going to need it while converting DRS schema.
2010-08-11s4-dsdb: fix attributes_by_msDS_IntId index sortingKamen Mazdrashki1-1/+5
2010-07-19s4-dsdb: use ldb_msg_normalize() in source4/dsdb/schema/schema_set.cKamen Mazdrashki1-5/+4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-dsdb/schema/schema_set.c: fix trailing spaces and comments spellingKamen Mazdrashki1-30/+38
Few comments split on several lines also... (Sorry Metze, I know you hate reviewing "and this, and that" type of patches, but those are just cosmetics) Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.cKamen Mazdrashki1-2/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-07s4-dsdb: use ldb_operr() in the dsdb codeAndrew Tridgell1-7/+6
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)" in places in the dsdb code where we don't already explicitly set an error string. This should make is much easier to track down dsdb module bugs that result in an operations error.
2010-07-03s4:schema_set.c - Fix a commentMatthias Dieter Wallnöfer1-1/+2
2010-07-03s4:dsdb_schema_set_attributes - remove unneeded filter criteriasMatthias Dieter Wallnöfer1-2/+4
We already choose the right entry by specifying the right basedn with scope "LDB_SCOPE_BASE".
2010-07-03s4:schema_set.c - fix typoMatthias Dieter Wallnöfer1-1/+3
2010-07-02s4/schema: remove unnecessary deletion of dsdb_schema cached pointerAnatoliy Atanasov1-3/+0
This is needed so we can find and free old schemas based using the cached pointer
2010-07-02s4:dsdb Ensure we free old schema copiesAndrew Bartlett1-6/+25
It was reported by aatanasov that we kept around one whole schema per modification made. This does not fix that, but I hope moves us closer to a fix The most important part of the fix is that: - if (schema_out != schema_in) { - talloc_unlink(schema_in, ldb); - } was the wrong way around. This is now handled in the schema_set calls. Andrew Bartlett
2010-06-30s4:schema/schema_set.c - free LDB message diffsAnatoliy Atanasov1-0/+2
Especially the "free"s after "ldb_msg_diff" are very important since the diff message is allocated on the long-living LDB context. Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-06-21s4/dsdb: msg_idx->dn should be allocated in msg_idx mem contextKamen Mazdrashki1-1/+1
2010-06-21s4/dsdb: Move schema accessors cleanup in separate functionKamen Mazdrashki1-18/+21
This way dsdb_setup_sorted_accessors() will free memory allocated for accessor arrays correctly in case of failure,
2010-06-21s4/dsdb-schema: Index attributes on msDS-IntId valueKamen Mazdrashki1-2/+23
O(n) search for dsdb_attribute by msDS-IntId value was replaced by binary-search in ordered index. I've choosen the approach of separate index on msDS-IntId values as I think it is more clear what we are searching for. And it should little bit faster as we can clearly determine in which index to perform the search based on ATTID value - ATTIDs based on prefixMap and ATTIDs based on msDS-IntId are in separate ranges. Other way to implement this index was to merge msDS-IntId values in attributeID_id index. This led me to a shorted but not so obvious implementation.
2010-06-12s4:dsdb Simplfy match of objectclass in dsdb_schema_set_el_from_ldb_msgAndrew Bartlett1-17/+4
There is no need to do a full ldb_match_msg() for a simple case insensitive string. Andrew Bartlett
2010-06-12s4:dsdb Put back the reference and set_attributes in dsdb_reference_schemaAndrew Bartlett1-0/+9
I'm not sure why I removed these in fe3e1af901c970f738bee92baac5d7d4f5736e17 Andrew Bartlett
2010-05-18Finish removal of iconv_convenience in public API's.Jelmer Vernooij1-1/+1
2010-04-29s4/dsdb: Use default schemaInfo value when no such value is givenKamen Mazdrashki1-4/+1
Having no value for schemaInfo is totally OK as it turns out. In such cases, we should use a default value with all fields set to 0.
2010-04-09s4/dsdb: Let caller to control if valid invocationId is critical or ↵Kamen Mazdrashki1-1/+1
zero-guid is acceptable
2010-04-09s4/dsdb: Use dsdb_schema_info object to create default schemaInfo valuesKamen Mazdrashki1-4/+6
2010-03-22s4:dsdb Rework schema loading and add schema reloadingAndrew Bartlett1-25/+55
This commit reworks Samba4's schema loading code to detect when it needs to reload the schema. This is done by watching the @REPLCHANGED special DN. The reload happens by means of a callback, which is only set when the schema is loaded from the ldb - not when loaded from an LDIF file or DRS. We also rework the global schema handling - instead of storing the pointer to the global schema in each ldb, we store a flag indicating that the global schema should be returned at run time. This makes it much easier to switch to a new global schema. Andrew Bartlett
2010-03-16s4:dsdb Add a memory context for dsdb_get_schema()Andrew Bartlett1-3/+9
When specified, we talloc_reference onto this context to ensure that pointers found in it are valid for the life of the objects they are placed into. (Such as the string form of LDAP attributes). Andrew Bartlett
2010-03-07s4:schema - Change also here counters to "unsigned" where neededMatthias Dieter Wallnöfer1-1/+1
Counters which are used in the way "for (i = 0; array[i] != NULL; i++)" I modified to "unsigned" since for sure we don't want to have negative array indexes there.
2010-02-16s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flagsAndrew Tridgell1-2/+2
This allows for controls to be added easily where they are needed.
2010-02-13s4-dsdb: use TYPESAFE_QSORT() in dsdb codeAndrew Tridgell1-16/+9
2009-12-21s4-schema: fixed the sorting of schema attributesAndrew Tridgell1-3/+9
another case of unsigned int subtracting breaking sorts. This one surfaced now as attributeID_id now can be larger than 2^31
2009-12-10s4-schema: use GUID_to_ndr_blob()Andrew Tridgell1-4/+4
2009-11-17s4:schema Add the GUID to each defaultObjectCategory when loading from LDIFAndrew Bartlett1-0/+49
This makes these full extended DNs, so we set the right values into the database, even before we actually set the schema objects themselves. Andrew Bartlett
2009-11-12s4:dsdb/schema Allow a schema set when bound against a remote LDAP serverAndrew Bartlett1-3/+3
2009-11-12s4:dsdb/schema Simplify schema loading from ldb messagesAndrew Bartlett1-36/+34
It turns out that we always add the class/attribute to the schema.
2009-10-12s4:schema Add some error checking to the schema loadAndrew Bartlett1-1/+4
2009-09-15s4-dsdb: use DLIST_ADD() not DLIST_ADD_END()Andrew Tridgell1-2/+2
Using DLIST_ADD_END() to construct a long list is very inefficient (it is O(n^2). These lists are not ordered, so using DLIST_ADD() is much better.
2009-08-17s4:schema Allow a schema load on an unconnected databaseAndrew Bartlett1-5/+6
This helps ensure we don't load the schema too often in the provision (allowing a reference in of the schema before the modules load). Andrew Bartlett
2009-08-17s4:schema Provide a way to reference a loaded schema between ldbsAndrew Bartlett1-11/+19
This allows us to load the schema against one ldb context, but apply it to another. This will be useful in the provision script, as we need the schema before we start the LDAP server backend. Adnrew Bartlett
2009-08-07use talloc with the global schema consistentlyAndrew Tridgell1-1/+2
Before this change, the first opener of the sam ldb context would become the owner of the global schema, then the autofree context got a reference to the schema. Any subsequent opens of the sam ldb also got a reference. This meant that the talloc hierarchy was inconsistent between the first sam ldb open and subsequent opens. With this change the autofree context becomes the owner of the global schema, and all ldb contexts get a reference.