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

2411 Commits

Author SHA1 Message Date
Jelmer Vernooij
5792fa90ac s4-python: Only set BASETYPE flag if subclassing is supported.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 03:39:58 CET 2011 on sn-devel-104
2011-01-01 03:39:58 +01:00
Jelmer Vernooij
f5fe9c32ef s4-python: Add more prototypes. 2011-01-01 02:54:05 +01:00
Jelmer Vernooij
4350e0c3c9 s4-python: Properly call PyObject_Del from all destructors. 2011-01-01 02:54:05 +01:00
Stefan Metzmacher
3321d87327 s4:ldb: setup TEST_DATA_PREFIX for make test
metze
2010-12-27 15:37:58 +01:00
Stefan Metzmacher
fd4436abfe s4:ldb:python/api: use filename() instead of hardcoded filenames
metze
2010-12-27 15:37:58 +01:00
Stefan Metzmacher
aaa16b8224 s4:ldb/tests: there's no need to copy samba4.png
metze
2010-12-27 15:37:57 +01:00
Stefan Metzmacher
f34e7978c2 s4:ldb:python/api: use only one ldb file in test_contains()
metze
2010-12-24 17:31:06 +01:00
Stefan Metzmacher
628c66a15c s4:ldb:python/api: use filename() instead of hardcoded filenames
This makes sure we use files under $SELFTEST_PREFIX instead of
the source directory.

metze
2010-12-24 17:31:06 +01:00
Matthias Dieter Wallnöfer
4ef842c0d2 ldb:pyldb.c - remove unused variable 2010-12-22 12:21:16 +01:00
Jelmer Vernooij
41c3bda527 ldb: Add ldb.Message.add and ldb.Message.elements.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Dec 21 15:03:17 CET 2010 on sn-devel-104
2010-12-21 15:03:17 +01:00
Matthias Dieter Wallnöfer
17d6583dbf ldb:tools/ldbdel.c - "replace.h" should be the first include
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Dec 21 12:50:54 CET 2010 on sn-devel-104
2010-12-21 12:50:54 +01:00
Jelmer Vernooij
fcecca76a5 ldb: Bump version after renaming some public symbols which didn't have a
ldb_ prefix.
2010-12-19 21:44:06 +01:00
Andrew Bartlett
656c828b9f lib/ldb Remove talloc_free() that causes double-free in callbacks.
This partially reverts 0941099a, which was a little over-eager in
fixing what were presumed to be memory leaks.

It is always the callbacks responsiblity to free the ares, but if they
don't then the end of the request should handle the cleanup.
Attempting to talloc_free() here will result (as it did in the
descriptor module) in a double-free error if the callback does free
it, and no other caller of ldb_module_send_entry() has this behaviour.

Andrew Bartlett
2010-12-18 01:34:18 +01:00
Jelmer Vernooij
6967cf27eb ldb: Rename controls_except_specified -> ldb_controls_except_specified.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 18 01:33:24 CET 2010 on sn-devel-104
2010-12-18 01:33:24 +01:00
Jelmer Vernooij
e338bbd450 ldb_map: Fix prefix for map functions. 2010-12-18 00:47:06 +01:00
Jelmer Vernooij
6b5a0cf630 ldb: Add prototype for ldb_init_module. 2010-12-18 00:47:06 +01:00
Jelmer Vernooij
fff18e0cc3 ldb: Rename two exported functions so they match abi_match. 2010-12-18 00:47:06 +01:00
Jelmer Vernooij
4a2d396971 ldb: Bump API after symbol changes.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Dec 15 18:18:52 CET 2010 on sn-devel-104
2010-12-15 18:18:52 +01:00
Jelmer Vernooij
a1eadc5fb4 ldb: Build modules as .so files. 2010-12-15 16:47:46 +01:00
Matthieu Patou
ea510ae16c build: openbsd plateform is openbsd4
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Dec 15 10:55:08 CET 2010 on sn-devel-104
2010-12-15 10:55:08 +01:00
Matthieu Patou
8c90287198 build do not add -no-undefined on openbsd 2010-12-14 15:58:11 +03:00
Matthias Dieter Wallnöfer
e4b22702b6 ldb:pyldb.h - revert to the previous header behaviour
"ldb_private.h" is private and therefore might not always be available.
2010-12-12 22:55:14 +01:00
Matthias Dieter Wallnöfer
b56a6f2eda ldb:pyldb - optimise includes 2010-12-12 20:06:24 +01:00
Andrew Tridgell
57f2f1d72a waf: remove the restriction that private libraries must not have a vnum
we need the vnum for ABI checking for public libraries built as
private libraries when bundled

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  9 12:47:41 CET 2010 on sn-devel-104
2010-12-09 12:47:40 +01:00
Andrew Tridgell
ebe2867fc2 waf-abi: auto-generate per-symbol versions from ABI files
This changes our version-script generation to use the ABI files that
are saved in git with each version number change of our public
libraries.

