1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

153 Commits

Author SHA1 Message Date
Derrell Lipman
1603fd9466 r7897: work in progress
(This used to be commit 8e1431efcf0df797bc50ef584c38fce6a03429b3)
2007-10-10 13:18:47 -05:00
Andrew Tridgell
b818ff3ede r7868: canonicalise the message before using ldb_add() in the ldbadd utility.
(This used to be commit 56f4af5f210da472d41d9bcf6918647181f6ad16)
2007-10-10 13:18:45 -05:00
Andrew Tridgell
0eb6bc1257 r7833: changed ldbsearch and ldbedit to have command line syntax closer to
ldapsearch. They look for an '=' in the first argument to see if it is
a search expression, and if not then it does an 'all records' search
(This used to be commit 91cc009fedefa7b263b345dfa511800e0f4f66a8)
2007-10-10 13:18:41 -05:00
Derrell Lipman
fdc0450db2 r7828: Although there is still plenty to do, ldb_sqlite3 now passes the set of tests
in tests/test-sqlite3.sh (tests/test-generic.sh).

There are lots of optimizations still TBD, and some things are REALLY slow
right now (e.g. each add() operation takes 1/3 - 1/2 second) but it's ready for
interested parties to poke it and prod it and see how (un)reasonable it is.
Play away.

Still to be implemented or improved:
 - tdb specials (@MODULES, @SUBCLASSES, etc.)
 - all DNs are case-folded in their entirty right now (since doing otherwise
   would require @ATTRIBUTES to be implemented)
 - speed improvements and optimizations.  I am quite confident that the
   excessively slow add() operation can be much improved, and other areas
   can be somewhat improved.
(This used to be commit 1dd865005594671e7effe06fb088fa97fa08de0b)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
5be159f304 r7804: added the samba specific ldif handlers into the tree, but don't enable
them just yet. I have tested them, and they work fine, but enabling
them will break code in rpc_server/ and samdb, so we need to fix that
first
(This used to be commit 07d459406b4c63e49141e0e533e1274b4052abf9)
2007-10-10 13:18:37 -05:00
Andrew Tridgell
e485e80b51 r7743: be consistent in how stdin is supported for ldbadd and ldbmodify
(This used to be commit 3d60b3a8eea5ac6c35cf2e579ae12cef3dc1794e)
2007-10-10 13:18:29 -05:00
Andrew Tridgell
aa6b2dcb9b r7741: fixed the verbose option in ldbedit
(This used to be commit a440133140a6adb5ea62d37690b9c4ae74dc6be0)
2007-10-10 13:18:29 -05:00
Andrew Tridgell
bf75ae4155 r7726: - removed some unused variables
- handle ldb_errstring() calls on failed connect
(This used to be commit 8698a20fcc6a04ccbe533afd742e7a5df94423ee)
2007-10-10 13:18:27 -05:00
Andrew Tridgell
f40e69da26 r7714: enable samba credentials handling in ldb tools. So you can now do a
encrypted ldbedit against w2k3
(This used to be commit 6277c3923e7d9c26753424b1e77ac62f8e0729a4)
2007-10-10 13:18:25 -05:00
Andrew Tridgell
f52b42c75f r7710: new command line handling code for ldb
(This used to be commit 5e8db1c9b3bb6c5196652a7af877b4204148c305)
2007-10-10 13:18:24 -05:00
Andrew Tridgell
ed3d8091ce r7709: - convert ldb to use popt, so that it can interact with the samba
cmdline credentials code (which will be done soon)

- added a ldb_init() call, and changed ldb_connect() to take a ldb
  context. This allows for much better error handling in
  ldb_connect(), and also made the popt conversion easier

- fixed up all the existing backends with the new syntax

- improved error handling in *_connect()

- fixed a crash bug in the new case_fold_required() code

- ensured that ltdb_rename() and all ltdb_search() paths get the read lock

- added a ldb_oom() macro to make it easier to report out of memory
  situations in ldb code
(This used to be commit f648fdf187669d6d87d01dd4e786b03cd420f220)
2007-10-10 13:18:24 -05:00
Derrell Lipman
ee3f4b12d2 r7438: work in progress
(This used to be commit 2fc5343f0637ef3109b079dbc33d6cf4e58c8d5e)
2007-10-10 13:17:53 -05:00
Derrell Lipman
a1ba224107 r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can be
called from multiple backends.  (ldb_sqlite3 needs it too.)  Added parameter
  for a callback function that determines whether an attribute needs case
  folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)
