1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

504 Commits

Author SHA1 Message Date
Andrew Tridgell
2fe7c3a34a r10485: run autoheader before autoconf
(This used to be commit 9456ed3db3)
2007-10-10 13:38:53 -05:00
Simo Sorce
63b43dd12f 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
(This used to be commit c2bb2a36bd)
2007-10-10 13:38:52 -05:00
Andrew Tridgell
fcb41c3bbd r10423: minor changes to the ldb test suite to allow it to work correctly with
a real ldap backend (such as openldap)
(This used to be commit d267f8c623)
2007-10-10 13:38:44 -05:00
Andrew Tridgell
1828b783cf r10422: ldb_search() can now use tdb_traverse_read() to ensure it can run in
parallel with any transaction
(This used to be commit ddff66298f)
2007-10-10 13:38:44 -05:00
Simo Sorce
2ce3b5a003 r10419: Remove unused prototypes of locking functions (thanks Jelmer)
omment about transactions
(This used to be commit 3335250759)
2007-10-10 13:38:43 -05:00
Tim Potter
7e8372f253 r10415: The ldb and tdb libraries are bad examples to test out the make proto
code as they are marked as NOPROTO in the config.mk files.
(This used to be commit 5f530eacba)
2007-10-10 13:38:43 -05:00
Andrew Tridgell
af352b4664 r10408: now that we are using tdb transactions we don't need any additional
locking code in the ldb_tdb backend, except for a single read lock
during searches to ensure searches don't cross transaction boundaries

The tdb transactions code would map these extra locks to noops anyway
(as locking makes no sense inside a transaction), but the work in
setting up the locking keys still costs something, and it makes the
code needlessly complex
(This used to be commit 1b8d368a67)
2007-10-10 13:38:42 -05:00
Andrew Tridgell
d78ea3e34a r10406: added --nosync option to all ldb tools, so that you can control if
transactions are synchronous or not on the command line.

add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary
ldb databases non-synchronous
(This used to be commit dba41164e0)
2007-10-10 13:38:41 -05:00
Andrew Tridgell
ede8415d61 r10405: added transactions into tdb, and hook them into ldb. See my
samba-technical posting for more details on the transactions design.