We use these ABI files to generate a linker version script that gives
the exact version number that each symbol was introduced. This
provides us with automatic fine grained symbol versioning.

Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-09 13:17:19 +11:00
Stefan Metzmacher
cfef64a5b0 s4:ldb: add ABI/ldb-0.9.20.sigs
metze
2010-12-08 19:07:16 +01:00
Stefan Metzmacher
65965566d2 s4:ldb: build libldb and pyldb-util as private libraries when building for samba4
This matches the behavior of the talloc and tdb builds.

metze
2010-12-08 19:07:15 +01:00
Jelmer Vernooij
623c93c8ba ldb: bump version number after introduction of new constant. 2010-12-08 13:32:18 +01:00
Nadezhda Ivanova
f85089e015 s4-acl: Fixed incorrect value of LDB_FLAG_INTERNAL_INACCESSIBLE_ATTRIBUTE
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Dec  8 13:31:48 CET 2010 on sn-devel-104
2010-12-08 13:31:48 +01:00
Andrew Tridgell
735c1cd2da s4-pkgconfig: add @LIB_RPATH@ to our link flags
this is only set when rpath is used on install. It ensures that
applications that link against Samba libraries get the rpath right

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec  8 12:46:00 CET 2010 on sn-devel-104
2010-12-08 12:46:00 +01:00
Andrew Tridgell
af1b098441 s4-ldb: added @LIB_RPATH@ to the ldb pc file 2010-12-08 12:01:25 +01:00
Nadezhda Ivanova
fe98b9aaeb s4-acl: Added a flag to mark an element as failing an access check. 2010-12-08 12:14:23 +02:00
Andrew Tridgell
cba73975c2 s4-ldb: use RTLD_DEEPBIND if available for ldb modules
this allows us to avoid issues with ldb using heimdal while an
application using ldb using MIT kerberos

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-08 05:26:05 +01:00
Matthias Dieter Wallnöfer
93d85ca5fd s4:fix some shadowed declaration warnings on Solaris by renaming the symbols 2010-12-06 11:28:58 +01:00
Björn Jacke
a42c731a4b s4/ldb: fix shell syntax error in test script 2010-12-02 10:36:06 +01:00
Matthias Dieter Wallnöfer
9733d71199 ldb:ldb_msg_add_value - fix here a wrong memory context
A value array allocation should belong to "msg->elements" not "msg" directly
2010-12-01 16:30:08 +01:00
Matthieu Patou
e8ae340421 ldb-tdb: Add more information about full scan 2010-11-26 23:46:06 +03:00
Jelmer Vernooij
df70a4a3b7 pyldb: Fix broken test.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Nov 23 23:20:38 CET 2010 on sn-devel-104
2010-11-23 23:20:38 +01:00
Andrew Tridgell
3a8b67d06c s4-ldb: added an environment varibale LDB_WARN_UNINDEXED
when LDB_WARN_UNINDEXED is set, we produce warnings about unindexed
searches. This makes it easier to find performance problems caused by
unindexed searches.
2010-11-23 22:14:58 +11:00
Arnaud Faucher
2ac5cedb71 Avoid the use of PyAPI_DATA, which is for internal Python API's.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104
2010-11-22 00:52:56 +01:00
Andrew Tridgell
9e2f39484c s4-ldb: fixed the build with a space in the ldb modules directory name
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Nov 21 13:57:14 CET 2010 on sn-devel-104
2010-11-21 13:57:14 +01:00
Matthias Dieter Wallnöfer
8585de8881 ldb:rdn_name LDB module - add more RDN name constraints
And some small cleanups

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov 20 00:06:35 CET 2010 on sn-devel-104
2010-11-20 00:06:35 +01:00
Matthias Dieter Wallnöfer
bb679a4da3 ldb:ldb_rename on ldap backends - handle the case when the RDN value is empty
Otherwise we get "<RDN name>=(null),..."
2010-11-19 23:03:49 +01:00
Kamen Mazdrashki
ab379ddd51 s4-ldb.python: Use $SELFTEST_PREFIX/tmp as a temporary directory for testing
This way we won't flood /tmp directory with temp files

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Thu Nov 18 23:11:18 CET 2010 on sn-devel-104
2010-11-18 23:11:18 +01:00
Kamen Mazdrashki
05c0bface1 s4-ldb.python: add test for ldb.Message.from_dict() method 2010-11-18 22:28:08 +01:00
Kamen Mazdrashki
a403d7777e s4-pyldb: ldb.Message.from_dict class method to create LdbMessage object from dictionary 2010-11-18 22:28:08 +01:00
Kamen Mazdrashki
a09a41f300 s4-pyldb: Move code to create a ldb_message from a Python Dictionary object into a separate function 2010-11-18 22:28:08 +01:00
Kamen Mazdrashki
b4809e4a82 s4-pyldb_util: Move ldb Type searching into separate function 2010-11-18 22:28:07 +01:00
Kamen Mazdrashki
88e4601900 s4-pyldb: Few miss-alignments aligned 2010-11-18 22:28:07 +01:00
Kamen Mazdrashki
72fcfedd89 s4-pyldb: Move PyLdbMessage_FromMessage() in PyMessage group of functions 2010-11-18 22:28:07 +01:00
Kamen Mazdrashki
d42ea3263a s4-pyldb: Fix wrong type of 'self' parameter 2010-11-18 22:28:07 +01:00
Matthias Dieter Wallnöfer
fa1e8663bc Revert "s4:api.py - DN tests - test a bit more special DNs and merge the comparison tests"
This reverts commit 732ef9353d.
Jelmer doesn't like to have these tests there.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Nov 18 17:46:38 UTC 2010 on sn-devel-104
2010-11-18 17:46:38 +00:00
Simo Sorce
0b3180bbf5 ldb: error out when modules are not found
We shouldn't proceed without all required modules, it could cause damage to the
ldb if operations are performed w/o the needed modules.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Nov 18 14:02:34 UTC 2010 on sn-devel-104
2010-11-18 14:02:34 +00:00
Matthias Dieter Wallnöfer
56512fb1da ldb:skel.c - don't introduce trailing whitespaces by a module template
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Nov 18 12:08:30 UTC 2010 on sn-devel-104
2010-11-18 12:08:30 +00:00
Matthias Dieter Wallnöfer
732ef9353d s4:api.py - DN tests - test a bit more special DNs and merge the comparison tests 2010-11-18 10:31:42 +01:00
Matthias Dieter Wallnöfer
ca7979e1a3 ldb:ldb_dn_explode - point out that on error cases "data" is implicitly free'd 2010-11-18 09:02:21 +01:00
Matthias Dieter Wallnöfer
3e055cc830 ldb:ldb_dn.c - ldb_dn_explode - free also the extended components on error cases
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov 17 08:45:53 UTC 2010 on sn-devel-104
2010-11-17 08:45:53 +00:00
Jelmer Vernooij
6e762f9003 Re-enable ldb-cmdline for the moment, as it is used by oLschema2ldif. 2010-11-14 17:14:05 +00:00
Jelmer Vernooij
d2dfa868fd Don't build ldb tools when there is a system provided ldb. 2010-11-14 17:14:05 +00:00
Matthias Dieter Wallnöfer
f0367905d9 ldb:ldb_ldap.c rename operation - check for the RDN name and value
Make it more similar to "ldb_ildap.c" and also more save
2010-11-11 10:03:41 +01:00
Matthias Dieter Wallnöfer
feb00fe7cc s4:dsdb - proof against empty RDN values where expected
This should prevent crashes as pointed out on the mailing list.
2010-11-11 10:03:40 +01:00
Kamen Mazdrashki
7e3419f32f s4-pyldb: Handle internal errors in py_ldb_contains() properly
It is an exceptional condition for ldb_search() to return
more than one results during SCOPE_BASE search on DN

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Wed Nov 10 09:02:00 UTC 2010 on sn-devel-104
2010-11-10 09:02:00 +00:00
Matthias Dieter Wallnöfer
422233c563 s4:pyldb.c - fix "py_ldb_contains" according to the comment by Jelmer 2010-11-08 15:24:41 +01:00
Matthias Dieter Wallnöfer
9aa0ed2c3a ldb:pyldb.c - "py_ldb_msg_element_get" - here we can safely use "unsigned int" for the element reference
We don't make use of "Py_List*" calls

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Nov  8 11:21:27 UTC 2010 on sn-devel-104
2010-11-08 11:21:27 +00:00
Matthias Dieter Wallnöfer
ef4861d926 ldb:pyldb.c - "py_ldb_contains" - return only "0" not found, "1" found, "-1" error 2010-11-08 10:39:05 +00:00
Matthias Dieter Wallnöfer
7bdbfc9603 ldb:pyldb.c - most of the times "time_t" is defined as "long int"
Therefore use a signed long int for conversions.

