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

99 Commits

Author SHA1 Message Date
Andrew Bartlett
7b1fb36ad0 lib/ldb: Bump ldb release due to pyldb changes
We strictly need these changes to pass make test, and the concat change is
backwards incompatible, so we really want to use the right version.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul  9 04:34:06 CEST 2012 on sn-devel-104
2012-07-09 04:34:06 +02:00
Andrew Bartlett
979215ad59 pyldb: Add bindings for ldb_dn_remove_base_components 2012-07-06 22:55:49 +10:00
Andrew Bartlett
8d99b398d9 pyldb: Fix dn concat operation to be the other way around
This now concatonates Dn(ldb, "cn=config") + Dn(ldb, "dc=samba,dc=org") as "cn=config,dc=samba,dc=org"

Andrew Bartlett
2012-07-06 22:45:33 +10:00
Andrew Bartlett
a8acaeebb6 ldb: bump version due to header and internal implementation changes
We need this version, not the previous release, for Samba.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jul  3 17:20:32 CEST 2012 on sn-devel-104
2012-07-03 17:20:32 +02:00
Rusty Russell
f3862b9171 ccan: we're subsystems, not a library.
Don't expose a libccan.so; it would produce clashes if someone else
does the same thing.  Unfortunately, if we just change it from a
SAMBA_LIBRARY to a SAMBA_SUBSYSTEM, it doesn't create a static library
as we'd like, but links all the object files in.  This means we get
many duplicates (eg. everyone gets a copy of tally, even though only
ntdb wants it).

So, the solution is twofold:
1) Make the ccan modules separate.
2) Make the ccan modules SAMBA_SUBSYSTEMs not SAMBA_LIBRARYs so we don't
   build shared libraries which we can't share.
3) Make the places which uses ccan explicit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Fri Jun 29 06:22:44 CEST 2012 on sn-devel-104
2012-06-29 06:22:44 +02:00
Andrew Bartlett
46db466372 lib/ldb: Print trace messages for modify correctly 2012-06-27 11:29:17 +02:00
Matthieu Patou
1c850b2f17 ldb: lay foundation for proper utc/generalized time handling
We use to handle UTCtime and generalized time the same way. The thing is
that it's not the case, they are different in the way they are set (most
of the time) with different format and also stored and return in
different format too.
2012-06-22 23:22:03 -07:00
Matthieu Patou
9ebb081cce ldb: add the VERIFY_NAME control 2012-06-22 23:22:02 -07:00
Rusty Russell
df4a6e8228 ldb: use tdb directly, not tdb_compat.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:07 +02:00
Rusty Russell
6244f668a3 TDB2: make SAMBA use tdb1 again for the moment.
Otherwise the following surgery will break the SAMBA build and testsuite.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:05 +02:00
Michael Adam
ff053de096 ldb:tests: fix use of a non-existent word (existant) 2012-06-12 07:21:42 +02:00
Andrew Bartlett
657af5a274 pyldb: Ensure that the ldb argument is really an ldb before we dereference 2012-06-11 11:44:07 +02:00
Stefan Metzmacher
43090fb286 lib/ldb/tools: add missing "replace.h"
This has to be the first header!

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 11 01:21:01 CEST 2012 on sn-devel-104
2012-06-11 01:21:01 +02:00
Matthias Dieter Wallnöfer
27bcf7a0b6 LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with different value ordering
This is essential for fixing up wrong ordered "objectClass" attributes.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-04-18 07:48:05 +02:00
Andrew Tridgell
9deb650fa2 ldb: added ldb_msg_element_equal_ordered()
this gives us a order sensitive msg element comparison. We need this
to allow dbcheck to fix the order of objectClass attributes.
2012-04-18 07:48:05 +02:00
Matthias Dieter Wallnöfer
55f4275f18 LDB:ldb_msg.c - add another OOM check in "ldb_msg_copy()" 2012-04-11 12:50:16 +10:00
Andrew Bartlett
e17d12c23b ldb-tools: Place the whole of an ldif file in a transaction
This ensures that when operating ldbadd and ldbmodify against local
ldb files, either an ldif file succeeds or fails as a whole.

Also tests to verify that this is working correctly, and an ABI bump
due to the extra (private, but exported to ldb* tools) symbol and
behaviour change.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 10 11:14:43 CEST 2012 on sn-devel-104
2012-04-10 11:14:43 +02:00
Andrew Bartlett
501d6d3dd4 ldb: Allow access to the line number while reading ldif from a file 2012-04-10 17:37:31 +10:00
Andrew Bartlett
c484f259c6 ldb: Detect failures in ldb.base again
We need to wrap the ldb tests in the subunit blackbox helpers.

We also needed to change to the right directory, or else the :< file://
syntax check does not work, as samba4.png is not found.

Andrew Bartlett
2012-04-10 16:57:06 +10:00
Andrew Bartlett
57341c0f29 Revert "ldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function"
This reverts commit 40a4aea891.

Autocommit is important, as otherwise an ldb module could error out
during an operation, and leave an corrupt database.