This also adds a number of command line arguments to tdbtorture,
making it more flexible, and fixes some lock deadlock conditions in
the tdbtorture code.
(This used to be commit 06bd8abba9)
2007-10-10 13:38:41 -05:00
Andrew Tridgell
cd67aa92a5 r10403: fixed the basedn for testing, and add a debug showing the size of the test in ldbtest
(This used to be commit 740b9f7537)
2007-10-10 13:38:40 -05:00
Tim Potter
3e4f47aaff r10379: Add files for ldb and tdb to proto_files. The tool for building proto.h
is busted though.
(This used to be commit 54882f88ca)
2007-10-10 13:38:34 -05:00
Tim Potter
d191c7d993 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
(This used to be commit 9d001dc083)
2007-10-10 13:38:33 -05:00
Jelmer Vernooij
8db177b652 r10366: More scons fixes. Building et, asn1, lex and yacc files sort-of works now
(This used to be commit 22f18a8424)
2007-10-10 13:38:32 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
069e498da2 r10330: Add SConscript to more subsystems. Some of the tdb tools build now.
Start on custom Samba scons tools (for handling proto generation, pidl, etc)
(This used to be commit 4bffe44359)
2007-10-10 13:38:28 -05:00
Stefan Metzmacher
cb9d4c6707 r10312: fix compiler warning
metze
(This used to be commit 3309a0f4d9)
2007-10-10 13:38:16 -05:00
Simo Sorce
16aff2a184 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.
(This used to be commit 3fc676ac1d)
2007-10-10 13:38:16 -05:00
Simo Sorce
46a8d80937 r10304: check for basic ldb_message sanity and return appropriate
LDB_ERR_ value
(This used to be commit 610f5646f0)
2007-10-10 13:38:15 -05:00
Simo Sorce
bb8f5c93ee r10303: check no attribute is given empty
(This used to be commit f0ad9495e4)
2007-10-10 13:38:15 -05:00
Simo Sorce
eebe0c269e r10302: Introduce ldap like error codes
(This used to be commit cbe438be6d)
2007-10-10 13:38:15 -05:00
Simo Sorce
cba1859fe1 r10301: fix standalone compiple after tdb changes
(This used to be commit acfb4b9283)
2007-10-10 13:38:15 -05:00
Simo Sorce
8919d6bf9a 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.
(This used to be commit 1da4ac2cdc)
2007-10-10 13:38:14 -05:00
Simo Sorce
5c708830bc r10277: do not ovverride LIKE, thanks to derrel I found out how to do
the same thing with a harmless user function
(This used to be commit 158693b406)
2007-10-10 13:38:13 -05:00
Andrew Tridgell
0868b7c77d r10253: a fairly large tdb cleanup and re-organise. Nearly all of this change
just involves splitting up the core tdb.c code into separate files on
logical boundaries, but there are some minor functional changes as well:

 - move the 'struct tdb_context' into tdb_private.h, hiding it from
   users. This was done to allow the structure to change without
   breaking code that uses tdb.

 - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to
   access the elements of struct tdb_context that were used by
   external code but are no longer visible

 - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just
   as good due to the way tdb locks work

 - changed some of the types (such as tdb_off to tdb_off_t) to make
   syntax highlighting work better

 - removed the old optional spinlock code. It was a bad idea.

 - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes
   fail or report nasty looking errors. This is the only real bug
   fixed in this commit. Jeremy/Jerry, you might like to pickup this
   change for Samba3, as that could definately affect smbd in
   Samba3.

The aim of all of these changes is to make the tdb
transactions/journaling code I am working on easier to write. I
started to write it on top of the existing tdb.c code and it got very
messy. Splitting up the code makes it much easier to follow.

There are more cleanups we could do in tdb, such as using uint32_t
instead of u32 (suggested by metze). I'll leave those for another day.
(This used to be commit 4673cdd0d2)
2007-10-10 13:38:12 -05:00
Simo Sorce
d8da5e4fb7 r10251: some more work on ldb_sqlite3
I must say that writing a new module is a very good way
to find lot of subtle bugs laying in the code

We need more tests!

commit oLschema2ldif.c to keep it safe from data losses (rm -fr :-)

update test generic to reflect the fix made on comparsion functions
(This used to be commit 4357a2db5e)
2007-10-10 13:38:11 -05:00
Simo Sorce
8bfcb31b0e r10250: the comparison is caseless so we must caseless subtract
otherwise we get the wrong result when comparing upper
case chars with lower case chars
(This used to be commit f6ea6e9382)
2007-10-10 13:38:11 -05:00
Simo Sorce
f77e859e48 r10236: fix (C) note
(This used to be commit 466e6812c3)
2007-10-10 13:38:10 -05:00
Simo Sorce
36d6ebf376 r10233: add commented PRAGMA to avoid fsyncs
(This used to be commit e5d8d83460)
2007-10-10 13:38:10 -05:00
Simo Sorce
38b04883fe r10232: Some work on ldb_sqlite3.
It is still far from being usable in samba4 but I want to commit
so that the work does not get lost by mistake.
This is also a good way to get comments if somebody is interested.

Sorry Derrell I ended up rewriting large parts of the code but I find
this style much more readable. Thanks for the hard work done. Your
work was a good reference for me.

ah the current code also shows some good numbers

sqlite3 generic test:
uid search took 0.05 seconds
real    0m12.492s
user    0m0.492s
sys     0m0.345s

with tdb we still get better numbers:
uid search took 0.46 seconds
real    0m0.892s
user    0m0.360s
sys     0m0.468s

but most of the time is spent in adding operations and I think
there's still a lot of space for improvement.