http://stackoverflow.com/questions/471248/what-is-ultimately-a-time-t-typedef-to
2010-11-08 10:39:05 +00:00
Matthias Dieter Wallnöfer
9e5ca72afb ldb:pyldb.c - fix some "Py_ssize_t" output warnings 2010-11-08 10:39:05 +00:00
Matthias Dieter Wallnöfer
f6572e5ffc ldb:pyldb.c - use "Py_ssize_t" for counting list entries
This seems to be the most appopriate type
2010-11-08 10:39:05 +00:00
Matthias Dieter Wallnöfer
084c11d600 ldb:pyldb.c - fix indentation 2010-11-08 10:39:05 +00:00
Andrew Tridgell
7bd5d40208 s4-ldb: don't give an error if a module is already registered
this can happen when both the build and install paths are used to load
ldb modules

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  8 05:28:14 UTC 2010 on sn-devel-104
2010-11-08 05:28:14 +00:00
Andrew Tridgell
d738a0448d s4-ldb: better error message when we try to register a module twice
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-08 11:13:28 +11:00
Matthias Dieter Wallnöfer
d6d5f80348 ldb:ldb_pack.c - the "dn" attribute isn't allowed in the message part, only the "distinguishedName" one
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 10:11:02 UTC 2010 on sn-devel-104
2010-11-07 10:11:02 +00:00
Matthias Dieter Wallnöfer
3d443b3797 ldb:ldb_parse.c - "ldb_parse_hex2char" - always initialise "c"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov  6 21:04:58 UTC 2010 on sn-devel-104
2010-11-06 21:04:57 +00:00
Matthias Dieter Wallnöfer
1688b71ca4 ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation 2010-11-06 20:24:19 +01:00
Matthias Dieter Wallnöfer
889fa1cac5 ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"
And remove in "ltdb_add_internal" a cache loading call which has been present
twice.
2010-11-06 20:24:19 +01:00
Andrew Tridgell
eaabb5950f s4-ldb: much more memory efficient msg filtering
this ensures we don't leave unnecessary attributes in returned ldb
objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-05 23:42:09 +11:00
Andrew Tridgell
0a2642c7dc s4-ldb: show the reason for module initialization failure 2010-11-05 23:42:08 +11:00
Matthias Dieter Wallnöfer
90b3bf8f62 ldb:ldb.h - reorder extended operations list
We always define the controls and operations with a comment block. The data
structure definitions lie a bit below.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Nov  5 08:44:14 UTC 2010 on sn-devel-104
2010-11-05 08:44:14 +00:00
Kamen Mazdrashki
78b05a3116 s4-ldb_module.h: use LDB error code for ldb_error() macro rather than LDB_DEBUG_FATAL
We end up calling ldb_error_at() which expects an LDB error,
but LDB_DEBUG_FATAL is not such code. It is actually equal to LDB_SUCCESS.