2007-10-10 13:17:35 -05:00
Andrew Tridgell
9a9cf9e075 r6833: split out the routine that calculates the diff between two ldb messages from ldbedit,
so other progs can use it.
(This used to be commit fa4f33558af3c65ff31424c01db16cb9d427503d)
2007-10-10 13:16:49 -05:00
Simo Sorce
fe4d985b6f r6470: Remove ldb_search_free() it is not needed anymore.
Just use talloc_free() to release the memory after an ldb_search().
(This used to be commit 4f0948dab0aa5e8b6a4ce486f3668ca8dfae23db)
2007-10-10 13:11:40 -05:00
Richard Sharpe
da38166904 r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
(This used to be commit 9b4069e84573f85ce4341ceacd35737a18726a0b)
2007-10-10 13:11:20 -05:00
Simo Sorce
b1b14817ea 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
(This used to be commit d58be9e74b786a11a57e89df36081d55730dfe0a)
2007-10-10 13:10:55 -05:00
Andrew Bartlett
c8ca613e93 r5330: Remove #include <sys/time.h> from includes.h.
Add #include "system/time.h" back (it was removed in some of these
places because the definitions were provided by <sys/time.h> on tridge's
platform.)

Andrew Bartlett
(This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5)
2007-10-10 13:09:43 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10 13:09:38 -05:00
Simo Sorce
a2f77f979d 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
(This used to be commit a681ae365ff1b5a2771b42ebd90336651ce1e513)
2007-10-10 13:08:47 -05:00
Andrew Tridgell
09a76e204c r4477: expanded the test suite to increase code coverage a lot
(This used to be commit 4edbd1b18ee38e584cf844b64c7fcb2645921837)
2007-10-10 13:07:56 -05:00
Andrew Tridgell
1a988ec9af r4474: - converted ldb to use talloc internally
- added gcov flags to Makefile.ldb

- expanded ldb test suite to get more coverage
(This used to be commit 0ab98f50a7e0fe15347a99e5c29a6590a87729a0)
2007-10-10 13:07:55 -05:00
Andrew Tridgell
09c1b9cbe5 r4427: - added ldb_msg_*() functions for sorting, comparing and copying messages
- added a ldb_msg_canonicalize() function that fixes a record to not have any duplicate
  elements

- changed ldbedit to use ldb_msg_canonicalize(). This fixes a bug when you rename multiple
  elements in a record in one edit
(This used to be commit f006e724400843419c8b6155cbeae1876983855e)
2007-10-10 13:07:48 -05:00
Andrew Tridgell
9012a50153 r4059: moved the ldb -o option parsing to a common routine
(This used to be commit ee52c1e38c9bac852458196ffbd677cca62a3965)
2007-10-10 13:06:20 -05:00
Stefan Metzmacher
8a18778286 r3783: - don't use make proto for ldb anymore
- split ldh.h out of samba's includes.h

- make ldb_context and ldb_module private to the subsystem

- use ltdb_ prefix for all ldb_tdb functions

metze
(This used to be commit f5ee40d6ce8224e280070975efc9911558fe675c)
2007-10-10 13:05:52 -05:00
Simo Sorce
57d2043479 r3760: mention -o switch in help message
(This used to be commit 0e7d8753101f22aa192ac5628675a0374484d0e9)
2007-10-10 13:05:52 -05:00
Simo Sorce
679e95db03 r3754: merge in ldb modules support from the tmp branch ldbPlugins
(This used to be commit 71323f424b4561af1fdddd2358629049be3dad8c)
2007-10-10 13:05:51 -05:00
Stefan Metzmacher
a9bd405497 r3093: - implment ldb_rename() and ldbrename
- add tests for ldbrename

- disable all tests which regenerate the index
  (this is broken for me...the process hangs,
   tridge we need to discuss that)

- link only the needed stuff to the ldb tools

- build ldbtest inside samba

metze
(This used to be commit 18552f4786c24e0019cc87726ef4c05365fe586e)
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
8d48ca63db r3092: prepare for build inside samba
metze
(This used to be commit f7564bf4d2efb702cf3d11237fbe2adf5efb1ebf)
2007-10-10 13:02:20 -05:00
Andrew Tridgell
443d8fd05e r2726: added a -r option to ldbdel to allow easy delete of a whole
subtree. Useful when cleaning up a mess after testing.
(This used to be commit 476674af5519960300c0a07349c7cdf307af3822)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
ca3765ca78 r2725: fixed ldbtest to give the basedn to ldb_search()
(This used to be commit 19925f5bd8dd24742e5d216b0c491975ceb7d3a6)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
b2f9612e5d r2721: added a -b option to ldbtest so it can be used with the new smbd ldap server
without changing realms
(This used to be commit fd2725f5c0a2ea89bbfcb0403d1bc03fa7b7ec25)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
0244414a58 r2712: fixed a bug in ldbtest to make it cope with an existing index
(This used to be commit 3f776a9b5c240312f161b651201458e43a9dd6a9)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
e4cd51e17e r2553: fixed ldbtest so it passes the ldap schema restrictions and thus can be used on the ldap backend
(This used to be commit 9f230425a0c926209887006ab1e3fec0998e7961)
2007-10-10 12:59:05 -05:00
Andrew Tridgell
4b09c0e5d9 r2485: - add a test case in ldbtest for a bug pointed out by Jon Haswell.
- fixed the bug shown with the above test, by initialising the
  sequence number to something different from the value used in
  ltdb_cache_free()
