summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
AgeCommit message (Collapse)AuthorFilesLines
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.
2009-08-05s4:dsdb Don't cast an ldb_val into a const char * for schema lookupsAndrew Bartlett2-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
2009-07-08Fix for schemaUpdateNow commandAnatoliy Atanasov2-4/+4
2009-07-02we can't use the unique index code for samAccountNameAndrew Tridgell1-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
2009-07-02fixed the pull of drs schema elementsAndrew Tridgell3-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.
2009-07-01fixed the reference to the global_schemaAndrew Tridgell1-2/+3
2009-06-19Fixed some uninitialised variablesMatthias Dieter Wallnöfer1-8/+5
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19Correct handling of 32-bit integer attributes in SAMBA 4Matthias Dieter Wallnöfer1-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
2009-06-18Fix build with system LDB.Jelmer Vernooij1-1/+1
2009-06-01mark samAccountName, objectGUID and objectSID as unique indexedAndrew Tridgell1-0/+20
2009-05-28enable one-level indexing in sam.ldbAndrew Tridgell1-0/+5
2009-05-14dsdb:schema Use str_list_make_empty() to create an empty listAndrew Bartlett1-5/+5
2009-04-09make the memory usage of possibleInferiors much more efficientAndrew Tridgell1-20/+31
2009-04-09fixed the possibleInferiors calculation so it now passes the testAndrew Tridgell2-27/+28
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 Bartlett3-69/+99
Sadly it still segfaults at this stage Andrew Bartlett
2009-04-07first cut at a C version of the possible inferiors codeAndrew Tridgell1-0/+172
2009-04-03s4:schema Don't free mem_ctx before it is initilisedAndrew Bartlett1-1/+0
2009-04-02major upgrade to the ldb attribute handlingAndrew Tridgell5-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.
2009-03-31possibleInferiors is a generated attribute - we can't pull it over DRSAndrew Tridgell1-2/+0
or from ldb
2009-03-11s4:schema Don't rely on objectCategory 'magic' when loading the schemaAndrew Bartlett1-2/+2
The short-to-long name canonicalisation rules use the schema, so clearly they won't work when loading it. Andrew Bartlett
2009-03-06Load the schema with a more efficient single searchAndrew Bartlett1-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
2009-03-06Sort output of schema for OpenLDAP during conversionAndrew Bartlett1-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
2009-03-05Remove ad2oLschema, insted call it directly from provision-backendAndrew Bartlett2-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
2009-03-04Pull in all the schema information during DRS schema fetchAndrew Bartlett1-9/+38
This includes things such as allowed attributes, which were not populated into the schema structure before. Andrew Bartlett
2009-03-01s4: Use same function signature for convert_* as s3.Jelmer Vernooij2-19/+12
2009-03-01Add allow_badcharcnv argument to all conversion function, forJelmer Vernooij2-5/+5
consistency with Samba 3.
2009-02-23Fix headers, ldb_includes.h is a private header,Simo Sorce1-0/+1
do not reference it from ldb.h
2009-02-02s4:dsdb/schema: s/class/sclassStefan Metzmacher2-31/+32
metze
2009-01-30Fix all other modules to use ldb_module.h instead of ldb_private.hSimo Sorce1-3/+1
The only 2 modules escaping the rule so far are rootdse and partitions
2008-12-23Fix more compiler warnings in various places.Jelmer Vernooij2-25/+25
2008-12-20Treat DN+STring as a binary string for nowAndrew Bartlett1-4/+4
This matches the way we work with DN+Binary. We need this for the OpenLDAP backend. Andrew Bartlett
2008-12-20Now store the GUID and SID from a DN over DRSUAPI into ldb.Andrew Bartlett3-42/+161
Until the extended DN work was compleated, there was no way to store the additional metadata. Andrew Bartlett
2008-12-02Don't treat the DN+binary syntax as a DN.Andrew Bartlett1-2/+2
This should fix the OpenLDAP backend
2008-11-16s4:dsdb/schema: add a function to generate the "extendedClassInfo" valuesStefan Metzmacher1-4/+44
metze
2008-11-16s4:dsdb/schema: add a function to generate the "extendedAttributeInfo" valuesStefan Metzmacher1-7/+83
metze
2008-11-16s4:dsdb/schema: use pointers for rangeLower and rangeUpper.Stefan Metzmacher2-6/+41
This makes clear there's an value stored in the schema, as they can be '0'. metze
2008-11-16s4:dsdb/schema: we don't need to use find_syntax_map_by_ad_oid() as the ↵Stefan Metzmacher1-3/+1
syntax is already known metze
2008-11-08s4: dsdb/schema: fix the equality and comment of DN+String syntaxStefan Metzmacher1-3/+2
metze
2008-10-24Remove unused include param/param.h.Jelmer Vernooij1-1/+0
2008-10-24Remove iconv_convenience argument from convert_string{,talloc}() butJelmer Vernooij2-5/+6
make them wrappers around convert_string{,talloc}_convenience().
2008-10-24Move charset library to top level.Jelmer Vernooij1-1/+1
2008-10-18Add TALLOC_CTX pointer to strhex_to_data_blob for consistency with SambaJelmer Vernooij2-6/+3
3.
2008-10-11Fix include paths to new location of libutil.Jelmer Vernooij2-2/+2
2008-10-06Remove DESCRIPTION from generated schema lines.Andrew Bartlett1-20/+1
This is not permitted in the AD aggregate schema, and more trouble than it is worth in the OpenLDAP schema due to escaping issues. Andrew Bartlett
2008-10-06Fix Domain Trust creation with Windows 2008 (and many other tools)Andrew Bartlett1-1/+5
A dITConentRules attribute (unlike objectClasses) must not contain a 'SUP'. The ADSI layer in Windows would download the whole schema, and validate it. Thanks to the team at Microsoft for very long debugging session to find this. Andrew Bartlett
2008-09-23Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.Simo Sorce2-19/+18
The previous ldb_search() interface made it way too easy to leak results, and being able to use a printf-like expression turns to be really useful.
2008-09-12Fix failure to load the schema on read-only DB.Andrew Bartlett1-23/+13
This also tries to simplify the logic in the schema -> @ATTRIBUTES and @INDEXES code. Andrew Bartlett (This used to be commit a383b8bf88a5681f9c9c6839ba645c872a735051)
2008-09-11Remove the complexity of transactions from the attributes-setting code.Andrew Bartlett1-16/+1
I think it is just too complex and error prone to init and cancel transactions during the module init code. Instead, this isn't prone to races as it will always achieve a steady state (eventually), and most cases will never do the write. Andrew Bartlett (This used to be commit d60977cc7f89f89f34187f310c91d1ab7db6ccf2)
2008-09-11Make cn=aggregate output less pretty, by more like Win2008.Andrew Bartlett1-2/+2
I'm not sure if this fixes bug #5713, as this is not consistantly reproducably on my equipment. Andrew Bartlett (This used to be commit 02d6645efc84179efd652dd29ab32f62ae310147)
2008-09-09Fix reversed test trying to fix bug #5713Andrew Bartlett1-1/+1
(It instead ensured that only 'top' had a SUP keyword) This clearly shows that 937b466266256d26d02cf8d48e72a26272fe8627 was not a full or correct fix, but despite this I can no longer reproduce the issue. Further investigation is required. Andrew Bartlett (This used to be commit 95a9e9b6b84866cd300b1d19915627c6718b4dde)