1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-13 08:23:49 +03:00
Commit Graph

22 Commits

Author SHA1 Message Date
Simo Sorce
c2bb2a36bd r10477: expose transactions outside ldb and change the API once more
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
2007-10-10 13:38:52 -05:00
Simo Sorce
3fc676ac1d r10305: start implementing better error handling
changed the prioivate modules API
error string are now not spread over all
modules but are kept in  a single place.

This allows a better control of memory
and error reporting.
2007-10-10 13:38:16 -05:00
Simo Sorce
1da4ac2cdc r10299: remove the public (un)lock functions and introduce a transaction based
private ldb API

ldb_sqlite3 is already working with this model and ldb_tdb will do
as soon as tridge finishes the tdb transaction code.

currently the transactions are always implicit and wrap any single
ldb API call except searching, the transaction functions are
currently not made public on purpose.

Simo.
2007-10-10 13:38:14 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Tridgell
96620ab2ee r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
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()
2007-10-10 13:18:06 -05:00
Simo Sorce
4f0948dab0 r6470: Remove ldb_search_free() it is not needed anymore.
Just use talloc_free() to release the memory after an ldb_search().
2007-10-10 13:11:40 -05:00
Tim Potter
5a598f5da1 r6360: Quieten unused variable warning. 2007-10-10 13:11:34 -05:00
Simo Sorce
0579b5f7ad r5670: simplify and clarify ldb_modules.c code
rectify the test schema
correct a glitch in schema module
2007-10-10 13:10:58 -05:00
Simo Sorce
d58be9e74b r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
2007-10-10 13:10:55 -05:00
Andrew Tridgell
e7262dccce r4863: schema_find_attribute() should be static 2007-10-10 13:09:01 -05:00
Simo Sorce
0315159daf r4862: - better structure schema tests
- fix check for deletion of required attributes on modify
  removed by mistake with the previous commits
2007-10-10 13:09:00 -05:00
Simo Sorce
c6257379e0 r4859: changed a numbe rof things:
- Try to no tcopy memory if not necessary
- let the searches hang around until we finish the operation
- greatly simplify the modify operation

still todo:

- check attributes syntax
- check objectclasses type, we cannot allow to add a new structural
  objectclass to an exixting entry unless the existing one is a parent
- more tests
2007-10-10 13:09:00 -05:00
Simo Sorce
a30f647b8a r4844: - Remove the unused attrsyn structure
- Change 0 to NULL when checking allocations
- Introduce the schema_attr_cmp hepler function
- Do not allow auxiliary classes to be missing
- Try to ease code readability and try to get
  main code out of loops when possibile.
2007-10-10 13:09:00 -05:00
Andrew Tridgell
b221c3dbb9 r4801: remove the two bogus ctype.h includes 2007-10-10 13:08:57 -05:00
Simo Sorce
e895fcf4a3 r4786: forgot to commit the exclusion for schema checking against our control entries 2007-10-10 13:08:55 -05:00
Simo Sorce
42a20f6fa4 r4784: finally make schema module use a single ldb
add the new test-schema test
2007-10-10 13:08:54 -05:00
Andrew Tridgell
6534ce650b r4781: the tolower() in schema.c is a premature optimisation. I suspect the
"distinguishedName" checking in that module is incorrect and should be
removed, but meanwhile, lets not make it slow down the compile of
every other module.
2007-10-10 13:08:54 -05:00
Simo Sorce
18cd6cb674 r4775: use schema_attr_cmp wrapper to check for the special dn/distinguishedName case alias 2007-10-10 13:08:53 -05:00
Simo Sorce
8c11038d67 r4759: use ldb_attr_cmp() to compare attribute names
check required attributes are not deleted on modify operation
if the objectclass is deleted then deny the operation if
orphan atributes are left behind
2007-10-10 13:08:51 -05:00
Simo Sorce
a681ae365f r4714: move the ldb code to the new talloc interface (eg remove _p suffix)
this helps standalone building of ldb

renew the schema module
split code into functions to improve readability and code reuse

add and modify works correctly but we need a proper testsuite

Simo
2007-10-10 13:08:47 -05:00
Simo Sorce
ea051f6cd3 r4513: add experimental modification attribute checking
still not complete but works with add and replace, not tested with delete
lot of duplicated code to remove
2007-10-10 13:08:17 -05:00
Simo Sorce
b8bb62f144 r4505: Add a first very basic schema module
To use it you should provide a schema.ldb file where the schema is stored
and load the module in the ldb you want to have schema check activated

more info soon.

currently schema checks are performed only on new object creation not on modifications

Simo.
2007-10-10 13:08:16 -05:00