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

5848 Commits

Author SHA1 Message Date
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Tridgell
8220a7ebae ldb: added ldb 1.0.0 ABI signatures 2011-02-10 06:51:06 +01:00
Andrew Tridgell
2a6f345723 ldb: change version number to 1.0.0
Simo pointed out that the module loading change should have been
combined with a major version number. That seems like a good excuse
for a 1.0 release

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:06 +01:00
Andrew Tridgell
8720811598 ldb: fixed two warnings in the ldb_ldap backend 2011-02-10 06:51:06 +01:00
Andrew Tridgell
7fac3258f7 ldb: added a include/ldb_version.h
this fixes a problem with the installed ldb_modules.h header, which
depended on LDB_VERSION being defined.

Thanks to Simo for noticing this!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:06 +01:00
Matthias Dieter Wallnöfer
8d80225afb ldb:tools - return LDB_ERR_OPERATIONS_ERROR on generic errors
Use "return" when located in "main" for consistency ("exit" would do the
same).

The patchset has been discussed with Jelmer Vernooij and afterwards LDB
maintainer Simo Sorce.
2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
5e06b21cc1 ldb:tools - always check if ldb connection has been estabilished
Otherwise return "LDB_ERR_OPERATIONS_ERROR".
2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
22f4030c30 ldb:ldbsearch tool - use LDB result constants where possible 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
23c0ae7452 ldb:ldbsearch tool - simplify error code return 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
ff7dff6ef0 ldb:ldbsearch tool - use "%u" for printing unsigned integers 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
475ea1ca59 ldb:ldbedit tool - don't forget about the "do_edit" result code
Use it for computing the program exit code. The "result" has not to be
free'd explicitly since it's a child by "ldb" which itself is child by
"mem_ctx".
2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
79d3532f7f ldb:ldbedit tool - fix bug #7914
"modify_record" returns "-1" when failing, otherwise the number of
modifies performed as an "unsigned int" converted to "int".
When we get "-1" we immediately need to stop (the error message has
already been generated by the function itself).
2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
b5ccf181f5 ldb:ldbedit tool - use unsigned counters for consistency with other LDB tools 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
bc675aa391 ldb:ldbedit tool - use "%u" for printing out unsigned integers 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
b2c1831337 ldb:ldbedit tool - use LDB result constants where needed 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
bd727a967d ldb:ldbrename tool - use LDB result constant where needed 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
ef0477a0b9 ldb:ldbmodify tool - use unsigned counters for consistency with other LDB tools 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
6f52070d9b ldb:ldbdel tool - use LDB result constants for consistency 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
2937e63644 ldb:ldbadd tool - use LDB return codes where possible 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
de9217beaa ldb:ldbadd tool - use "%u" for printing out unsigned integers 2011-02-09 18:59:19 +01:00
Matthias Dieter Wallnöfer
c3ca0b05e5 ldb:ldbadd tool - use LDB result constants for consistency 2011-02-09 18:59:18 +01:00
Jelmer Vernooij
d2740976cd dlinklist: Change license to LGPLv3+ (checked with tridge). 2011-02-09 13:10:09 +01:00
Günther Deschner
56fe080d87 lib/compression: add shared wscript_build.
Guenther
2011-02-08 14:05:36 +01:00
Andrew Tridgell
8b8caac6d0 build: removed the old autogen.sh and autogen-waf.sh scripts
for the builds that use waf only, these are no longer needed and just
cause confusion

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 15:03:40 +11:00
Stefan Metzmacher
93733e4e31 s4:tls_tstream: also use a dynamic buffer for the pull side
Maybe that fixes the remaining issues with some gnutls versions.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 18 17:26:08 CET 2011 on sn-devel-104
2011-01-18 17:26:08 +01:00
Stefan Metzmacher
361b4ed016 s4:tls_tstream: fix partial reads, so that the gnutls layer doesn't read the same data twice
metze
2011-01-18 16:34:28 +01:00
Andrew Bartlett
4e2e5eafb2 s4-pyldb Fix tp_basicsize for PyLdbDn
This wasn't actually causing problems before, as the structures were
the same size.

Andrew Bartlett
2011-01-18 10:55:05 +01:00
Kamen Mazdrashki
1667ff79ca s4-ldb_ldif: Take into account LDB_FLG_SHOW_BINARY
when user requires binary data to be displayed
using samba user-friendly ldif handlers