Thus the effect is that we report a *fatal* error, but return
LDB_SUCCESS in many places.

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Thu Nov  4 12:57:33 UTC 2010 on sn-devel-104
2010-11-04 12:57:33 +00:00
Andrew Tridgell
e606298631 s4-ldb: implement LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK
this disables the single value checking for one attribute. It is much
more specific than a general RELAX control, and also more efficient. I
think we should try to have more precise overrides like this, rather
than using RELAX as a general purpose override
2010-11-04 20:35:44 +11:00
Andrew Tridgell
1ab7bd1bfb s4-ldb: don't load modules from the same directory twice
this prevents samba dying if you do a 'make install' while it is
running. Otherwise the make install changes the inode numbers of the
modules in the modules directory, causing them to reload, which causes
multiple modules of the same name to try and load
2010-11-04 20:35:44 +11:00
Andrew Tridgell
6a22d8938c s4-ldb: honor controls on search in ldbedit 2010-11-04 20:35:44 +11:00
Andrew Tridgell
cf37c29cd0 Move the checking of single valued attributes back into the tdb backend.
The backend is the only place that can do this properly. It makes no
sense to do it anywhere else. As a result of it moving out of the
backend we ended up with some bugs causing multiple values in single
valued attributes (eg. isDeleted), which can really damage the
inregrity of the database.

