summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r12542: Move some more prototypes out to seperate headersJelmer Vernooij1-0/+1
(This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2)
2007-10-10r12427: Move SAMR CreateUser2 to transactions, and re-add support forAndrew Bartlett1-1/+1
different computer account types. (Earlier code changes removed the BDC case). We don't use the TemplateDomainController, so just have a TemplateServer in provision_templates.ldif Andrew Bartlett (This used to be commit c4520ba2e6fad42a137983a2e1dbcd9c26db74e9)
2007-10-10r11592: fixed a crash bug from the ldb_result changes (res was being used ↵Andrew Tridgell1-4/+6
after being freed) (This used to be commit 5c7f3fef3e2324f0d1edda0f0f06f662bbcf7e08)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-48/+35
This patch changes the way lsb_search is called and the meaning of the returned integer. The last argument of ldb_search is changed from struct ldb_message to struct ldb_result which contains a pointer to a struct ldb_message list and a count of the number of messages. The return is not the count of messages anymore but instead it is an ldb error value. I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good amount of places. I also tried to double check all my changes being sure that the calling functions would still behave as before. But this patch is big enough that I fear some bug may have been introduced anyway even if it passes the test suite. So if you are currently working on any file being touched please give it a deep look and blame me for any error. Simo. (This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r10913: This patch isn't as big as it looks ...Andrew Tridgell1-8/+9
most of the changes are fixes to make all the ldb code compile without warnings on gcc4. Unfortunately That required a lot of casts :-( I have also added the start of an 'operational' module, which will replace the timestamp module, plus add support for some other operational attributes In ldb_msg_*() I added some new utility functions to make the operational module sane, and remove the 'ldb' argument from the ldb_msg_add_*() functions. That argument was only needed back in the early days of ldb when we didn't use the hierarchical talloc and thus needed a place to get the allocation function from. Now its just a pain to pass around everywhere. Also added a ldb_debug_set() function that calls ldb_debug() plus sets the result using ldb_set_errstring(). That saves on some awkward coding in a few places. (This used to be commit f6818daecca95760c12f79fd307770cbe3346f57)
2007-10-10r10759: make modules easier to write by allowing modules to only implement theAndrew Tridgell1-22/+1
functions they care about, instead of all functions. This also makes it more likely that future changes to ldb will not break existing modules (This used to be commit 45f0c967b58e7c1b2e900a4d74cfde2a2c527dfa)
2007-10-10r10753: don't require every ldb module to implement both a search_bytree() andAndrew Tridgell1-9/+0
a search() function, instead each module now only implements the bytree method, and the expression based search is handled generically by the modules code. This makes for more consistency and less code duplication. fixed the tdb backend to handle BASE searches much more efficiently. They now always only lookup one record, regardless of the search expression (This used to be commit 7e44f9153c5578624e2fca04cdc0a00af0fd9eb4)
2007-10-10r10477: expose transactions outside ldb and change the API once moreSimo Sorce1-3/+10
do not autostart transactions on ldb operations if a transaction is already in place test transactions on winsdb all my tests passes so far tridge please confirm this is ok for you (This used to be commit c2bb2a36bdbe0ec7519697a9a9ba7526a0defac2)
2007-10-10r10411: we don't need the 10 times retry on rid allocation now, asAndrew Tridgell1-10/+2
transactions ensure two account creations can't interfere with each other (This used to be commit 91c27bc97662c8d8b764c76bd2d98a1b04f47337)
2007-10-10r10306: change these modules to use new error APISimo Sorce1-32/+2
(This used to be commit e86c9b4a7f399a3152a2703c76406e9d69ec1225)
2007-10-10r10300: forgot to change the dsdb modules function namesSimo Sorce1-8/+8
(This used to be commit e9018e3d9f69528acc0c440929fdb8d95413fa0d)
2007-10-10r9793: Be more verbose, check for errors in upgrade script.Jelmer Vernooij1-1/+2
(This used to be commit b7c09df9e506f8048f69c4bdd1c3351e3b554e18)
2007-10-10r9768: Arrrgh.. Right this time.Jelmer Vernooij1-1/+1
(This used to be commit 8bded3fc926b8eb6285e06fd4b4706b779edb386)
2007-10-10r9767: Fix typoJelmer Vernooij1-1/+1
(This used to be commit 0602e8b3e7b5921fa99bfe788fe290f03b3dc7ac)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-43/+33
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8791: (missing from previous commit)Andrew Bartlett1-16/+61
Add templating support for foreignSecurityPrincipal to the samdb module. Andrew Bartltt (This used to be commit 5f51d806d718bfa6931d102ff4e866c688a6ecd9)
2007-10-10r8740: Extend the rdn_name module to handle adding the rdn as an attribute. ie:Andrew Bartlett1-23/+1
dn: cn=foo,ou=bar objectClass: person implies dn: cn=foo,ou=bar objectClass: person cn: foo (as well as a pile more default attributes) We also correct the case in the attirbute to match that in the DN (win2k3 behaviour) and I have a testsuite (in ejs) to prove it. This module also found a bug in our provision.ldif, so and reduces code complexity in the samdb module. Andrew Bartlett (This used to be commit 0cc58f5c3cce12341ad0f7a90cdd85a3fab786b3)
2007-10-10r8674: With the rdn_name module, we don't need this duplication in the samdbAndrew Bartlett1-22/+0
module any more. Andrew Bartlett (This used to be commit da48e77e7ca21bc99f2829a22ea3dc96ba413191)
2007-10-10r8666: The same fix as the last commit, I was caught out on a move from aAndrew Bartlett1-2/+2
BOOL to int function return. Andrew Bartlett (This used to be commit e03e00fe606db443783f1dea03411025c01c7de5)
2007-10-10r8664: I got caught out not testing...Andrew Bartlett1-2/+2
I replaced these function calls, and they went from BOOL to int return values, so naturally failed. Andrew Bartlett (This used to be commit 1982fdb6f3355494ecaae93280eea4e69c78430f)
2007-10-10r8663: Since simo constructed the samdb module, he and tridge have worked onAndrew Bartlett1-31/+34
a DN parsing system. Leverage that in the dsdb module. Andrew Bartlett (This used to be commit 2408f322765fc1b1769d5c8ea69eae4d968cd195)
2007-10-10r8660: Use templates for the initial provision of user and computer accounts.Andrew Bartlett1-5/+12
This ensures the templating code is used, and also makes it clearer what I need to duplicate in the vampire area. Also fix a silly bug in the template application code (the samdb module) that caused templates to be compleatly unused (my fault, from my commit last night). Andrew Bartlett (This used to be commit 4a8ef7197ff938942832034453f843cb8a50f2d1)
2007-10-10r8650: Use the timestamps and a new objectguid module rather than placingAndrew Bartlett1-6/+3
boilerplate attributes in every entry in provision.ldif. The next step will be to use templates. Andrew Bartlett (This used to be commit 940ed9827f5ab83b668a60a2b0110567dd54c3e2)
2007-10-10r8568: change missing templates to warnings, so that provisioning with an ↵Andrew Tridgell1-3/+3
existing db doesn't print lots of fatal errors (This used to be commit d8d47bb18fbb467e253e99c4281578d6e4762de3)
2007-10-10r8321: Fix some uninitalized variable warningsVolker Lendecke1-1/+1
(This used to be commit 126cb3db4b0cf9c382ba7496ba08311f3b669f00)
2007-10-10r7925: small tidyup (please keep lines at a reasonable length)Andrew Tridgell1-1/+2
(This used to be commit 0bfd91c32a62e651e81ce8d3b102158ec9c680fe)
2007-10-10r7860: switch our ldb storage format to use a NDR encoded objectSid. This isAndrew Tridgell1-17/+34
quite a large change as we had lots of code that assumed that objectSid was a string in S- format. metze and simo tried to convince me to use NDR format months ago, but I didn't listen, so its fair that I have the pain of fixing all the code now :-) This builds on the ldb_register_samba_handlers() and ldif handlers code I did earlier this week. There are still three parts of this conversion I have not finished: - the ltdb index records need to use the string form of the objectSid (to keep the DNs sane). Until that it done I have disabled indexing on objectSid, which is a big performance hit, but allows us to pass all our tests while I rejig the indexing system to use a externally supplied conversion function - I haven't yet put in place the code that allows client to use the "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3 supports this, presumably by looking for the "S-" prefix to determine what type of objectSid form is being used by the client. I have been working on ways to handle this, but am not happy with them yet so they aren't part of this patch - I need to change pidl to generate push functions that take a "const void *" instead of a "void*" for the data pointer. That will fix the couple of new warnings this code generates. Luckily it many places the conversion to NDR formatted records actually simplified the code, as it means we no longer need as many calls to dom_sid_parse_talloc(). In some places it got more complex, but not many. (This used to be commit d40bc2fa8ddd43560315688eebdbe98bdd02756c)
2007-10-10r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_treeAndrew Tridgell1-9/+18
instead of a search expression. This allows our ldap server to pass its ASN.1 parsed search expressions straight to ldb, instead of going via strings. - updated all the ldb modules code to handle the new interface - got rid of the separate ldb_parse.h now that the ldb_parse structures are exposed externally - moved to C99 structure initialisation in ldb - switched ldap server to using ldb_search_bytree() (This used to be commit 96620ab2ee5d440bbbc51c1bc0cad9977770f897)
2007-10-10r6470: Remove ldb_search_free() it is not needed anymore.Simo Sorce1-18/+12
Just use talloc_free() to release the memory after an ldb_search(). (This used to be commit 4f0948dab0aa5e8b6a4ce486f3668ca8dfae23db)
2007-10-10r6084: - Introduce the samldb module dependency on samba4Simo Sorce1-205/+170
- This module will take care of properly filling an user or group object with required fields. You just need to provide the dn and the objectclass and a user/group get created Simo. (This used to be commit fb9afcaf533a4c32547d1857306e0aece8063953)
2007-10-10r5588: We currently use a string representing an hex number so conform to that.Simo Sorce1-3/+3
But we should move to a signed integer in future to be AD compatible. (This used to be commit b67512c5139af121b6579a5c6318a489c2132ebb)
2007-10-10r5587: more work around the samldb moduleSimo Sorce1-8/+180
fix the provision.ldif the layout of the @MODULES dn has changed since last commit (This used to be commit acb99e63d40e71fa843c1b7a1719a350a353ed28)
2007-10-10r5584: add new experimental ldb moduleSimo Sorce1-0/+512
(This used to be commit e77a070c841c7a1b73dfcea2d43651618557d0f4)