Found using following test search:
bin/ldbsearch -H st/dc/private/sam.ldb -b "CN=Deleted Objects,DC=samba,DC=example,DC=com" \
 "(objectGUID=97b52eac-6d89-434d-b935-1e5f2e086ffc)" replPropertyMetaData --show-deleted --show-binary

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Tue Jan 18 00:40:01 CET 2011 on sn-devel-104
2011-01-18 00:40:01 +01:00
Kamen Mazdrashki
fb0df534f4 s4-ldb_ldif: Don't check for LDB_FLG_SHOW_BINARY in ldb_should_b64_encode
LDB_FLG_SHOW_BINARY is data representation flag and should
not modify behavior of data checking functions.

This lead to a bug in lib/ldb/ldb_tdb/ldb_index.c as ltdb_index_key()
function relies on ldb_should_b64_encode function to determine
how to process index keys.

Found using following test search:
bin/ldbsearch -H st/dc/private/sam.ldb -b "CN=Deleted Objects,DC=samba,DC=example,DC=com" \
 "(objectGUID=97b52eac-6d89-434d-b935-1e5f2e086ffc)" replPropertyMetaData --show-deleted --show-binary
2011-01-18 00:57:05 +02:00
Andrew Tridgell
7320f1988c ldb: new ABI sigs file
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jan 17 06:09:23 CET 2011 on sn-devel-104
2011-01-17 06:09:23 +01:00
Andrew Tridgell
633c3e8da5 ldb: added ldb_req_mark_trusted()
this is used to mark a ldb child request trusted, if the caller has
validated all inputs. This will be used when creating new child
requests with trusted inputs.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-17 05:23:04 +01:00
Matthias Dieter Wallnöfer
f334cd2210 ldb: inherit parent flags on child requests in modules 2011-01-17 05:23:04 +01:00
Matthias Dieter Wallnöfer
6737231d90 ldb:ldb_dn.c - fix counter type in "ldb_dn_minimise"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 10:43:29 CET 2011 on sn-devel-104
2011-01-14 10:43:29 +01:00
Andrew Tridgell
f33ce4101e ldb: new ABI file for 0.9.23 2011-01-14 16:39:33 +11:00
Andrew Tridgell
504a3cc6b3 ldb: added ldb_dn_minimise()
this removes any extraneous components from a DN. For an extended DN,
this means removing the string DN and all but the first extended
component.