(This used to be commit 856cdf82f24aada074ee5c605cccb2e8ceeea487)
2007-10-10 12:58:56 -05:00
Andrew Tridgell
be480ac55c r2381: added a -v debugging option to ldbedit
(This used to be commit 03d4a7832cd3670a8166820a1b9b4aaf2307bd1a)
2007-10-10 12:58:46 -05:00
Tim Potter
34ca729f73 r1374: Fix signed/unsigned warnings (actually found by g++) after unsigned int
changes in r1018.
(This used to be commit 45b4016530fc0bfa13146f73a503866b5dbed517)
2007-10-10 12:56:54 -05:00
Andrew Tridgell
f0a8f718ff r792: - changed the ldb ldif_* functions to be in the ldb_ namespace
- added better error reporting in ldbdel

 - fixed a bug in handling packing of records which contain elements
   with no values (it caused db corruption)

 - allow search with "dn" as target attribute
(This used to be commit 36575396234e3d35dbd442c8f1ff54a17ae64e64)
2007-10-10 12:53:50 -05:00
Andrew Tridgell
55fa62be31 r609: allow ldbedit to take a list of attributes to edit, just like
ldbsearch. This allows you to edit the description of all users using
something like:

  ldbedit 'objectclass=user' description

and not get overwhelmed with fields. It also allows you to edit HIDDEN attributes
by specifying them explicitly
(This used to be commit dd83d39de23cdf8c574005829972dae8dc6bee6a)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
265023fafa r574: - another attempt at const cleanliness in ldb
- fixed a problem with searching for values containing an '=' sign

 - fixed the semantics of attempting an attribute deletion on an attribute that doesn't exist.

 - added some more ldb_msg_*() utilities
(This used to be commit 62b4ec367d170330d837b0f1fe5cd13205a53b59)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
68293565de r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
(This used to be commit 74b89d5f960d6b936751e3f057b4540eb80b79cd)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
d8ce7c6a2a r502: modified ldb to allow the use of an external pool memory
allocator. The way to use this is to call ldb_set_alloc() with a
function pointer to whatever memory allocator you like. It includes a
context pointer to allow for pool based allocators.
(This used to be commit 3955c482e6c2c9e975a4bb809ec8cb6068e48e34)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
232bc1503f r490: - expanded the test suite to test modify and delete operations
- made yet another attempt to make ldb const clean.

- "make test" now runs both the tdb and ldap backend tests, and run the ldbtest utility
  with and without indexing

- added prototypes in ldb.h for ldb_msg_*() public functions
(This used to be commit 01e87406768cb5a98ac8530a2f361a4987a36cd3)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
208e09747c r456: - added -i option to ldbsearch
- fixed sorting bug in ldb index handing
(This used to be commit cdd48e2b9b3ca6be5503eec401e09db162408ac8)
2007-10-10 12:51:43 -05:00
Andrew Tridgell
78aa8f1814 r444: - added the beginnings of a ldb test suite and benchmark
- updated the test slapd config to use bdb and indexing
(This used to be commit 7ad0858c060ee212a33434dc4be75e7a0cd1a0e3)
2007-10-10 12:51:42 -05:00
Andrew Tridgell
585d87a959 r442: fixed some uninitialised variables pointed out by gcc -O3
(This used to be commit ff31cfb941b77e99e648011a6b7639b2a5923a6a)
2007-10-10 12:51:42 -05:00
Andrew Tridgell
0dad5a3427 r435: a major upgrade for ldb
- added the ability to mark record attributes as being CASE_INSENSITIVE, WILDCARD or INTEGER.

 - added the ability to support objectclass subclasses, and to search by a parent class

 - added internal support for case insensitive versus case sensitive
   indexing (not UTF8 compliant yet)

 - cleaned up a number of const warnings

 - added a number of helper functions for fetching integers, strings and doubles

 - added a in-memory cache for important database properties, supported by a
   database sequence number

 - changed some variable names to avoid conflicts with C++
(This used to be commit f2bf06f25c2e6c744817711c7bedbd1d3b52f994)
2007-10-10 12:51:38 -05:00
Andrew Tridgell
ee0489fff6 r380: make sure that ldbedit -a works with all tdb and LDAP backends
(This used to be commit b5cb5a1e62a4b9df6f163082498942553662436e)
2007-10-10 12:51:35 -05:00
Andrew Tridgell
3185ace216 r163: - enable ldap in the sample makefile, and use /usr prefix
- show number of adds/deletes/modifies after an edit

 - nicer error messages from ldbedit
(This used to be commit 077951f6bcb1d0eba2de76d0df4c186b7fa19a14)
2007-10-10 12:51:13 -05:00
Andrew Tridgell
a7efe6c1c3 r159: nicer usage messages when no URL is given
(This used to be commit 8655f0b435e06af21d5d9fa210441fbf318673f0)
2007-10-10 12:51:12 -05:00