For the override of single valued values needed for deleted linked
attributes we should use attribute flags.

This reverts commit 1949864417.
2010-11-04 20:35:44 +11:00
Andrew Tridgell
14718a725b build: a more portable way of finding waf in makefiles
this avoids using the non-portable shell command in makefiles

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 22:44:59 UTC 2010 on sn-devel-104
2010-11-03 22:44:59 +00:00
Andrew Tridgell
6614f847e0 s4-ldb: fixed sorting of module names
this should also fix a valgrind error on freebsd

thanks to Matthieu for spotting this
2010-11-03 20:39:53 +11:00
Andrew Tridgell
c1cc1568b8 s4-ldb: make ldbtest depend on ldb 2010-11-03 01:34:04 +00:00
Andrew Tridgell
f0a472a2d6 waf: added reconfigure targets to our libraries
This allows you to do "make reconfigure" to re-run configure only if
needed
2010-11-03 01:34:04 +00:00
Andrew Tridgell
b3fb311173 s4-ldb: give the user a hint as to what may be wrong
when a backend or module can't be found, give a hint about
the LDB_MODULES_PATH environment variable

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov  2 21:28:22 UTC 2010 on sn-devel-104
2010-11-02 21:28:22 +00:00
Andrew Tridgell
8a2142773f s4-ldb: expose some more ldb module functions
this exposes enough functions for s4 to not need ldb_private.h any
more.
2010-11-03 07:43:57 +11:00
Andrew Tridgell
7e23363455 s4-ldb: removed ldb_includes.h
it causes problems with the openchange build as it is not installed

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 21:49:47 UTC 2010 on sn-devel-104
2010-11-01 21:49:47 +00:00
Andrew Tridgell
9b0f8a8e5f s4-ldb: use ldb_set_modules_dir() to load additional ldb modules
this allows ldb_wrap to enable s4 modules in a standalone ldb install
without any additional installation

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 13:47:33 UTC 2010 on sn-devel-104
2010-11-01 13:47:33 +00:00
Andrew Tridgell
a386ca8559 s4-ldb: enable ldb module version checking 2010-11-01 13:05:04 +00:00
Andrew Tridgell
8366bb495a s4-ldb: added support for ldb module version checking 2010-11-01 13:05:04 +00:00
Matthias Dieter Wallnöfer
c8bcf82119 ldb:tools/ldbtest.c - fix build warning
Cause was an incomplete declaration.
2010-11-01 11:31:32 +01:00
Andrew Tridgell
e59a8a563b s4-ldb: fixed build of paged searches
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 09:41:27 UTC 2010 on sn-devel-104
2010-11-01 09:41:27 +00:00
Andrew Tridgell
6f2c4abadd s4-ldb: convert existing ldb tools to use new command line hooks
the usage() function needs to take a ldb context, as the popt_options
is specific to the ldb context

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:20 +11:00
Andrew Tridgell
f924a022cb s4-ldb: added ldb command line hook support
ldb modules can now add hooks to the command line processing for ldb
tools

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:20 +11:00
Andrew Tridgell
cdf19ec5e2 s4-ldb: moved the ldb_ildap backend into lib/ldb-samba
this backend is samba4 specific
2010-11-01 18:55:20 +11:00
Andrew Tridgell
d103f2d346 s4-ldb: added support for general ldb hooks in modules
this allows a ldb module to register a hook function called at various
stages of processing. It will be initially used for ldb command line
hooks, but should work generally.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:19 +11:00
Andrew Tridgell
c74601e0b3 s4-ldb: added an override flag to ldb_register_backend()
this will be used to allow a system ldb build with an ldb backend to
have its ldap handler overridden by the s4 one
2010-11-01 18:55:19 +11:00
Andrew Tridgell
05b37385fc s4-ldb: it is not an error for the modules directory to not exist 2010-11-01 18:55:19 +11:00
Andrew Tridgell
43f7c9ca26 s4-test: we don't need to set LDB_MODULES_PATH any more 2010-11-01 18:55:19 +11:00
Andrew Tridgell
6db57658a9 s4-ldb: removed the old ldb module loading style
this gets rid of some particularly obscure cpp macros for module lists
2010-11-01 18:55:19 +11:00
Andrew Tridgell
be8e91d9ca s4-ldb: convert the rest of the ldb modules to the new style 2010-11-01 18:55:19 +11:00
Andrew Tridgell
e8f0e3aca9 s4-ldb: convert the openldap ldb backend to the new style of module 2010-11-01 18:55:19 +11:00
Andrew Tridgell
efdcedb6b1 s4-ldb: convert the ildap module to the new type of ldb module
this gets rid of the module aliases, which caused issues on some
systems (eg. gentoo).
2010-11-01 18:55:18 +11:00
Andrew Tridgell
8b63ff52e2 s4-ldb: support a new type of ldb module loading
this supports module loading in ldb which uses the approach of "load
all modules in a directory". This is much more flexible than the
current module loading, as it will allow us to load modules for
command line parsing and authentication.