Simo.
(This used to be commit ace9990060)
2007-10-10 13:38:10 -05:00
Simo Sorce
2b2e133752 r10231: seem I flipped these, fix.
(This used to be commit 8ddf4de162)
2007-10-10 13:38:09 -05:00
Jelmer Vernooij
3ca370b3db r10038: Update instructions on using gcov with ldb
(This used to be commit 8d246fac49)
2007-10-10 13:36:32 -05:00
Jelmer Vernooij
4462869db2 r9948: Be a bit less verbose
(This used to be commit 071dba2d0a)
2007-10-10 13:36:24 -05:00
Andrew Bartlett
95fcf031b0 r9929: Fix indentation
Andrew Bartlett
(This used to be commit d6f57ec921)
2007-10-10 13:36:23 -05:00
Andrew Bartlett
ca87549168 r9928: ncName is a DN, and needs to use DN matching rules.
Andrew Bartlett
(This used to be commit b89e7a7fcd)
2007-10-10 13:36:22 -05:00
Jelmer Vernooij
f14f4fd706 r9918: Fix two copy-n-paste bugs that were preventing the modification
of special DN's when the rdn_name or timestamps modules were in use.
(This used to be commit c61efb2ff8)
2007-10-10 13:36:22 -05:00
Jelmer Vernooij
08f630be82 r9915: Some more mappings. Fix weird sAMAccountName values.
(This used to be commit 8ff1358f40)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
4f4dae05f0 r9912: Fix another bug in ldb_map.
(This used to be commit 4c3b37d660)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
ca6c0af86f r9908: Generate posixUser and posixGroup as well
(This used to be commit ebed25b47d)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
e2e2508b58 r9899: Be more conservative about what is sent to the remote server in ldb_map.
(This used to be commit 76e943d441)
2007-10-10 13:36:21 -05:00
Tim Potter
b2c54c08bf r9881: I can't believe this can make a difference...
(This used to be commit 31069bfd18)
2007-10-10 13:36:20 -05:00
Tim Potter
4d0ec61e49 r9880: Convert remaining initialisers to more portable form. This should
clean out a lot of build farm breakage.
(This used to be commit c34fbdc6c3)
2007-10-10 13:36:19 -05:00
Tim Potter
7a3e0a89f1 r9879: A quick check to see if nested initialisers (?) is portable across the
build farm.  I have a feeling it isn't.
(This used to be commit 7cc8df0c2f)
2007-10-10 13:36:19 -05:00
Jelmer Vernooij
1b5cb7309d r9857: Fix rename/delete issues
(This used to be commit d6dce7ef3e)
2007-10-10 13:36:18 -05:00
Jelmer Vernooij
05db3024ba r9854: Finish ldb_map testsuite
Update PLAN
Some more small other fixes
(This used to be commit de2bde2526)
2007-10-10 13:36:18 -05:00
Jelmer Vernooij
222fdd5237 r9842: More error checks in the ldb_map modules, extend testsuite
(This used to be commit b7992de4b7)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
84bfcd3c78 r9835: Make ldb_map compile in the stand-alone LDB build
(This used to be commit 2283a336e0)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
40f85ace04 r9813: Conver testsuite for samba3sam module to EJS
(This used to be commit 77f24ed131)
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
81e130b592 r9789: Patch from Volker that fixes the build on AIX.
(This used to be commit 9a1a7fb60e)
2007-10-10 13:35:01 -05:00
Jelmer Vernooij
f9447d2a17 r9786: Move ldb_map into ldb/modules/
Move samba3sam to dsdb/
(This used to be commit eb9d615bcd)
2007-10-10 13:35:01 -05:00
Andrew Tridgell
5c6528336c r9775: r11607@blu: tridge | 2005-08-30 12:16:19 +1000
fixed the help message
(This used to be commit 5e3d9708f6)
2007-10-10 13:35:00 -05:00
Jelmer Vernooij
c0293aa715 r9771: - Prevent ldb crash when a invalid DN is added
- Don't silently drop records with empty attributes

