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

2258 Commits

Author SHA1 Message Date
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