summaryrefslogtreecommitdiffstats
path: root/source4/dsdb/schema
Commit message (Collapse)AuthorAgeFilesLines
* s4-dsdb: cope with windows sending extra pad bytesAndrew Tridgell2009-09-231-4/+4
|
* s4-ldb: added a bunch more debug for DC joinAndrew Tridgell2009-09-221-0/+4
| | | | | These additional debug messages were added to help us track down w2k8->s4 domain join
* s4:ldb Add 'single-value' support to LDB.Andrew Bartlett2009-09-211-0/+4
| | | | This is currently only triggered via Samba4's schema code.
* Merge branch 'master' of git://git.samba.org/sambaNadezhda Ivanova2009-09-211-12/+24
|\
| * s4-schema: don't trace the schema load (too verbose)Andrew Tridgell2009-09-211-12/+24
| |
* | Initial Implementation of the DS objects access checks.Nadezhda Ivanova2009-09-211-0/+12
|/ | | | | Currently disabled. The search will be greatly modified, also the object tree stuff will be simplified.
* Handle dsdb_class_by_lDAPDisplayName returned values in schema_inferiors.cAnatoliy Atanasov2009-09-191-0/+8
|
* s4-dsdb: use DLIST_ADD() not DLIST_ADD_END()Andrew Tridgell2009-09-152-4/+4
| | | | | | 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.
* s4:schema Add code to provide an index into the subClass treeAndrew Bartlett2009-09-152-1/+27
| | | | | | | In time, this should avoid the astounding (order) complexity of the objectclass sorting in objectclass.c eventually. Andrew Bartlett
* s4/schema: teach the schema_syntax code how to encode/decode more attributesAndrew Tridgell2009-09-101-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.
* s4/schema: don't crash if we don't have subClassOfAndrew Tridgell2009-09-101-2/+7
|
* s4:dsdb: correctly implement _dsdb_syntax_OID_oid_ldb_to_drsuapi()Stefan Metzmacher2009-09-071-1/+31
| | | | | | | Here we just need to map the oid string in the ldb value to the ATTRTYP id. metze
* Fix the dsdb_syntax_OID_ldb_to_drsuapi functionAnatoliy Atanasov2009-09-031-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.
* s4:schema Rework dsdb_write_prefixes_from_schema_to_ldb() to use tallocAndrew Bartlett2009-08-261-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
* s4:scheam quiet a 'const' warningAndrew Bartlett2009-08-261-1/+1
|
* s4:dsdb Rework dsdb_write_prefixes_to_ldb() to take a schemaAndrew Bartlett2009-08-261-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
* s4:dsdb Add constAndrew Bartlett2009-08-241-2/+2
|
* s4:dsdb use talloc_strndup() in GET_STRING_LDB() rather than walk off the endAndrew Bartlett2009-08-241-7/+17
| | | | | | | | | | The problem is that samdb_result_string() and ldb_msg_find_attr_as_string() both simply cast the string, rather than ensuring the return value is NULL terminated. This may be best regarded as a flaw in LDB, but fixing it there is going to be more difficult. Andrew Bartlett
* s4: int32 handling: previous fix was not fully correctMatthias Dieter Wallnöfer2009-08-171-1/+1
|
* s4: Make the int32 problem more clear - and fix another errorMatthias Dieter Wallnöfer2009-08-171-1/+3
|
* make sure we update the current schema->prefixes when we add a new prefixAndrew Tridgell2009-08-171-0/+9
| | | | | | This triggered a failure in the updateNow schema test, as the current global schema was not being updated when a new schema element was added
* s4:schema Allow a schema load on an unconnected databaseAndrew Bartlett2009-08-171-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
* s4:schema Provide a way to reference a loaded schema between ldbsAndrew Bartlett2009-08-171-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
* use talloc with the global schema consistentlyAndrew Tridgell2009-08-071-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.
* s4:dsdb Don't cast an ldb_val into a const char * for schema lookupsAndrew Bartlett2009-08-052-33/+122
| | | | | | | | | This removes a number of cases where we did a cast into a const char * of an ldb_val. While convention is to alway have an extra \0 at data[length] in the ldb_val, this is not required, and does not occour at least on build farm host 'svart'. Andrew Bartlett
* Fix for schemaUpdateNow commandAnatoliy Atanasov2009-07-082-4/+4
|
* we can't use the unique index code for samAccountNameAndrew Tridgell2009-07-021-1/+1
| | | | | | | | | | Using ldb unique indexes for samAccountName doesn't work with DRS as the other DC may send us a deleted record (tombstone record), which has the same samAccountName as an existing record. That would then create two records in the same partition with the same samAccountName. So we needed to put back the logic in samldb.c which explicitly checked whether a samAccountName already exists on add
* fixed the pull of drs schema elementsAndrew Tridgell2009-07-023-33/+108
| | | | | | | | 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.
* fixed the reference to the global_schemaAndrew Tridgell2009-07-011-2/+3
|
* Fixed some uninitialised variablesMatthias Dieter Wallnöfer2009-06-191-8/+5
| | | | I tried hard to not change the program logic. Should fix bug #6439.
* Correct handling of 32-bit integer attributes in SAMBA 4Matthias Dieter Wallnöfer2009-06-191-0/+2
| | | | | | | | | | - LDB handles now all 32-bit integer attributes correctly (also with overflows) according to the schema - LDAP backends handle the attributes "groupType", "userAccountControl" and "sAMAccountType" correctly. This handling doesn't yet use the schema but the conversion file "simple_ldap.map.c" which contains them hardcoded. Did also a refactoring of the conversion function there. - Bug #6136 should be gone
* Fix build with system LDB.Jelmer Vernooij2009-06-181-1/+1
|
* mark samAccountName, objectGUID and objectSID as unique indexedAndrew Tridgell2009-06-011-0/+20
|
* enable one-level indexing in sam.ldbAndrew Tridgell2009-05-281-0/+5
|
* dsdb:schema Use str_list_make_empty() to create an empty listAndrew Bartlett2009-05-141-5/+5
|
* make the memory usage of possibleInferiors much more efficientAndrew Tridgell2009-04-091-20/+31
|
* fixed the possibleInferiors calculation so it now passes the testAndrew Tridgell2009-04-092-27/+28
| | | | | We are probably still using more memory here than we need to. That needs to be looked at.
* Make the schema_inferiors generation code to compileAndrew Bartlett2009-04-083-69/+99
| | | | | | Sadly it still segfaults at this stage Andrew Bartlett
* first cut at a C version of the possible inferiors codeAndrew Tridgell2009-04-071-0/+172
|
* s4:schema Don't free mem_ctx before it is initilisedAndrew Bartlett2009-04-031-1/+0
|
* major upgrade to the ldb attribute handlingAndrew Tridgell2009-04-025-115/+325
| | | | | | | | | | | | | | 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.
* possibleInferiors is a generated attribute - we can't pull it over DRSAndrew Tridgell2009-03-311-2/+0
| | | | or from ldb
* s4:schema Don't rely on objectCategory 'magic' when loading the schemaAndrew Bartlett2009-03-111-2/+2
| | | | | | | The short-to-long name canonicalisation rules use the schema, so clearly they won't work when loading it. Andrew Bartlett
* Load the schema with a more efficient single searchAndrew Bartlett2009-03-061-93/+15
| | | | | | | | | | This search uses the index, and is not recursive, so should avoid the major performance problem with the current sorted schema load. The ad2oLschema code (recently moved to provision-backend) no longer needs the schema to be sorted. Andrew Bartlett
* Sort output of schema for OpenLDAP during conversionAndrew Bartlett2009-03-061-98/+132
| | | | | | | | This avoids the need to assume that the schema is sorted on load, which happens more often and is a major performace issue in the Samba4's use of ldb. Andrew Bartlett
* Remove ad2oLschema, insted call it directly from provision-backendAndrew Bartlett2009-03-052-1/+317
| | | | | | | | | | | | This removes a level of indirection via external binaries in the provision-backend code, and also makes better use of our internal code for loading schema from an LDIF file. Remaining to do: Sort the output again, as the load from LDIF is unsorted (also needed because the normal LDB load from sorted input is too slow anyway, and is only needed here). Andrew Bartlett
* Pull in all the schema information during DRS schema fetchAndrew Bartlett2009-03-041-9/+38
| | | | | | | This includes things such as allowed attributes, which were not populated into the schema structure before. Andrew Bartlett
* s4: Use same function signature for convert_* as s3.Jelmer Vernooij2009-03-012-19/+12
|
* Add allow_badcharcnv argument to all conversion function, forJelmer Vernooij2009-03-012-5/+5
| | | | consistency with Samba 3.
* Fix headers, ldb_includes.h is a private header,Simo Sorce2009-02-231-0/+1
| | | | do not reference it from ldb.h