tridge/simo: Could you please verify this patch is correct?
(This used to be commit 505c9b1d3d)
2007-10-10 13:34:59 -05:00
Jelmer Vernooij
7be4cf8c1d r9770: Couple other bugfixes
Update TODO-list
(This used to be commit d9541535e3)
2007-10-10 13:34:58 -05:00
Jelmer Vernooij
fe1ee4494e r9766: Prevent erroneous OOM message
ldb_dup_val() sets out->data to NULL if in->length == 0
(This used to be commit 7ecb6988e7)
2007-10-10 13:34:57 -05:00
Jelmer Vernooij
615e1c55bf r9751: Remove C version of samba3dump (the EJS version works nicely as well).
Fix a couple of bugs in ldb_map.
(This used to be commit 66df76a634)
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
0a72d9a5f7 r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB
(This used to be commit 435e4c6389)
2007-10-10 13:34:55 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Jelmer Vernooij
d6cd54fb0a r9718: Work a bit on the SWAT interface
(This used to be commit b1844905d2)
2007-10-10 13:34:53 -05:00
Jelmer Vernooij
8b15ef881d r9712: Bunch of small fixes
Write out basic sam.ldif
(This used to be commit 67593bef7f)
2007-10-10 13:34:52 -05:00
Jelmer Vernooij
df384bfa25 r9699: Add as much attributes the current Samba4 SAM has to the mapping table (ignoring most of them, currently..)
(This used to be commit 5100ae211c)
2007-10-10 13:34:49 -05:00
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Jelmer Vernooij
e1269bafe8 r9690: Extend test + fix several bugs
(This used to be commit 0cff0e03fc)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
afb62ee775 r9689: valgrind-clean now. Editing works now mostly, you just lose half of your
database every time you do it...
(This used to be commit 40ea2af427)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
e8635da74d r9686: Another round of bugfixes. Works somewhat now, when running under valgrind ;-)
(This used to be commit 786379064f)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
7e3838dd2d r9685: Add tests for samba3sam mapping module
Fix a couple of bugs
Move samba3sam backend to lib/ldb/
Remove some more unused parameters
(This used to be commit 7f864d446d)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
02779b745f r9672: Fix build for compilers that don't like undefined-length arrays at the end of structs...
(This used to be commit c2211df586)
2007-10-10 13:34:39 -05:00
Andrew Tridgell
7fd36b79eb r9671: patch from Kai Blin fixing a bug in our base64 encoder
(This used to be commit efa143cb3b)
2007-10-10 13:34:38 -05:00
Tim Potter
a45c4fd5e2 r9625: Get rid of "duplicate const" warning.
(This used to be commit 0ec755cfa0)
2007-10-10 13:34:35 -05:00
Jelmer Vernooij
69fb684063 r9621: Bunch of bug fixes. Add 'format' option to samba3dump (text,summary,ldif)
(This used to be commit dc6aab8d4a)
2007-10-10 13:34:35 -05:00
Jelmer Vernooij
9bf5e494f7 r9616: Finish ldb_map module (still needs a lot of testing though...)
Add initial mapping table for ldb_samba3. Contains most attributes.
(This used to be commit b73441b04d)
2007-10-10 13:34:35 -05:00
Jelmer Vernooij
98b303e2eb r9595: Add ldb map module
(This used to be commit e0a0d3f092)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
47843f2b64 r9591: - Remove empty file
- Fix a couple of typo's
- Fix build of lib/samba3/secrets.c for systems that don't have /usr/include/tdb.h...
(This used to be commit b8c5290063)
2007-10-10 13:34:33 -05:00
Simo Sorce
894a1ed5ae r9451: some fixes now core.schema and cosine.schema are also read properly
(This used to be commit 0a26ee0432)
2007-10-10 13:34:16 -05:00
Simo Sorce
5c16371daa r9447: Add a new tool to convert openLdap schema files into an ldif
My first test with nis.schema seem to confirm it works properly