Andrew Bartlett
2012-04-10 16:40:05 +10:00
Matthieu Patou
40a4aea891 ldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Mar 30 11:59:09 CEST 2012 on sn-devel-104
2012-03-30 11:59:09 +02:00
Matthias Dieter Wallnöfer
d6fde2d4c2 LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD mode
Achieve this by introducing a "disallowDNFilter" flag.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Amitay Isaacs
af68fe7113 build: Fix build issue on OpenBSD 5.x
Do not use -Wl,-no-undefined flag on OpenBSD 5.x (tested on 5.0)

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Mar 16 05:14:03 CET 2012 on sn-devel-104
2012-03-16 05:14:02 +01:00
Jelmer Vernooij
ebe04fc652 pyldb: Fix some more long lines, fix formatting.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Mar  2 05:26:56 CET 2012 on sn-devel-104
2012-03-02 05:26:56 +01:00
Jelmer Vernooij
e29a9f4af7 pyldb: Avoid using PyErr_LDB_ERROR_IS_ERR_RAISE where PyErr_SetLdbError suffices.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Mar  1 23:06:55 CET 2012 on sn-devel-104
2012-03-01 23:06:55 +01:00
Matthias Dieter Wallnöfer
1e46ccba5a LDB:pyldb.c - use always the case insensitive comparison for attribute names
We can make no assumptions about our users

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-02-13 09:49:12 +11:00
Andrew Bartlett
eecf2ac4c8 selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
Kelly Yeoh
34e7d960d0 ldbedit: prevent a transaction warning on failure
if a modify fails then cancel the transaction to prevent a dangling
transaction error

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jan 25 07:06:40 CET 2012 on sn-devel-104
2012-01-25 07:06:40 +01:00
Matthieu Patou
f05edc0ecb pyldb: raise an exception if we can't add the attribute 2012-01-03 06:47:10 +01:00
Matthias Dieter Wallnöfer
9ab7299b32 ldb:ldb/common/ldb_controls.c - reference "err_string" variable correctly
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-02 19:10:04 +01:00
Matthias Dieter Wallnöfer
eddf0d0fe2 ldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"
We should ignore the LDB result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-23 10:36:07 +01:00
Jelmer Vernooij
03e5f581ae pyldb: Add more docstrings.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 22:08:49 CET 2011 on sn-devel-104
2011-12-08 22:08:49 +01:00
Jelmer Vernooij
91c5bd23a7 Update ldb API sigs. 2011-11-30 22:58:05 +01:00
Jelmer Vernooij
0c8887c1cb Bump ldb version to 1.1.4 after introduction of ldb_module_error. 2011-11-30 22:58:05 +01:00
Amitay Isaacs
3a0f7b89d5 ldb: Add handy macros for reporting error inside ldb module
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Nov 17 05:24:46 CET 2011 on sn-devel-104
2011-11-17 05:24:46 +01:00
Jelmer Vernooij
86afe83d86 waf: Factor checking for undefined symbol flags out into separate method.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 13 19:38:38 CET 2011 on sn-devel-104
2011-11-13 19:38:38 +01:00
Jelmer Vernooij
c526078806 ldb: Only check for pkg-config file when checking for system ldb. 2011-11-13 18:06:06 +01:00
Jelmer Vernooij
8aa988a455 ldb: Use pyembed rather than pyext for ldb-util library. 2011-11-13 18:06:06 +01:00
Jelmer Vernooij
a0ed2da105 ldb: Re-apply pyldb fixes from Tridge and Amity, using unittest rather
than samba.tests.
2011-11-10 23:37:04 +01:00
Jelmer Vernooij
04be49f600 Revert "pyldb: fixed ldb API test"
This reverts commit 333248f08c.

This commit made the pyldb tests depend on the Samba testsuite.
2011-11-10 23:37:04 +01:00
Andrew Tridgell
333248f08c pyldb: fixed ldb API test
it was failing previously, but the failure wasn't being noticed
2011-11-10 14:24:21 +11:00
Andrew Tridgell
58457e6cd2 pyldb: enhanced get() method on msg object
get() now takes a default value and an idx, allowing for much easier
usage

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-11-10 14:24:21 +11:00
Jelmer Vernooij
21be155af8 pyldb: Remove duplicate definition of SYNTAX_DN. 2011-11-02 18:35:38 +01:00
David Disseldorp
2107ba5be8 ldb: fix compiler warning
Mixed declarations and code.

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Wed Nov  2 16:51:24 CET 2011 on sn-devel-104
2011-11-02 16:51:24 +01:00
Matthias Dieter Wallnöfer
8a6daa3cf9 ldb:common/ldb_modules.c - fix a typo in comment
Reviewed-by: abartlet
2011-10-27 18:52:28 +02:00
Amitay Isaacs
ab50165a02 ldb: ldb_errstring() takes ldb_contxt as an argument
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-20 05:53:05 +02:00
Andrew Tridgell
3712006faa dsdb: improve debug message
show the reply type in "Invalid reply type" messages

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Oct 20 00:57:05 CEST 2011 on sn-devel-104
2011-10-20 00:57:05 +02:00
Andrew Bartlett
9d49945ff0 ldb: Output more error information when a connect fails 2011-10-18 13:13:34 +11:00
Andrew Tridgell
75953f1846 ldb: fixed a race in ldb initialisation
This fixes a race when two processes initialise the same ldb database
at the same time. One of them could fail due to the other creating the
@BASEINFO record first.

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 18 03:54:42 CEST 2011 on sn-devel-104
2011-10-18 03:54:42 +02:00
Matthias Dieter Wallnöfer
fea02ce177 ldb:ldb_autotransaction_request - error string shouldn't be set here
A generic error string should be set independently of the access
mechanism to an LDB operation. Hence it should be handled in "ldb_wait"
and "ldb_request"

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 11 10:15:18 CEST 2011 on sn-devel-104
2011-10-11 10:15:18 +02:00