1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-16 20:23:50 +03:00
Commit Graph

457 Commits

Author SHA1 Message Date
Simo Sorce
22c8c97e6f r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
2007-10-10 13:45:53 -05:00
Andrew Bartlett
84e16e4ea7 r11522: Add support for delegated credentials and machine account credentials
to ldb, based on the sessionInfo we now pass around.

Andrew Bartlett
2007-10-10 13:45:48 -05:00
Andrew Bartlett
4143c22e30 r11512: fix typo 2007-10-10 13:45:46 -05:00
Andrew Tridgell
ddbca6e832 r11459: display a schemaIDGUID as a guid in ldif, making it easier to work
with schemas in ldbedit
2007-10-10 13:45:39 -05:00
Andrew Tridgell
c192bcb79d r11403: improved the error handling in the ildap ldb backend. Now passes
through all ldap errors except on search. Search errors are only
available via ldb_errstring() until we decide how to fix ldb_search().
2007-10-10 13:45:31 -05:00
Jelmer Vernooij
875eb8f4cc r11382: Require number of required M4 macros
Make MODULE handling a bit more like BINARY, LIBRARY and SUBSYSTEM
Add some more PUBLIC_HEADERS
2007-10-10 13:45:29 -05:00
Volker Lendecke
55b5b100e9 r11378: Fix an uninitialized variable warning. Tridge, I'm 99.999% sure this was a
simple cut&paste error, but you might recheck this.

Volker
2007-10-10 13:45:29 -05:00
Andrew Tridgell
b41b374b55 r11364: added a ldb_attr_dn() function for testing if an attribute name is
"dn" or "distinguishedName". This makes us a bit more consistent
2007-10-10 13:45:26 -05:00
Andrew Tridgell
896704f5c1 r11353: a bit of an improvement to the ldb_tdb error handling 2007-10-10 13:45:23 -05:00
Jelmer Vernooij
90f49b6f70 r11304: Add support back in for loading shared modules (not used yet) 2007-10-10 13:45:16 -05:00
Jelmer Vernooij
b4745032a2 r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
2007-10-10 13:45:16 -05:00
Jelmer Vernooij
98d1f9b1dc r11300: Treat libraries as a special kind of subsystem
(one that can also be built as a library and installed).
2007-10-10 13:45:15 -05:00
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Jelmer Vernooij
7fffc5c917 r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html) 2007-10-10 13:45:03 -05:00
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