Use a command line like:
oLschema2ldif -I tests/schema/nis.schema -O nis_schema.ldif -b "dc=sambadom,dc=samba,dc=org"
to see how it works.

SSS
(This used to be commit fc373fd463)
2007-10-10 13:34:16 -05:00
Simo Sorce
f975eb06f0 r9446: clean up old test file
(This used to be commit 10e4ebcc42)
2007-10-10 13:34:15 -05:00
Jelmer Vernooij
3c4cc87bf8 r9438: Add initial files for ldb_map
(This used to be commit a66eeadecd)
2007-10-10 13:34:14 -05:00
Simo Sorce
f2ac4b8d6b r9394: avoid to use BOOL in ldb
(This used to be commit d2055849fb)
2007-10-10 13:33:33 -05:00
Simo Sorce
7c7b93f649 r9393: Fix ldb standalone build
(This used to be commit 796d0ea2fc)
2007-10-10 13:33:33 -05:00
Simo Sorce
ac90ddfdb2 r9392: Fix ldb_dn_compose to make build farm happy
Add ldb_dn_string_compose so that you can build a dn starting from a
struct ldb_dn base and a set of parameters to be composed in a format
string with the same syntax of printf
(This used to be commit 31c69d0655)
2007-10-10 13:33:33 -05:00
Simo Sorce
3e4c4cff21 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
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Andrew Tridgell
6195932b42 r9387: regedit uses "New Key #nn" for newly created keys, which conflicts with the stricter
DN rules in ldb. Escape the DN components to cope.

Simo, sorry for making a change in ldb_dn.c while you have changes
pending. Please feel free to revert these and switch reg_backend_ldb.c
to use the new dn construction code.
(This used to be commit 136ecf5cb2)
2007-10-10 13:33:31 -05:00
Stefan Metzmacher
8609e79932 r9318: fix searches with scope ONE and SUB,
the problem was that ldb_dn_compare_base() just looked at if
both dn's mtach some how, and the following happens:

basedn: CN=bar,DC=foo,DC=com
dn: DC=foo,DC=com

and dn: DC=foo,DC=com was return as result of a sub and base search

and also the ONE search with
basedn: DC=foo,DC=com

returned this

dn: CN=bla,CN=bar,DC=foo,DC=com

metze
(This used to be commit 2a107472c3)
2007-10-10 13:33:23 -05:00
Jelmer Vernooij
9f611ffdde r8966: Simplify the makefile generation system a bit.
Autogenerate list of binaries (rather then having them hardcoded in build/smb_build/makefile.pm)
Add INSTALLDIR keyword to .mk files
(This used to be commit ce0935112b)
2007-10-10 13:31:00 -05:00
Simo Sorce
f297f82398 r8917: Better support for extended ldap search operations
Try to follow the RFC where possible and adapt to
  openLdap and AD way of handling this structure
(This used to be commit d844d45d87)
2007-10-10 13:30:57 -05:00
Rafal Szczesniak
ebb76f84ad r8810: Fix missing headers. Still doesn't fix the build but getting closer there.
rafal
(This used to be commit bc638cc3d6)
2007-10-10 13:30:07 -05:00
Simo Sorce
768585b1dd r8779: Add rdn module to makefile and headers
Search by distinguishedName as if searching by dn
(This used to be commit 1d40461362)
2007-10-10 13:30:04 -05:00
Andrew Bartlett
a7f9d9c5b8 r8740: Extend the rdn_name module to handle adding the rdn as an attribute. ie:
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 0cc58f5c3c)
2007-10-10 13:30:00 -05:00
Andrew Tridgell
79cac4b6e2 r8736: this fixes the ldb speed (raises BENCH-WINS from 15 ops/sec to over 4000)
simo, we need to be careful to cope with this sort of direct dn query efficiently
(This used to be commit 7b37923b72)
2007-10-10 13:30:00 -05:00
Andrew Bartlett
4396d0d148 r8669: The objectguid module belongs in Samba's ldb module collection, not in
ldb, as it can't build without the NDR and GUID code.

