summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_attributes.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-19ldb:"ldb_schema_attribute_by_name_internal" - support the whole unsigned int ↵Matthias Dieter Wallnöfer1-7/+5
range Commit 8556602b048e825b35df314d6865f997823ec2bb wasn't quite right - it only restored the functionality on the positive integer range. This one however should now really support the whole unsigned range. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Oct 19 10:52:08 UTC 2010 on sn-devel-104
2010-10-18ldb:"ldb_schema_attribute_by_name_internal" - switch back to 32bit countersMatthias Dieter Wallnöfer1-4/+5
Use the signed counter for the binary search but use an unsigned one for accessing the entry. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Oct 18 19:01:31 UTC 2010 on sn-devel-104
2010-03-08LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer1-7/+8
To count LDB objects use variables of type "unsigned (int)" or "long long int" on binary or downto searches. To count characters in strings use "size_t". To calculate differences between pointers use "ptrdiff_t".
2009-04-07fixed internal handling of attribute deletionAndrew Tridgell1-13/+23
2009-04-02major upgrade to the ldb attribute handlingAndrew Tridgell1-0/+21
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-01-30Explicitly include ldb_handlers.h where necessarySimo Sorce1-0/+1
2009-01-30Fix the mess with ldb includes.Simo Sorce1-1/+1
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.
2008-12-19Small cosmetic LDB patch regarding return values.Matthias Dieter Wallnöfer1-1/+1
It changes some "return 0" in "return LDB_SUCCESS"
2008-12-17s4:ldb: add infrastructure for extended dn handlersAndrew Bartlett1-0/+47
This introduces a new set of pluggable syntax, for use on the extended DN, and uses them when parsing the DN. If the DN appears to be in the extended form, we no longer return the full DN 'as is', but only return the normal part from ldb_dn_get_linearized(). When validating/parsing the DN we validate not only the format of the DN, but also the contents of the GUID or SID (to ensure they are plausable). We also have functions to set and get the extended components on the DN. For now, extended_dn_get_linearized() returns a newly constructed and allocated string each time. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-08-21Don't allow a NULL syntaxAndrew Bartlett1-0/+4
(This used to be commit 505a0c2b702b696b91dab683626bb25b14a49c38)
2008-08-20don't overwrite fixed attributes with @ATTRIBUTESAndrew Tridgell1-0/+4
(This used to be commit e860fc171fd127d73df23336089c1479911953da)
2008-08-20Merge commit 'origin/v4-0-test' into v4-0-testAndrew Tridgell1-3/+11
(This used to be commit 3bdc906eb63a494f0d8478c13f8330828aa2f725)
2008-08-20added a LDB_ATTR_FLAG_FIXED so the schema module can mark attributesAndrew Tridgell1-0/+5
as never to be removed. (This used to be commit 9dce558206a2ce70c69b9b6c5c3c9c58ee165b1d)
2008-08-18Allow attributes to be overwritten, not just added toAndrew Bartlett1-3/+11
(This used to be commit 0aebae91be0fba7ffa94d73946a94aea930a252a)
2007-10-10r25218: After discussion with Simo, remove the subclass support from LDB.Andrew Bartlett1-111/+0
Subclass support was designed to avoid needing to spell out the full list of objectClasses that an entry was in. However, Samba4 now enforces this restriction in the objectClass module, and the way subclass matching was handled was complex and counter-intuitive in my opinion (and did not match LDAP). Andrew Bartlett (This used to be commit f5ce04b904e14445a2a7e7f92e7e1f64b645c6f2)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-2/+1
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r20188: move back to an default attribute handler and not use the '*' attributeStefan Metzmacher1-2/+15
to not conflict with the one that maybe added via the @ATTRIBUTES object this is just to make the test-tdb-feature.sh torture test happy There's still a bug when a attribute is registered multiple time without removing old ldb_schema_attribute instances. But this bug was there before my changes too and was just triggered by my changes metze (This used to be commit 70c4a367433f8c54bdd940eb0a6a24ab976a4063)
2007-10-10r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointerStefan Metzmacher1-78/+79
to a ldb_schema_syntax struct. the default attribute handler is now registered dynamicly as "*" attribute, instead of having its own code path. ldb_schema_attribute's can be added to the ldb_schema given a ldb_schema_syntax struct or the syntax name we may also need to introduce a ldb_schema_matching_rule, and add a pointer to a default ldb_schema_matching_rule in the ldb_schema_syntax. metze (This used to be commit b97b8f5dcbce006f005e53ca79df3330e62f117b)
2007-10-10r20168: start separating attributes and syntaxesStefan Metzmacher1-7/+12
metze (This used to be commit 8dda4342f648aa71878ac9eeb7941710e2813aee)
2007-10-10r19966: we don't need 2 versions of this functionsStefan Metzmacher1-34/+4
metze (This used to be commit 98ab0af4ae0d716f27bc48b699f52d34dc2f8507)
2007-10-10r19907: this function is used a lotSimo Sorce1-18/+40
use a binary search to get the right handler (This used to be commit 789e1088c9ce923ca5a6d703b69810eba3bcd4d0)
2007-10-10r19886: ncName is specific to samba, not the generic ldb engineSimo Sorce1-1/+0
(This used to be commit 505afb18fb8ba427bc3d03f41eb309b27bad68f7)
2007-10-10r19740: fix compiler warningStefan Metzmacher1-1/+1
metze (This used to be commit 666e674504c514033390bf69746fb3c35baf4b2a)
2007-10-10r19365: fixed a memory leak in the ldb attribute handlingAndrew Tridgell1-0/+14
(This used to be commit d7e07685164141f8fb2c2a6258e1fcb46ff9d06c)
2007-10-10r17579: make ldb build g++ friendlyAndrew Tridgell1-9/+9
(This used to be commit 403cbd335594112e0c58fd68d20f0e3faad7d186)
2007-10-10r16066: The OSX AD plugin uses objectCategory searches a lot, and uses themAndrew Bartlett1-1/+0
both fully qualified and in the 'short' form. Now we test and support this query format. Andrew Bartlett (This used to be commit 9ddcfacbcedc5eea2730d4bf902c0fcd02bcfa11)
2007-10-10r16062: objectCategory is a DN, and needs to be matched as such.Andrew Bartlett1-0/+1
Andrew Bartlett (This used to be commit 1a868b451a47798dc539e0754ab2b075813ed368)
2007-10-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher1-2/+1
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10r10915: added a standard attribute handler for a ldap UTC time stringAndrew Tridgell1-11/+18
(This used to be commit efd7dd1a775c06f21924f35760f7768b4e8db449)
2007-10-10r9928: ncName is a DN, and needs to use DN matching rules.Andrew Bartlett1-0/+1
Andrew Bartlett (This used to be commit b89e7a7fcdf80f2cab581f138358b4324d15d6bc)
2007-10-10r9771: - Prevent ldb crash when a invalid DN is addedJelmer Vernooij1-1/+1
- Don't silently drop records with empty attributes tridge/simo: Could you please verify this patch is correct? (This used to be commit 505c9b1d3d39475da141d3b3c156a7e5ba06790c)
2007-10-10r8364: fixed a valgrind bug spotted by simoAndrew Tridgell1-1/+1
(This used to be commit ef804e8f36f1835d5d61f69565f1195a70f37e74)
2007-10-10r8082: large rewite of ldb_dn.cSimo Sorce1-1/+8
- we do not support multpiple attribute components anymore, makes code a lot easier they will be readded later if we found out they are really used, so far my tests show w2k3 do not handle them as well - fix escaping issues, move component value to be in an ldb_val structure still need to handle binary values case - make cononicalize functions leak less memory by giving a specific memory context - fix tests scripts so that test-ldap can start - make test not delete databases on completion so that I can inspect them (This used to be commit 624a73148d125690ce18515f19231d26df207738)
2007-10-10r8037: a fairly major update to the internals of ldb. Changes are:Andrew Tridgell1-0/+281
- moved the knowledge of attribute types out of ldb_tdb and into the generic ldb code. This allows the ldb_match() message match logic to be generic, so it can be used by other backend - added the generic ability to load attribute handlers, for canonicalisation, compare, ldif read and ldif write. In the future this will be used by the schema module to allow us to correctly obey the attributetype schema elements - added attribute handlers for some of the core ldap attribute types, Integer, DirectoryString, DN, ObjectClass etc - added automatic registration of attribute handlers for well-known attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass' - converted the objectSid special handlers for Samba to the new system - added more correct handling of indexing in tdb backend based on the attribute canonicalisation function - added generic support for subclasses, moving it out of the tdb backend. This will be used in future by the schema module - fixed several bugs in the dn_explode code. It still needs more work, but doesn't corrupt ldb dbs any more. (This used to be commit 944c5844ab441b96d8e5d7b2d151982139d1fab9)