1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

246 Commits

Author SHA1 Message Date
Andrew Tridgell
f6c2c51907 r7719: make the ildap ldb backend use the defaultNamingContext if the basedn
is not specified, so:

  ldbsearch ldap://hostname '(objectclass=user)'

works without knowing the domain name
2007-10-10 13:18:26 -05:00
Andrew Tridgell
6277c3923e r7714: enable samba credentials handling in ldb tools. So you can now do a
encrypted ldbedit against w2k3
2007-10-10 13:18:25 -05:00
Andrew Tridgell
aec0544962 r7712: ldb/common/util.c is gone 2007-10-10 13:18:25 -05:00
Andrew Tridgell
5e8db1c9b3 r7710: new command line handling code for ldb 2007-10-10 13:18:24 -05:00
Andrew Tridgell
f648fdf187 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
2007-10-10 13:18:24 -05:00
Andrew Tridgell
844d2a2083 r7669: removed ldap from our configure tests
This takes our link dependencies from this:

tridge@blu:~/samba/samba4/source$ ldd bin/ldbsearch
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7fc9000)
        libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0xb7f92000)
        liblber.so.2 => /usr/local/lib/liblber.so.2 (0xb7f85000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7f7d000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7e48000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000)
        libresolv.so.2 => /lib/tls/libresolv.so.2 (0xb7e36000)
        libcrypt.so.1 => /lib/tls/libcrypt.so.1 (0xb7e09000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7df3000)
        libgnutls.so.11 => /usr/lib/libgnutls.so.11 (0xb7d8c000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7d7d000)
        libtasn1.so.2 => /usr/lib/libtasn1.so.2 (0xb7d6d000)
        libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb7d20000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb7d1c000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7d09000)
        libnsl.so.1 => /lib/tls/libnsl.so.1 (0xb7cf5000)

to this:

tridge@blu:~/samba/samba4/source$ ldd bin/ldbsearch
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7fc9000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7fc0000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7e8b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000)

this finally gets rid of the implicit dependency on pthreads! Yay!
2007-10-10 13:18:20 -05:00
Andrew Tridgell
74841dbb2a r7667: added a ldb ildap backend, using our internal ldap client library. Next step is to
remove the check for the ldap libraries in configure
2007-10-10 13:18:19 -05:00
Andrew Tridgell
ac3f33c615 r7666: fixed a memory leak in the ldap ldb backend 2007-10-10 13:18:19 -05:00
Simo Sorce
8735188b46 r7635: change the license of this file to lgpl like the rest of ldb 2007-10-10 13:18:16 -05:00
Simo Sorce
b38bb63175 r7615: fix the build and simplify gendb_search_dn 2007-10-10 13:18:14 -05:00
Simo Sorce
0218fc678e r7608: bug fix after yesterday's change 2007-10-10 13:18:14 -05:00
Derrell Lipman
ce9966e091 r7602: fix some compiler warnings 2007-10-10 13:18:13 -05:00
Derrell Lipman
0a64948152 r7601: ldb_sqlite3 work in progress 2007-10-10 13:18:13 -05:00
Andrew Tridgell
87fc307339 r7596: next step in ldap cleanup. I'm aiming to get rid of the cut&pasted
ldif parsing code in libcli/ldap/ldap_ldif.c, and instead use the ldb
ldif code. To do that I have changed the ldap code to use 'struct
ldb_message_element' instead of 'struct ldap_attribute'. They are
essentially the same structure anyway, so by making them really the
same it will be much easier to use the ldb code in libcli/ldap/

I have also made 'struct ldb_val' the same as a DATA_BLOB, which will
simplify data handling in quite a few places (I haven't yet removed
all the code that maps between these two, that will come later)
2007-10-10 13:18:12 -05:00
Derrell Lipman
86ca8639e0 r7586: ldb_sqlite3 making progress. add and search have indicated a willingness to operate properly on initial testing 2007-10-10 13:18:11 -05:00
Simo Sorce
a614466dec r7582: Better way to have a fast path searching for a specific DN.
Old way was ugly and had a bug, you couldn't add an attribute named
dn or distinguishedName and search for it, tdb would change that search in a dn search.
This makes it also possible to search by dn against an ldap server as the old method was
not supported by ldap syntaxes.

sss
2007-10-10 13:18:11 -05:00
Andrew Tridgell
73d2e5df0c r7572: fixed filter in test suite 2007-10-10 13:18:11 -05:00
Andrew Tridgell
348a86e643 r7571: fixed the generation of the filter string for extended filters 2007-10-10 13:18:10 -05:00
Andrew Tridgell
853b8cd72d r7564: added a test showing the search expression that w2k is actually giving
us that triggered this work
2007-10-10 13:18:09 -05:00
Derrell Lipman
d8a9ce7853 r7562: work in progress 2007-10-10 13:18:09 -05:00
Derrell Lipman
42cbb155c2 r7561: moved OID constants into ldb.h and used manifest constants in ldb_match.c 2007-10-10 13:18:08 -05:00
Andrew Tridgell
7b58b3a9c5 r7560: added tests for extended bitop search functions 2007-10-10 13:18:08 -05:00
Andrew Tridgell
0c44a67001 r7559: support 64 bit matching in bitops 2007-10-10 13:18:08 -05:00
Andrew Tridgell
5f773b065f r7558: added support in ldb for extended ldap search requests. These are
using to perform such things as bitop tests on integers.