Also make it properly use the NDR encoding for the GUID (I forgot last
time, and used a string), as well as set the dependencies on the
module correctly.

Andrew Bartlett
(This used to be commit 8054abc76e)
2007-10-10 13:29:52 -05:00
Andrew Tridgell
eb08c1fc8f r8668: fixed a segv during upgrade of a very old ldb.
Thanks to volker for finding this one too. Keep them coming!
(This used to be commit 756796ad2e)
2007-10-10 13:29:52 -05:00
Andrew Bartlett
2a0cf520e3 r8667: Further simply the provision script, by removing the 'name' attribute.
This is now calculated on the fly for every add and modify.

Andrew Bartlett
(This used to be commit ed1f2e029c)
2007-10-10 13:29:52 -05:00
Andrew Tridgell
7a8ac75887 r8659: return ldif formatted attributes in the ejs ldb search call, so sids show up as strings
not binary blobs
(This used to be commit d2c29a5a51)
2007-10-10 13:29:50 -05:00
Andrew Bartlett
24d2107324 r8650: Use the timestamps and a new objectguid module rather than placing
boilerplate attributes in every entry in provision.ldif.

The next step will be to use templates.

Andrew Bartlett
(This used to be commit 940ed9827f)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
338c3f8523 r8625: move the ldb_wrap logic into the ldb code. This logic is meant to
avoid the horrors of posix locking, but it was preventing us having an
ldb open twice with different options. Now each ldb open of the same
file shares the same underlying tdb, but uses a different ldb
structure
(This used to be commit 4e090c66df)
2007-10-10 13:29:45 -05:00
Andrew Tridgell
c1a4f0c769 r8601: fixed null termination in ltdb connect error
(This used to be commit 64b6586b57)
2007-10-10 13:29:43 -05:00
Andrew Tridgell
3c5675af93 r8600: fixed null termination on some error messages in ldb
(This used to be commit 326f0ad6fb)
2007-10-10 13:29:43 -05:00
Simo Sorce
bfb1186269 r8585: add to ldb and ldap comparison functionality
better pares filters
Approx is currently only a stub need to dig more info to
understand what it really means and how it works exactly
(This used to be commit a9e8cd0bad)
2007-10-10 13:29:41 -05:00
Simo Sorce
7bcccfc000 r8529: Matching against the wrong union
(This used to be commit 24a65b5ba6)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
6e4bcaffa0 r8517: fixed a crash bug in ldb_dn_compare_base()
(This used to be commit 19d789e825)
2007-10-10 13:29:34 -05:00
Simo Sorce
cb2c43f7b0 r8515: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are compared
on a content level not ona form level, his means that the 2 DNs:
a) cn= user, dc=this, dc = is,dc=test
b) cn=user,dc=this,dc=is,dc=test
are now identical even if the string form differ (spaces)
(This used to be commit 76d496c308)
2007-10-10 13:29:33 -05:00
Andrew Tridgell
4df9b5a6e3 r8490: make the ldb tests more portable
(This used to be commit 6b20bcbeeb)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
32b06d5882 r8485: - be friendly to shells other than bash
- don't use /tmp in test paths, as that opens us to symlink attacks
(This used to be commit 9f29cccbc1)
2007-10-10 13:23:08 -05:00
Tim Potter
52bef30fd4 r8414: Some C++ friendlyness fixes - 'not' is apparently a keyword in C++.
(This used to be commit bcfb3a45e4)
2007-10-10 13:23:00 -05:00
Love Hörnquist Åstrand
61edb97bdf r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
(This used to be commit 56fd21c806)
2007-10-10 13:20:14 -05:00
Simo Sorce
f5598308d5 r8377: forgot an ldif test
(This used to be commit ed804262dc)
2007-10-10 13:20:14 -05:00
Simo Sorce
c9b0e86a43 r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
(This used to be commit 4eb5863042)
2007-10-10 13:20:13 -05:00
Andrew Tridgell
a7c7a9c64c r8364: fixed a valgrind bug spotted by simo
(This used to be commit ef804e8f36)
2007-10-10 13:20:12 -05:00
Andrew Tridgell
7c78ec0e14 r8342: allow ldb_ldif_read_string() to continue in the string, so you can
read multiple records
(This used to be commit 4b11c00421)
2007-10-10 13:20:08 -05:00
Stefan Metzmacher
d9129a77bd r8228: fix compiler warnings
metze
(This used to be commit 93c1d18021)
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
5a176571d8 r8224: - add objectGUID ldif_handler
- fix some compiler warnings

