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

443 Commits

Author SHA1 Message Date
Andrew Tridgell
e28a334eeb r11111: fixed a talloc error in the dn shortcut code 2007-10-10 13:44:51 -05:00
Andrew Tridgell
b6e8018a3b r11110: make ldb_oom() also set the ldb error string 2007-10-10 13:44:51 -05:00
Andrew Tridgell
dc41994ea7 r11109: fixed the error code return from most ldb functions (the change to use
ldb_transaction_cancel() broke it)
2007-10-10 13:44:51 -05:00
Andrew Bartlett
2b1c88f628 r10980: Use ldb_attr_cmp and ldb_dn_escape_value
Andrew Bartlett
2007-10-10 13:39:49 -05:00
Stefan Metzmacher
9a9311fa6b r10959: fix compiler warnings
metze
2007-10-10 13:39:48 -05:00
Andrew Tridgell
d379fb5f10 r10957: make a comment clearer 2007-10-10 13:39:48 -05:00
Andrew Bartlett
c0d6126eff r10956: Tridge thought some comments might be a good idea :-)
Andrew Bartlett
2007-10-10 13:39:48 -05:00
Andrew Tridgell
197e8a27f0 r10954: added support for canonicalName in the operational module, using the
dn->canonicalName function abartlet just committed
2007-10-10 13:39:46 -05:00
Andrew Bartlett
380037ee09 r10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c
Use this new function in the client and server for the CrackNames
case, where we particularly need it.

Andrew Bartlett
2007-10-10 13:39:45 -05:00
Stefan Metzmacher
f1ee8d4b58 r10924: we don't need this line twice
metze
2007-10-10 13:39:43 -05:00
Andrew Tridgell
e9e4d81b69 r10918: - fixed standalone ldb build
- added note about allowedAttributesEffective (will be needed for mmc)

- fixed some more ldb warnings
2007-10-10 13:39:43 -05:00
Andrew Tridgell
9c914542cc r10917: copy the element name in a ldb_msg_rename_attr() and ldb_msg_copy_attr() to ensure
that callers (like the ldap server) can talloc_steal the name
2007-10-10 13:39:42 -05:00
Andrew Tridgell
61e8b01022 r10916: - finished the 'operational' ldb module
- removed the timestamps module, replacing it with the operational module

- added a ldb_msg_copy_shallow() function which should be used when a module
  wants to add new elements to a message on add/modify. This is needed
  because the caller might be using a constant structure, or may want to
  re-use the structure again

- enabled the UTC time attribute syntaxes in the operational module
2007-10-10 13:39:42 -05:00
Andrew Tridgell
efd7dd1a77 r10915: added a standard attribute handler for a ldap UTC time string 2007-10-10 13:39:42 -05:00
Andrew Tridgell
93c296d527 r10914: moved the ldap time string functions into ldb so they can be used by
the time attribute handling functions
2007-10-10 13:39:42 -05:00
Andrew Tridgell
f6818daecc r10913: This patch isn't as big as it looks ...
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.
2007-10-10 13:39:41 -05:00
Andrew Tridgell
99a5b08881 r10897: added in a hackish ldb proxy module that I am using to experiment with
mmc management support
2007-10-10 13:39:41 -05:00
Andrew Tridgell
e2e3193a98 r10895: allow 'dn=string' searches to work again. Windows doesn't allow these,
but they are so very useful for things like dn=@MODULES that I think
its worth supporting them
2007-10-10 13:39:41 -05:00
Andrew Tridgell
1af2cc067f r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
2007-10-10 13:39:40 -05:00
Andrew Tridgell
7684cdb47b r10892: - improved the handling of the special distinguishedName attribute
- ensure we don't add attributes twice, should a user ask for the
  attribute twice. Do this in such a way that we don't become O(n^2)