This is needed as AD returns "invalid syntax" if you don't use
a minimal DN as the base DN for a search. A non-minimal DN also
doesn't ever match in a search expression.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Tridgell
fb704d7fc1 ldb: added ldb_dn_get_extended_comp_num()
this returns the number of extended components. We need this to
validate a DN in the extended_dn_in module

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Bartlett
5322567530 pyldb Simplify python wrappers for struct ldb_val (LdbValue)
Andrew Bartlett
2011-01-14 16:39:32 +11:00
Matthias Dieter Wallnöfer
dd5367ebe9 ldb:ltdb_sequence_number - initialise "tmp_ctx" to prevent uninitialisation warning 2011-01-12 19:52:19 +01:00
Matthias Dieter Wallnöfer
ee4fd13ea3 ldb:ldbsearch.c - fix possible uninitialised variable
And add a comparison for the "ret" result - this is more standard-oriented
2011-01-12 19:52:19 +01:00
Matthias Dieter Wallnöfer
25964e775a ldb:ltdb_sequence_number - check for an OOM exception 2011-01-12 19:52:19 +01:00
Matthias Dieter Wallnöfer
b804c5396c ldb:ldb_dn_explode - remove/unify some duplicate initialisations 2011-01-12 19:52:19 +01:00
Andrew Tridgell
3ed4be0642 ldb: link to the download directory on the website 2011-01-11 16:02:27 +11:00
Andrew Tridgell
005c6370cd waf: ensure "make dist" works from a clean git tree for all libraries
this uses a temporary waf lock file to force the build directory

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Jan  8 02:35:22 CET 2011 on sn-devel-104
2011-01-08 02:35:22 +01:00
Brad Hards
ca47dedaaf s4:ldb: Make sample module implementation static.
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  3 12:28:21 CET 2011 on sn-devel-104
2011-01-03 12:28:21 +01:00
Brad Hards
d8dfdea2cc s4:ldb: Add prototype header.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-01-03 11:17:51 +01:00
Jelmer Vernooij
22b7cb3f29 pyldb: Fix memory reference error.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Jan  3 02:34:05 CET 2011 on sn-devel-104
2011-01-03 02:34:05 +01:00
Jelmer Vernooij
0346f51632 pyldb: Always return -1, 0, or 1 in tp_compare functions. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
fdb0aa2b04 Revert broken destructor changes. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
027e6b2b22 pyldb: Fix memory context, add more OOM checks. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
50a2c83908 pyldb: Some more OOM checks. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
2533a50471 Make all functions in pyldb.c private, as they can't be used anyway. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
e31224e27c pyldb: Use pytalloc-util. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
b63f9c1996 ldb: Remove duplicate definition of check_special, use PyObject_New. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
cbf504b0c5 s4-python: Properly call PyObject_Del from all destructors. 2011-01-03 01:48:04 +01:00
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
Matthias Dieter Wallnöfer
ef618f5778 s4:lib/ldb-samba/ldif_handlers.c - adaption needed for removed "const" on OIDs 2010-12-21 15:10:37 +11: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
65bcde2334 s4:lib/ldb-samba/pyldb.c - optimise includes 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
b56a6f2eda ldb:pyldb - optimise includes 2010-12-12 20:06:24 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +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
Andrew Tridgell
1b016f58ce s4-ldb: ensure ldb_register_samba_handlers() is not done twice
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
Matthias Dieter Wallnöfer
67318d18c1 s4:lib/messaging/*.h - fix compile warnings on gcc 3.4
For example on OpenSolaris
2010-12-05 20:24:18 +01:00
Stefan Metzmacher
69ad3f7f90 tls_tstream: use a dynamic buffer for the push case
Some versions of gnutls doesn't handle EAGAIN correctly,
so we better allow sending buffers without a low size limitation,
the limit is now UINT16_MAX (0xFFFF) and we allocate the buffer
with talloc each time.

metze
2010-12-04 12:12:21 +01:00
Matthieu Patou
a42ccab929 tls_tstream: increase the buffer size
The problem is that with certain version of gnutls are not working
properly if the server is sending in different packet things like (at
least)

* Certificate
* Server Key exchange
* Client certificate

Somehow it really expect this to be done in one packet as some
structures used _gnutls_send_handshake are reinitialized at every
packet exchange and intermediate steps didn't expect it

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-04 12:12:21 +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
Jelmer Vernooij
1f0cc6f081 pyregistry: Use talloc.Object. 2010-12-01 01:48:25 +01:00
Matthias Dieter Wallnöfer
6ce63655ef s4:lib/tls/tls_tstream.c - quiet warning on Solaris "cc" by casts 2010-11-29 14:48:13 +01:00
Andrew Tridgell
33d178767b s4-loadparm: use loadparm_init_global() instead of loadparm_init()
this prevents us having two lp_ctx contexts in these tools which leads
to bizarre behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-29 18:04:42 +11:00
Matthias Dieter Wallnöfer
450b26b9b5 s4:lib/registry/rpc.c - remove a duplicate assignment 2010-11-27 21:50:42 +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
Andrew Bartlett
95d33f2f24 s4-ldif_handlers Add handler for printing supplementalCredentials 2010-11-16 16:32:27 +11: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
Jelmer Vernooij
4217734a51 credentials: Lowercase library name,
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov  7 01:48:44 UTC 2010 on sn-devel-104
2010-11-07 01:48:44 +00:00
Jelmer Vernooij
e28cec7817 ldbsamba: Lowercase library name. 2010-11-07 01:57:34 +01: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
Philip M. White
cb9d048f90 s4:waf - fix the build on Gentoo platforms
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-11-03 08:22:54 +01: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
4a08b2d172 s4-dsdb: removed the use of ldb_private.h from s4
this will allow s4 to use a system version of ldb
2010-11-03 07:43:57 +11: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
fd8815335d s4-ldb: added samba_extensions ldb module
this module hooks into the ldb command line processing, to add extra
command line options and initialisation of samba4 internal subsystems
such as gensec

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
679eba61ea s4-build: removed some unnecessary dependencies
based on running waf --symbol-check
2010-10-30 23:49:01 +11:00
Andrew Tridgell
2ea41fdbe2 s4-cmdline: make cmdline-credentials a private library 2010-10-30 23:49:01 +11:00
Andrew Tridgell
eb0005dfca s4-tdb: make tdb-wrap into a private library
this prevents double linking of the tdb wrap code
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
04574d5738 s4-ldbwrap: split ldb-wrap out from the LDBSAMBA subsystem
ldb-wrap and the ldif-handlers are not really related, and this allows
us to remove another dependency loop

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
Matthieu Patou
f8d49958b2 tls: Inform the user if the cert/ca/private key can't be saved
Most of the time this problem is due to a missing <private>/tls dir.
Should close bug 7640.

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Oct 27 20:08:54 UTC 2010 on sn-devel-104
2010-10-27 20:08:54 +00:00
Jelmer Vernooij
a702c07e02 talloc: change pytalloc-util to be a public library. 2010-10-26 10:17:19 -07: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
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
d9cbcdd410 s4: Drop duplicate 'lib' prefix for private libraries. 2010-10-26 10:17:16 -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
fc6bfe24fd s4: Rename SMBPASSWD to smbpasswd.
Rename DSDB_MODULE to dsdb_module.
2010-10-24 00:20:04 +00:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
ca16d805bd s4: Rename LIBSECURITY{_SESSION,} to libsecurity{_session,} 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
cf26d8a958 s4: Rename LIBEVENTS to libevents. 2010-10-23 22:24:06 +00:00
Jelmer Vernooij
bc44fcc6fb s4: Rename NDR_TABLE to ndr_table. 2010-10-23 22:24:06 +00:00
Jelmer Vernooij
9065f9644b s4: Rename LIBNETIF to libnetif. 2010-10-23 22:24:06 +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
Kai Blin
f26c9b3966 s4 socket: increase the debuglevel to make add interface debug messages less verbose 2010-10-23 10:17:05 +00: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
6ce4125bbe s4-events: LIBEVENTS depends on LIBSAMBA-UTIL
it needs it for the debug code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
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
b4dd1accc8 s4-waf: don't depend directly on python modules
build rules should not list dependencies on python modules. Instead,
if code needs the module it should use the python API import calls to
access the module.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11:00
Andrew Tridgell
4b3fae6ca8 s4-socket: make LIBNETIF a private library 2010-10-21 19:03:25 +11:00
Andrew Tridgell
aa0dbdc5b1 s4-events: make LIBEVENTS a private library 2010-10-21 19:03:25 +11:00
Andrew Tridgell
6ba86d8ca3 s4-lib: make SMBPASSWD a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:25 +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
Matthias Dieter Wallnöfer
3ead246062 s4:"util_ldb" - remove some really unused dependancies 2010-10-18 19:35:11 +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
a3f61dea40 Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c""
This reverts commit 8a2ce5c47c.

Jelmer pointed out that these are also in use by other LDB databases - not only
SAMDB ones.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 13:37:16 UTC 2010 on sn-devel-104
2010-10-17 13:37:16 +00:00
Matthias Dieter Wallnöfer
8a2ce5c47c s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c"
They're only in use by SAMDB code.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 09:40:13 UTC 2010 on sn-devel-104
2010-10-17 09:40:13 +00:00
Matthias Dieter Wallnöfer
e1078d2de2 s4:ldb-samba/ldb_wrap.c - fix indentation and trailing whitespaces 2010-10-17 10:23:41 +02:00
Matthias Dieter Wallnöfer
be4a0d35ac s4:"wrap_casefold" - move it to "ldb_wrap.c" since it's only used there 2010-10-17 10:20:40 +02: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
Matthias Dieter Wallnöfer
dd0f22d446 ldb:pyldb.c - remove pointless comment
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 14:38:58 UTC 2010 on sn-devel-104
2010-10-16 14:38:58 +00:00
Matthias Dieter Wallnöfer
39d11a977d ldb:"ldb_dn_compare_base" - use "unsigned int" counters
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 13:54:13 UTC 2010 on sn-devel-104
2010-10-16 13:54:13 +00:00
Matthias Dieter Wallnöfer
531d7f569e ldb:"ldb_dn_add_child" - use "unsigned int" counters 2010-10-16 15:11:45 +02:00
Matthias Dieter Wallnöfer
1557acb44a ldb:"ldb_dn_remove_base_components" - use an "unsigned int" counter 2010-10-16 15:04:57 +02:00
Matthias Dieter Wallnöfer
19e94349b3 ldb:"ldb_dn_canonical" - use an "unsigned int" counter
Convert it to use an "unsigned int" counter which represents the exact length
of the DN components.
2010-10-16 14:57:52 +02:00