So far I have only added support for the 1.2.840.113556.1.4.803 and
1.2.840.113556.1.4.804 rules, which are for bitwise and/or
2007-10-10 13:18:08 -05:00
Andrew Tridgell
6a9ab148a9 r7533: don't show compile flags for each file 2007-10-10 13:18:07 -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
Andrew Tridgell
646953df4c r7526: make test should depend on the bins 2007-10-10 13:18:06 -05:00
Andrew Tridgell
04356c1b1e r7522: added a ldb_filter_from_tree() function that takes a ldb_parse_tree
and forms a ldab search filter expression. Next step is to make our
ldap server code go from ASN.1 to a ldb_parse_tree, instead of trying
to construct string filters, then add a ldb_search_tree() call to
allow for searches using parse trees.

all of this is being done as I am hitting bitwise '&' ldap search
expressions from w2k, and want to handle them cleanly.
2007-10-10 13:18:05 -05:00
Andrew Tridgell
52e4a5b3b0 r7518: don't use an uninitialised ldb debug function when failing to load modules in the ldap
backend
2007-10-10 13:18:03 -05:00
Andrew Tridgell
18c96f2b3e r7517: handle zero length equality tests 2007-10-10 13:18:03 -05:00
Andrew Tridgell
9913ab2550 r7516: make sure binary decoding gives us something we can run string functions on 2007-10-10 13:18:03 -05:00
Andrew Tridgell
12647e3722 r7515: merge in the binary encode/decode enhancements from the libcli/ldap/
code into the ldb parse code
2007-10-10 13:18:02 -05:00
Andrew Tridgell
5b3575d930 r7514: make the ldb_parse code not depend on a ldb_context, so we can now potentially use
it in our ldap client code, instead of replicating all the code
2007-10-10 13:18:02 -05:00
Derrell Lipman
797263330b r7498: ldb_sqlite3 work in progress 2007-10-10 13:18:00 -05:00
Derrell Lipman
510e7994da r7480: ldb_sqlite3 work in progress 2007-10-10 13:17:57 -05:00
Derrell Lipman
0e3b872560 r7449: add ctype.h header to dn expand function 2007-10-10 13:17:54 -05:00
Derrell Lipman
9a78161b0f r7446: add distclean target to generated ldb makefile 2007-10-10 13:17:54 -05:00
Derrell Lipman
7543acfa9f r7443: reorg functions for readability 2007-10-10 13:17:54 -05:00
Derrell Lipman
2fc5343f06 r7438: work in progress 2007-10-10 13:17:53 -05:00
Derrell Lipman
61dcb462f3 r7437: Make Simo happy.
I still think this URI syntax for a 'protocol' which has no network component
is stupid; it should just be

  sqlite:local_file
or
  sqlite:/full/path/to/file

but there is enough precedent to warrant the behavior that Simo wants that it
is not worth arguing.
2007-10-10 13:17:53 -05:00
Derrell Lipman
2a13e7655b r7418: work in progress 2007-10-10 13:17:51 -05:00
Derrell Lipman
4c8bffc3f0 r7410: minor cleanup 2007-10-10 13:17:51 -05:00
Derrell Lipman
588a1d1451 r7408: added DN explode function, based on simo's ldap_parse_dn() function. simo, when you get a chance, please change your license so this can be linked with ldb. 2007-10-10 13:17:50 -05:00
Derrell Lipman
0e4d9729d9 r7349: work in progress 2007-10-10 13:17:45 -05:00
Simo Sorce
d36fde5c0c r7343: handle url like ldb_tdb does 2007-10-10 13:17:45 -05:00
Simo Sorce
c226c1c7a3 r7338: let it be possible to run sqlite3 tests when it is compiled in
make it also so that we do not run test for modules we do not compile in
2007-10-10 13:17:44 -05:00
Stefan Metzmacher
cd59ff50ed r7336: make --with-sqlite3=auto possible
metze
2007-10-10 13:17:44 -05:00
Simo Sorce
d6dae85881 r7334: I do not feel oblidged to use sqlite3 when I configure ldap support :-)
(fix typo)
2007-10-10 13:17:43 -05:00
Derrell Lipman
8fa340c1d4 r7332: added note to self for required modification 2007-10-10 13:17:43 -05:00
Derrell Lipman
84a2b4049f r7316: work in progress 2007-10-10 13:17:41 -05:00