metze
(This used to be commit e6c39241bf)
2007-10-10 13:19:21 -05:00
Stefan Metzmacher
8f9e87d858 r8146: fix compiler warning
metze
(This used to be commit 5fcaa21d67)
2007-10-10 13:19:12 -05:00
Simo Sorce
3fe6ca1c18 r8084: do not leak memory on errors
(This used to be commit 2e328e6c2f)
2007-10-10 13:19:07 -05:00
Simo Sorce
e6b353e764 r8083: check attribute type is valid (only ascii alphanum chars and '-' char)
fail if not
(This used to be commit b1a61cd5d0)
2007-10-10 13:19:06 -05:00
Simo Sorce
1c5105065a r8082: large rewite of ldb_dn.c
- 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 624a73148d)
2007-10-10 13:19:06 -05:00
Andrew Tridgell
75883a2237 r8071: reduce the size of the default ldb tests. We run on some pretty low powered machines
in the farm, and don't want to chew too much cpu needlessly.
(This used to be commit c03753faa4)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
f450b0a02a r8043: increase shell compatibility of ldb tests
(This used to be commit 60863b6faf)
2007-10-10 13:19:02 -05:00
Andrew Tridgell
978335ae94 r8041: remove a mis-spelled debug message :-)
(This used to be commit 912fa269d2)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
036a7dd9f8 r8039: allow ldb test suite to be run outside of the ldb directory
(This used to be commit f3e3b2ccd9)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
bd7812be31 r8038: - fixed indexing on binary values that need base64 encoding and canonicalisation
- added support for recognising the S- form of objectsid in search
  expressions. I thought this could be done with just a comparison
  modified comparison function, but it turns out it also needs a
  canonicalisation function so that indexing can work
(This used to be commit 7d2bee2c56)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
a06d66a3a6 r8037: a fairly major update to the internals of ldb. Changes are:
- 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 944c5844ab)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
324de0b36d r8035: added indexing tests. current ldb fails the integer indexing, will be fixed shortly
(This used to be commit a9c3244503)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
64307e6351 r8033: - add easier valgrind testing
- add tests for the @SUBCLASSES ltdb special
(This used to be commit ad6e62fdcf)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
baa873b8a1 r8011: arrgh, commit the right version this time
(This used to be commit 5efea40ea6)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
34c57c5629 r8010: added testing of wildcard attributes
(This used to be commit 25d3872a6e)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
bed487f6a3 r8009: expanded the ldb test suite. It worried me that some changes I have
pending, which I know break lots of features, still passed our test
suite! Now they don't.
(This used to be commit 5801167c8d)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
c645eba60b r8005: escape '"' characters in ldap expressions. Makes scripting easier.
(This used to be commit 2de986455c)
2007-10-10 13:18:58 -05:00
Jelmer Vernooij
65cc3f5d5c r7958: More debian packaging updates; packages build now with
a few minor issues.