Modules are loaded from a colon separated path, in the environment
variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR.

Within each directory modules are loaded recursively (traversing down
the directory tree). The device/inode number of each module is
remembered to prevent us loading a module twice.

Each module is checked for a ldb_init_module() function with
dlsym(). If found, it is called with the ldb module version as an
argument.
2010-11-01 18:55:18 +11:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Jelmer Vernooij
7fc0aaba4b ldb: Drop autoconf-based build system. 2010-10-30 17:50:35 +02:00
Andrew Tridgell
2ea41fdbe2 s4-cmdline: make cmdline-credentials a private library 2010-10-30 23:49:01 +11:00
Andrew Tridgell
306754f294 s4-ldb: add explicit depenencies on ldb library in ldb modules
ldb modules call module functions from the main ldb library

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-30 23:49:01 +11:00
Andrew Tridgell
0d45d97540 s4-ldb: create a private library ldb-cmdline
this prevents duplicate linking of the cmdline support code
2010-10-30 23:48:59 +11:00
Jelmer Vernooij
50256c01d0 waf: Only specify vnum for non-private libraries. 2010-10-26 10:17:18 -07:00
Jelmer Vernooij
a74e8be6d1 waf: Stop automaticaly changing dashes to underscores in library names. 2010-10-26 10:17:18 -07:00
Andrew Tridgell
db73b4a2c1 waf: moved the -Wl,-no-undefined flags to source4 and ldb
moved it out of the general waf build as the s3 waf build cannot yet
handle linking with -Wl,-no-undefined

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Oct 25 01:12:15 UTC 2010 on sn-devel-104
2010-10-25 01:12:15 +00:00
Jelmer Vernooij
92c12a39a9 ldb: Rename pyldb pkg-config file to pyldb-util, to avoid confusion with
'ldb' python module.
2010-10-24 00:20:04 +00:00
Jelmer Vernooij
5224de3f74 s4: Rename LIBCLI_LDAP to libcli_ldap. 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
49ef288819 waf: Rename some BUNDLED_ functios to PRIVATE_. 2010-10-23 22:24:06 +00:00
Jelmer Vernooij
c25afb6aa1 ldb: Support using system pyldb library.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct 23 19:24:25 UTC 2010 on sn-devel-104
2010-10-23 19:24:25 +00:00
Jelmer Vernooij
9a2f83a86a ldb: Install pkg-config file for pyldb. 2010-10-23 18:42:04 +00:00
Jelmer Vernooij
bd48e23f34 ldb: Install pyldb-util as public library. 2010-10-23 18:42:04 +00:00
Matthias Dieter Wallnöfer
c7d7c8f6f8 ldb:ldb.h - include a comment that the relax control is mainly used by the OpenLDAP backend
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 23 16:40:04 UTC 2010 on sn-devel-104
2010-10-23 16:40:04 +00:00
Matthias Dieter Wallnöfer
f9a6ff482c s4/ldb:introduce the LDB_CONTROL_PROVISION_OID control
This control is exactly thought for the actions which previously were performed
using the RELAX one.

