summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema.h
AgeCommit message (Collapse)AuthorFilesLines
2012-06-22s4-schema: improve the documentation of the dsdb_schema structureMatthieu Patou1-4/+6
2012-06-22s4-dsdb: Check for key SCHEMA_SEQ_NUM in metadata.tdb updatesMatthieu Patou1-1/+8
If the value has changed then reload the schema, this means that now the schema is only reloaded on a periodical basis or if we have been asked explicitly to do it and not necesserly if the schema partition has changed.
2012-06-22s4-schema: keep track of the timestamp of the most recently changed/created ↵Matthieu Patou1-0/+1
object
2012-06-22dsdb-schema: do not reload more often than schema_reload_intervalMatthieu Patou1-0/+1
Samba 4 use to try to reload the schema every time dsdb_get_schema was called (which could be 20+ time per ldb request). Now we only reload at most every xx seconds (xx being the value of dsdb:"schema_reload_interval" or 120). The timestamp of the last reloaded schema is kept in the dsdb_schema object. There is also a timestamp in the ldb_context, that is used by the LDAP server to know if it has to reload the schema after handling the request. This is used to allow that the schema will be immediately reload after a schemaUpdateNow request has been issued, the reload can't occur in the handling of the LDAP request itself because we have a transaction autostarted.
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-08-09s4-dsdb: add auto-normalisation of attributesAndrew Tridgell1-0/+1
this auto-normalises some attributes when they are added/modified. The list that we auto-normalise is currently: Boolean INT32 INTEGER UTC_TIME This fixes a problem with groupType being stored in an unnormalised form Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-04s4-dsdb: added dn_format attribute of a dsdb_attributeAndrew Tridgell1-0/+9
this is faster than string comparisons during searches at runtime Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04s4-dsdb: setup a one_way_link attribute on schema attributesAndrew Tridgell1-0/+2
this allows us to quickly determine if a DN is a one way link Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-21s4-schema: add systemFlags to dsdb classes objectsMatthieu Patou1-0/+1
2010-11-11s4-dsdb_syntax: Add remote prefixMap member for dsdb_syntax conversionsKamen Mazdrashki1-0/+3
2010-10-11dsdb/schema: Move some dsdb_dn functions that are schema-specific.Jelmer Vernooij1-0/+1
2010-08-19s4-dsdb-syntax: ATTID should be msDs-IntId value for the attributeSchema objectKamen Mazdrashki1-0/+3
in case object replicated is not in Schema NC and attributeSchema object has msDs-IntId attribute value set
2010-08-19s4-dsdb: Use dsdb_syntax_ctx in *_drsuapi_to_ldb functionsKamen Mazdrashki1-2/+1
2010-08-19s4-dsdb: Use dsdb_syntax_ctx in *_ldb_to_drsuapi functionsKamen Mazdrashki1-2/+1
2010-08-19s4-dsdb: Use dsdb_syntax_ctx in *_validate_ldb functionsKamen Mazdrashki1-2/+1
2010-08-19s4-dsdb: Add context structure for dsdb_syntax conversion functionsKamen Mazdrashki1-0/+6
This structure is intended to hold context-dependent data. Syntax-conversion and object-conversion functions need that data to convert objects and attributes from drs-to-ldb and ldb-to-drs correctly. For instance: ATTID value depends on whether we are converting object from partition different that Schema partition.
2010-06-21s4/dsdb-schema: Index attributes on msDS-IntId valueKamen Mazdrashki1-0/+2
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-15s4:dsdb Allow the setting an override on the schemaAndrew Bartlett1-0/+3
The change here is to try and convert a per the previous rules, but if we don't know a particular OID as a attributeID, then store it as an OID (for example). This allows known values to be converted as before, but still copes with unknown values. Andrew Bartlett Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-2/+0
2010-04-09s4/dsdb: Define dsdb representation for schemaInfo attributeKamen Mazdrashki1-0/+8
2010-03-22s4:dsdb Add a shortcut sequence number for schema reloadsAndrew Bartlett1-0/+2
This uses the ldb sequence number, in a hope to detect an unchanged schema quicker. Andrew Bartlett
2010-03-22s4:schema Expand the schema structureAndrew Bartlett1-0/+9
We now store the location of the schema in the schema, and provide hooks for a future schema reloading mechanism. Andrew Bartlett
2010-01-13s4:dsdb/schema: add inftrastructure for dsdb_validate_ldb()Stefan Metzmacher1-0/+4
metze
2010-01-08s4/dsdb_schema: fetch msDS-IntId value during SCHEMA replicationKamen Mazdrashki1-0/+1
2009-12-01s4:schema - Make some more (result) variables const and fix up warnings with ↵Matthias Dieter Wallnöfer1-4/+4
"discard_const_p"
2009-11-17s4:dsdb Load objectGUID and extended DN defaultObjectCategory into the schemaAndrew Bartlett1-0/+2
The load of defaultObjectCategory as an extended DN means we need to use the common parsing functions I just split out, rather than the GET_DS_DN macro. The objectGUIDs are loaded so that we can create the extended DN when we load from LDIF (and are loaded for the other cases for consistency). Also adapt callers to API changes needed for common parsing code Andrew Bartlett
2009-11-06s4/drs: Remove unused structures and functionsKamen Mazdrashki1-5/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06s4/drs: remove unused num_prefixes and prefixes from dsdb_schemaKamen Mazdrashki1-2/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06s4/drs: dsdb_schema uses dsdb_schema_prefixmap definitionKamen Mazdrashki1-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-10-21s4/drs(tort): Unit test for prefixMap implementation.Kamen Mazdrashki1-0/+2
Currenly those tests cover only the main part of the interface, i.e. dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid() and dsdb_schema_pfm_oid_from_attid()
2009-10-03s4:dsdb add systemPossibleInferiors to schema codeAndrew Bartlett1-0/+1
This allows us to figure out what the system can add, which will not be in possibleInferiors due to the systemOnly flag. Andrew Bartlett
2009-09-15s4:schema Add code to provide an index into the subClass treeAndrew Bartlett1-0/+7
In time, this should avoid the astounding (order) complexity of the objectclass sorting in objectclass.c eventually. Andrew Bartlett
2009-07-02fixed the pull of drs schema elementsAndrew Tridgell1-0/+9
The previous code incorrectly assumed that attributes such as subClassOf come over the wire as strings. In fact they come over as 32 bit integers which refer to goversIDs. We have to post-process these as it sometimes happens that a governsID comes over the wire before the record that defines what it means.
2009-04-09fixed the possibleInferiors calculation so it now passes the testAndrew Tridgell1-1/+0
We are probably still using more memory here than we need to. That needs to be looked at.
2009-04-08Make the schema_inferiors generation code to compileAndrew Bartlett1-0/+6
Sadly it still segfaults at this stage Andrew Bartlett
2009-04-02major upgrade to the ldb attribute handlingAndrew Tridgell1-0/+16
This is all working towards supporting the full WSPP schema without a major performance penalty. We now use binary searches when looking up classes and attributes. We also avoid the loop loading the attributes into ldb, by adding a hook to override the ldb attribute search function in a module. The attributes can thus be loaded once, and then saved as part of the global schema. Also added support for a few more key attribute syntaxes, as needed for the full schema.
2008-12-20Now store the GUID and SID from a DN over DRSUAPI into ldb.Andrew Bartlett1-2/+4
Until the extended DN work was compleated, there was no way to store the additional metadata. Andrew Bartlett
2008-11-16s4:dsdb/schema: use pointers for rangeLower and rangeUpper.Stefan Metzmacher1-2/+2
This makes clear there's an value stored in the schema, as they can be '0'. metze
2008-08-18Note the ldb syntax for attribute syntaxes in the table.Andrew Bartlett1-0/+1
This includes additional Samba-specific syntaxes made available from the ldif_handlers code. This commit also changes some table to use #defines, to ensure consistancy in other parts of the code. Andrew Bartlett (This used to be commit e26a5efd9a580ed3728e1f449e367b1cd4a73b5f)
2008-08-18Merge the two attribute syntax tables.Andrew Bartlett1-8/+3
This merges the table once found in the oLschema2ldif tool (and moved many times) with the table used for DRSUAPI. The OpenLDAP schema map has been updated, to ensure that despite a number of attributes being declared as OIDs, they are actually used as strings (as they are actually LDAP class/attribute names). Andrew Bartlett (This used to be commit 61f2958c84beeedcf369ccdc02afed0c8055b108)
2008-08-15Generate the subSchema in cn=AggregateAndrew Bartlett1-0/+14
This reads the schema from the in-memory structure, when the magic attributes are requested. The code is a modified version of that used in the ad2oLschema tool (now shared). The schema_fsmo module handles the insertion of the generated result. As such, this commit also removes these entries from the setup/schema.ldif Metze's previous stub of this functionality is also removed. Andrew Bartlett (This used to be commit c7c32ec7b42bdf0f7b669644516438c71b364e60)
2008-07-11Use common code to fill in allowedAttributes in kludge_acl.Andrew Bartlett1-1/+2
This code is now in common with ad2oLschema. Andrew Bartlett (This used to be commit 0a797388ca442c3ad4809888897b1c63b65a7fdf)
2008-07-10Make ad2oLschema even simpler, by moving the heavy work into dsdb.Andrew Bartlett1-0/+9
This will allow the kludge_acl and schema code to leverage the same work. (We might even get schema validation soon! :-) Andrew Bartlett (This used to be commit cecd04ce1f8ce2af2fb654b3abc1499092405d60)
2008-07-01schema_fsmo: move fsmo info into struct dsdb_schemaStefan Metzmacher1-0/+5
metze (This used to be commit 8538d305c803268c712a90879f29a2a74ba0ef03)
2008-02-19Remove uses of global_loadparm.Jelmer Vernooij1-0/+2
(This used to be commit 138aaef0781e0754cc17b3ffdaa6062ba70c0c6a)
2007-12-21r26483: Merge ldb module dependency fixes, fix auth python module.Jelmer Vernooij1-0/+2
(This used to be commit 85eeecf997a071ca7e7ad0247e8d34d49b7ffcbb)
2007-10-10r24712: No longer expose the 'BOOL' data type in any interfaces.Jelmer Vernooij1-11/+11
(This used to be commit 1ce32673d960c8b05b6c1b1b99e1976a402417ae)
2007-10-10r24060: Fix bug #4806 by Matthias Wallnöfer <mwallnoefer@yahoo.de>: We need toAndrew Bartlett1-0/+1
include the attribute allowedChildClassesEffective for MMC to allow the creation of containers. This may need further refinement, but it seems to work for now. Andrew Bartlett (This used to be commit d053b8e218767cb12e20a00fb18995e30869db11)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r21839: add my email addressStefan Metzmacher1-1/+1
metze (This used to be commit e3be33c1d9f9e44ef37e6ef72a23576474f6e725)