Move ldb manpages one level higher - there is no longer a need to have
subdirectories.
(This used to be commit e8e3524b23)
2007-10-10 13:18:54 -05:00
Jelmer Vernooij
fa8d539e0f r7943: Add 'make manpages', fix 'make installman' and 'make uninstallman'.
Not part of the "all" make target yet, as it requires xsltproc
(This used to be commit fd3f463643)
2007-10-10 13:18:53 -05:00
Simo Sorce
e1e95277c0 r7937: main file was missing
(This used to be commit 3898cdb0dc)
2007-10-10 13:18:53 -05:00
Simo Sorce
1702f52498 r7936: new ldb_dn_explode and ldb_dn_casefold functions and co
(This used to be commit 7ccf21ab4e)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
6a7119fc83 r7926: poptGetNextOpt() returns int, not char
this was breaking ldbadd on some platforms
(This used to be commit dd0ac3f68d)
2007-10-10 13:18:51 -05:00
Derrell Lipman
1603fd9466 r7897: work in progress
(This used to be commit 8e1431efcf)
2007-10-10 13:18:47 -05:00
Andrew Tridgell
49736de46a r7873: hopefully fixed build of ldb_explode_dn() on AIX
I'd really rather see this code completely replaced, but I'll leave
that to simo (he has volunteered) :-)
(This used to be commit cc2e08d68e)
2007-10-10 13:18:46 -05:00
Andrew Tridgell
b818ff3ede r7868: canonicalise the message before using ldb_add() in the ldbadd utility.
(This used to be commit 56f4af5f21)
2007-10-10 13:18:45 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
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 d40bc2fa8d)
2007-10-10 13:18:44 -05:00
Simo Sorce
ce2e35309e r7851: We are case preserving let the DN be returned the same the user put it into.
sss
(This used to be commit 5b41e32024)
2007-10-10 13:18:42 -05:00
Derrell Lipman
f1a853664c r7844: eliminate superfluous attribute tables
(This used to be commit 863beef35b)
2007-10-10 13:18:42 -05:00
Andrew Tridgell
9f51b5716d r7834: added comment about the "((" search test
(This used to be commit 42c42f6611)
2007-10-10 13:18:41 -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 91cc009fed)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
3b9eabc2f3 r7832: missed one
(This used to be commit 20c84f5c52)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
c97e6081e6 r7831: use cn=TEST as base of test DNs so we don't interfere with potentially real records
(This used to be commit 2a426f654d)
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 1dd8650055)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
062e0f8325 r7808: fixed the build of ldb after the binary file support in ldif was added
(This used to be commit 0a8c722c80)
2007-10-10 13:18:38 -05:00
Simo Sorce
7f46f89257 r7806: add test for binary files as attribute values
(This used to be commit 2b2675055e)
2007-10-10 13:18:38 -05:00
Simo Sorce
064d71c9d4 r7805: add support to read binary files into attributes data like ldap tools does
(This used to be commit 38a1439626)
2007-10-10 13:18:37 -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 07d459406b)
2007-10-10 13:18:37 -05:00
Andrew Tridgell
eb0a13025a r7803: added support in ldb for callers to setup ldif read/write functions,
so that ldbedit, ldbsearch etc can display nice human readable ldif,
while storing the data as binary blobs. This will be used for storing
NDR encoded objectSid and similar attributes, while making the command
line interface sane
(This used to be commit 37e283089a)
2007-10-10 13:18:37 -05:00
Andrew Tridgell
b7be627e35 r7784: give an error in ldb_tdb for invalid modify flags. The "whenChanged"
bug was being silently ignored with the tdb backend because of this
bug. A case where the ldap backend was right, and the tdb backend was
wrong!
(This used to be commit ddb26db763)
2007-10-10 13:18:36 -05:00
Andrew Tridgell
bd7a474b19 r7776: add a method for getting arbitrary opaque data into a ldb context, for use by backends.
Currently only EventContext is used in this way.
(This used to be commit 9fa21b2458)
2007-10-10 13:18:35 -05:00
Andrew Tridgell
c4e7c6e2da r7767: fixed ldb dependencies
(This used to be commit 97e4ba84fb)
2007-10-10 13:18:33 -05:00