We agreed that the RELAX control will only remain for interactions with OpenLDAP.
2010-10-23 16:37:29 +02:00
Matthias Dieter Wallnöfer
89c42a96fc ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into LDB_CONTROL_BYPASS_OPERATIONAL_OID
It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
2010-10-23 16:37:29 +02:00
Matthias Dieter Wallnöfer
3c748714bb ldb:ldb_modules.c - "dlclose" could cause inference on "dlerror"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Oct 21 09:28:19 UTC 2010 on sn-devel-104
2010-10-21 09:28:19 +00:00
Andrew Tridgell
19f8dc9580 s4-ldb: make ldb_options_find() public
we need to make this symbol public to allow for -Wl,-no-undefined, as
otherwise the pyldb module can't find the symbol when it creates the
module
2010-10-21 19:03:27 +11:00
Andrew Tridgell
bbe016b77c s4-ldb: make pyldb_util a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11:00
Andrew Tridgell
7cba3cfac8 waf: replace the is_bundled option with private_library
'private_library' better captures what we are trying to get at when we
bundle a library
2010-10-21 19:03:24 +11:00
Matthias Dieter Wallnöfer
8044a20d8d ldb:ldb_modules.c - if we don't find the associated dynamic object then please close the handle
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Oct 21 07:52:44 UTC 2010 on sn-devel-104
2010-10-21 07:52:43 +00:00
Matthias Dieter Wallnöfer
0b8b9aed34 ldb:ldb_tdb/ldb_cache.c - remove a superflous "talloc_free"
Didn't realise that this is already called by "ltdb_attributes_unload".
2010-10-21 09:09:04 +02:00
Matthias Dieter Wallnöfer
de9b737233 ldb:ldb_tdb/ldb_cache.c - in this function we don't use LDB return codes 2010-10-21 08:59:59 +02:00
Matthias Dieter Wallnöfer
0941099a28 ldb:ldb_index.c - fix some memory leaks
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Oct 20 13:11:49 UTC 2010 on sn-devel-104
2010-10-20 13:11:49 +00:00
Matthias Dieter Wallnöfer
3bf8ca6790 ldb:ldb_index.c - let "ldb_module_oom" generate the return code 2010-10-20 12:31:05 +00:00
Matthias Dieter Wallnöfer
ec43a4d29e ldb:ldb_cache.c - fix memory contexts and memory leaks 2010-10-20 12:31:05 +00:00
Matthias Dieter Wallnöfer
06053a09cb ldb:ldb_tdb submodule - use "ldb_msg_new" where appropriate
It is saver than a manual "talloc".
2010-10-20 12:31:05 +00:00
Matthias Dieter Wallnöfer
1427895531 ldb:ldb_pack.c - remove superflous "message->elements = NULL"
It's already marked at this at the beginning of the call.
2010-10-20 12:31:05 +00:00
Matthias Dieter Wallnöfer
d652803c12 ldb:"ldb_schema_attribute_by_name_internal" - support the whole unsigned int range
Commit 8556602b04 wasn't quite right - it only
restored the functionality on the positive integer range.