- removed some unused code
2007-10-10 13:39:40 -05:00
Andrew Tridgell
40d304140b r10889: make searches for dn's less of a special case, and much faster when
part of more complex expressions
2007-10-10 13:39:39 -05:00
Andrew Tridgell
b2551e76e8 r10856: we need aclocal.m4 in ldb for standalone configure 2007-10-10 13:39:37 -05:00
Stefan Metzmacher
fbe8fd06b7 r10830: we should use the same name in all places:-)
metze
2007-10-10 13:39:33 -05:00
Andrew Bartlett
fd7203789a r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
2007-10-10 13:39:32 -05:00
Andrew Tridgell
ef13569ca9 r10790: allow updating of existing ldb opaque values (thanks to abartlet for
spotting this)
2007-10-10 13:39:29 -05:00
Andrew Tridgell
45f0c967b5 r10759: make modules easier to write by allowing modules to only implement the
functions they care about, instead of all functions. This also makes
it more likely that future changes to ldb will not break existing
modules
2007-10-10 13:39:27 -05:00
Andrew Tridgell
3c5f3032fc r10757: remove the proxy module (it is not complete yet) 2007-10-10 13:39:27 -05:00
Andrew Tridgell
bf5cef6f00 r10756: another fix for the construction of expressions from subtrees for
SUBSTRING searches. This time fix multi-part substring searches.
2007-10-10 13:39:27 -05:00
Andrew Tridgell
71c06778d4 r10755: fixed the construction of expressions from subtrees for SUBSTRING searches 2007-10-10 13:39:26 -05:00
Andrew Tridgell
7e44f9153c r10753: don't require every ldb module to implement both a search_bytree() and
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
2007-10-10 13:39:26 -05:00
Andrew Tridgell
63ebaad393 r10708: a bit more error checking in the idap ldb backend 2007-10-10 13:39:22 -05:00
Andrew Tridgell
26ff538578 r10667: cope with a NULL tree for base searches in ldb_search() 2007-10-10 13:39:16 -05:00
Andrew Tridgell
af24f3d7fa r10666: - reverse the ildap ldb backend so tree based searches go through
directly, and expression based searches are converted to trees. This
makes for less conversions.

- allow the caller to supply a set of credentials via the ldb opaque
name 'credentials'. I will be using this in my ldb proxy module.
2007-10-10 13:39:16 -05:00
Andrew Tridgell
0d4a900ce5 r10665: fixed some crash errors and an error encoding AND and OR operations in the expression parsing code 2007-10-10 13:39:15 -05:00
Andrew Tridgell
e80d42933f r10641: fixed the error handling on search errors in the ildap backend 2007-10-10 13:39:14 -05:00
Andrew Tridgell
8e7c4c98a7 r10603: neaten up the ldb module initialisation code 2007-10-10 13:39:11 -05:00
Jelmer Vernooij
b53313dc51 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
2007-10-10 13:39:08 -05:00
Andrew Tridgell
d4af4b11ae r10525: change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the
type is always available, which means we need less #ifdefs
2007-10-10 13:39:01 -05:00
Tim Potter
b78cf1270b r10500: More progress to getting ldb tools building. Create a list of ldb modules
to link in.  There's still a whole lot of random other junk (dcerpc, gensec,
ndr stuff, lp_foo - what a mess).
2007-10-10 13:38:57 -05:00
Andrew Tridgell
9456ed3db3 r10485: run autoheader before autoconf 2007-10-10 13:38:53 -05:00
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
Andrew Tridgell
d267f8c623 r10423: minor changes to the ldb test suite to allow it to work correctly with
a real ldap backend (such as openldap)
2007-10-10 13:38:44 -05:00
Andrew Tridgell
ddff66298f r10422: ldb_search() can now use tdb_traverse_read() to ensure it can run in
parallel with any transaction
2007-10-10 13:38:44 -05:00
Simo Sorce
3335250759 r10419: Remove unused prototypes of locking functions (thanks Jelmer)
omment about transactions
2007-10-10 13:38:43 -05:00
Tim Potter
5f530eacba 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.
2007-10-10 13:38:43 -05:00
Andrew Tridgell
1b8d368a67 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
2007-10-10 13:38:42 -05:00
Andrew Tridgell
dba41164e0 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
2007-10-10 13:38:41 -05:00
Andrew Tridgell
06bd8abba9 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.
2007-10-10 13:38:41 -05:00
Andrew Tridgell
740b9f7537 r10403: fixed the basedn for testing, and add a debug showing the size of the test in ldbtest 2007-10-10 13:38:40 -05:00
Tim Potter
54882f88ca r10379: Add files for ldb and tdb to proto_files. The tool for building proto.h
is busted though.
2007-10-10 13:38:34 -05:00