This one however should now really support the whole unsigned range.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Oct 19 10:52:08 UTC 2010 on sn-devel-104
2010-10-19 10:52:08 +00:00
Andrew Tridgell
f6a9708b54 s4-ldb: increase minor version for 2 new functions
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 19 01:27:44 UTC 2010 on sn-devel-104
2010-10-19 01:27:44 +00:00
Andrew Tridgell
d16fe72585 s4-ldb: cope with NULL oid in controls
the ldap server will mark a control with a NULL oid in order to remove
it. This prevents a O(n^2) cost in control handling.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19 11:22:35 +11:00
Andrew Tridgell
5f6c004dec s4-ldb: added --relax cmdline option
this adds the relax control
2010-10-19 11:22:35 +11:00
Andrew Tridgell
ff456cd100 s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()
these will be used to determine if a ldb request comes from an
untrusted source. We want requests over ldap:// to be marked untrusted
so we can reject unregistered controls

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19 11:22:35 +11:00
Matthias Dieter Wallnöfer
dcbfcbbceb ldb: always return PROTOCOL_ERROR if an operation is unsupported
That's exactly the behaviour of various LDAP servers.
2010-10-18 19:51:19 +00:00
Matthias Dieter Wallnöfer
8556602b04 ldb:"ldb_schema_attribute_by_name_internal" - switch back to 32bit counters
Use the signed counter for the binary search but use an unsigned one for
accessing the entry.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 18 19:01:31 UTC 2010 on sn-devel-104
2010-10-18 19:01:31 +00:00
Matthias Dieter Wallnöfer
48cd89e25d ldb:ldb_tdb.c - fix up counter variables
"find_element" returns an "int" since there is also the possibility that a
certain element doesn't exist - then "-1" is returned. But beside this
exception treat all other return values as unsigned.
2010-10-18 20:14:56 +02:00
Matthias Dieter Wallnöfer
94a445869c ldb:ldb_tdb.c - improve the error outputs
- Fix indentation
- Include always the failing DN
- Reorder the outputs to make them consistent
2010-10-18 20:10:14 +02:00
Andrew Bartlett
034832ccd5 s4-ldb Add LDB_REQ_SET_LOCATION to help track handler use
This greatly assists in debugging what is going on with the
ldb handle, as it indicates where it was created.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Oct 18 11:54:46 UTC 2010 on sn-devel-104
2010-10-18 11:54:46 +00:00
Andrew Bartlett
48c54f9ec8 ldb Ensure we mark ongoing LDAP requests as PENDING 2010-10-18 11:13:04 +00:00
Andrew Bartlett
dab426476f Revert "s4:dsdb - make the RELAX control private"
This must be available to the OpenLDAP backend, to set the GUID values
in some situations.  We need a proper ACL mechanism to control the use
or abuse of this control.

This reverts commit 10adee8936.
2010-10-18 00:16:17 +00:00
Matthias Dieter Wallnöfer
10adee8936 s4:dsdb - make the RELAX control private
This makes our LDAP much more secure and less error-prone.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 19:43:36 UTC 2010 on sn-devel-104
2010-10-16 19:43:36 +00:00
Matthias Dieter Wallnöfer
c4739f7be8 ldb:ldb.h - reorder controls/extended operations
This makes it easier to read
2010-10-16 20:45:08 +02:00