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

2411 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
4618a7f3a1 ldb:pyldb.c - all flags should be unsigned
Adapt it to the previous commits

Reviewed-by: Jelmer + Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
74b50b47e9 ldb:ldb_sqlite3.c - all LDB flags should be handled as "unsigned"
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
3956e6840d ldb:tools/cmdline.c + tools/ldbtest.c - the connection flags are typed as "unsigned"
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
e6c5e11116 ldb:ldbtest.c - make more use of LDB constants
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
e64ffee1c2 ldb:tdb backend - cache - remove unused "last_attribute" structure member
Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Apr 29 20:07:27 CEST 2011 on sn-devel-104
2011-04-29 20:07:27 +02:00
Matthias Dieter Wallnöfer
aec1bc7feb ldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB result constants
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Matthias Dieter Wallnöfer
d4a06d5dac ldb:ldb_controls.c - fix comment indentation
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Jelmer Vernooij
bf3b2e2aee Support the 'PYTHON' environment variable.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Apr 23 04:19:05 CEST 2011 on sn-devel-104
2011-04-23 04:19:04 +02:00
Stefan Metzmacher
ab9d9cfd33 s4:ldb: change version to 1.1.0 after adding new functions:
ldb_ldif_parse_modrdn()
ldb_req_set_custom_flags()
ldb_req_get_custom_flags()

Signed-off-by: Simo Sorce <idra@samba.org>

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Apr 21 17:15:16 CEST 2011 on sn-devel-104
2011-04-21 17:15:16 +02:00
Matthieu Patou
93d5e7a018 ldb: add custom flags and functions for the application that wants to manipulate them
Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-04-21 14:41:56 +02:00
Stefan Metzmacher
f04689ae63 s4:ldb/tests: add tests for ldbmodify and 'modrdn'
Signed-off-by: Simo Sorce <idra@samba.org>

metze
2011-04-21 14:41:47 +02:00
Stefan Metzmacher
e57a23d23f s4:ldb/tools: add support for "modrdn" to ldbmodify
Signed-off-by: Simo Sorce <idra@samba.org>

metze
2011-04-21 14:41:36 +02:00
Stefan Metzmacher
a3b9522889 s4:ldb/ldif: add support for "modrdn"
This add a ldb_ldif_parse_modrdn() helper function to parse
the information out of a ldb_message structure.

Signed-off-by: Simo Sorce <idra@samba.org>

metze
2011-04-21 14:41:12 +02:00
Matthias Dieter Wallnöfer
ab0a881bb4 ldb:ldb/common/ldb_modules.c - change the request counter type to be "unsigned"
Just for consistency since all other LDB counters are unsigned as well.

And also the debug output specifier has been chosen to be "%u" - so it
really should be unsigned.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Apr  8 09:17:47 CEST 2011 on sn-devel-104
2011-04-08 09:17:47 +02:00
Matthias Dieter Wallnöfer
a15ebe61c3 ldb:ldb/common/ldb_modules.c - trivial - fix integer output specifiers 2011-04-08 08:29:51 +02:00
Matthias Dieter Wallnöfer
94f5b2f413 ldb:ldb_msg.c - make "ldb_msg_find_attr_as_*" more robust against invalid values
- Integer handling was modeled after validate code from "schema_syntax.c".
- Double handling was modeled similar, but with a dynamic buffer.
  I don't know if there is a maximum literal length for double values but an
  allocation shouldn't a problem here since doubles are rare.
- String handlind is enhanced with a terminating "0" test for safety.

Reviewed-by: abartlet + metze

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Apr  7 16:38:57 CEST 2011 on sn-devel-104
2011-04-07 16:38:57 +02:00
Matthias Dieter Wallnöfer
df9d46a353 ldb:ldb_msg_check_sanity - clean it up from unneeded stuff 2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
17f34136bf ldb:ldbadd/modify tool - return error code when at least one operation has failed
This is required to better detect failures and should raise the
compatiblity to "ldapadd"/"ldapmodify".

Reviewed-by: abartlet
2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
f14699287c ldb:tests - "init.ldif" - deactivate empty "seeAlso" attribute 2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
3cd11b5b75 ldb:ldb/common/ldb_modules.c - always use LDB error codes if possible
The callers do compare against LDB error codes - hence don't give back
"-1".

Reviewed-by: Tridge + abartlet
2011-04-07 15:53:20 +02:00
Matthias Dieter Wallnöfer
32cad7601a ldb:common/*.c - check for some OOM conditions
Reviewed-by: abartlet
2011-04-07 15:53:20 +02:00
Andrew Tridgell
5f771b301d ldb: fixed --paged option in ldb tools
we were sometimes using 'paged_result' and sometimes using 'paged_results'.
The latter seemed to be more common, so I changed the two places that
used the 'paged_result' string to 'paged_results'
2011-04-07 10:51:30 +10:00
Andrew Tridgell
bd9b2727ef ldb: detect eof on ldif files
use feof() to detect parsing errors in ldif files

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Mar 29 08:24:04 CEST 2011 on sn-devel-104
2011-03-29 08:24:03 +02:00
Matthieu Patou
def1fcb089 pyldb: minor fixup, fix a memory leak
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Mar 20 12:13:50 CET 2011 on sn-devel-104
2011-03-20 12:13:50 +01:00
Matthieu Patou
d4c78b66c2 ldb:fix control parsing for dirsync 2011-03-20 11:27:25 +01:00
Stefan Metzmacher
1d5f3c11df s4:ldb: don't install .pc files when building a private library
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar 16 09:58:22 CET 2011 on sn-devel-104
2011-03-16 09:58:22 +01:00
Andrew Tridgell
827d020f7e ldb: only install headers if we are not building as a private lib 2011-03-15 12:22:20 +11:00
Andrew Tridgell
bc99b62b3a ldb: use include <> form for public headers 2011-03-15 12:22:19 +11:00
Matthias Dieter Wallnöfer
b7ecc33ef9 ldb:ldb_controls.c - "ldb_save_controls" - allow that "saver" can also be NULL
Suggested by Tridge
2011-03-10 11:12:04 +01:00
Matthias Dieter Wallnöfer
78c9eb1a06 ldb:ldb_controls.c - always allocate enough space
The size for an additional "struct ldb_control" shouldn't hurt and so
the excluded control can also be NULL.

Added an ending "talloc_realloc" to resize the chunk to the
effective needed size (requested by tridge).
2011-03-10 11:12:04 +01:00
Matthias Dieter Wallnöfer
75706a627d ldb:ldb_msg.c - use LDB result constants for checking return values
Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Mar  4 22:51:57 CET 2011 on sn-devel-104
2011-03-04 22:51:57 +01:00
Matthias Dieter Wallnöfer
736a462c3e ldb:rdn_name LDB module - more RDN constraint checks (from AD)
Reviewed by: Tridge
2011-03-04 22:07:24 +01:00
Matthias Dieter Wallnöfer
ea12adf544 s4/ldb - remove now superflous "ldb_dn_validate" checks
If we immediately afterwards perform an LDB base operation then we don't
need an explicit "ldb_dn_validate" check anymore (only OOM makes sense).

Reviewed by: Tridge
2011-03-04 22:07:24 +01:00
Matthias Dieter Wallnöfer
349b9b72ec s4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate"
"ldb_dn_validate" is NULL-safe and does the check implicitly.

Reviewed by: Tridge
2011-03-04 22:07:24 +01:00
Matthias Dieter Wallnöfer
76fb23064e ldb:ldb_request - handle here the DN checks
This is a much better solution than we had before - so all important DN
checks are enforced for each type of LDB database (and not limited to DSDB).

Many "ldb_dn_validate" checks will now become obsolete.

Reviewed by: Tridge
2011-03-04 22:07:24 +01:00
Matthias Dieter Wallnöfer
b0c6899973 ldb:ldb tools - remove a superflous "return" (usage internally calls "exit")
Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Mar  4 09:39:22 CET 2011 on sn-devel-104
2011-03-04 09:39:22 +01:00
Matthias Dieter Wallnöfer
b50ebc3228 ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parameters
Not all LDB databases have further DN checks.

Reviewed by: Tridge
2011-03-04 08:51:57 +01:00
Matthias Dieter Wallnöfer
1b93173813 ldb:ldb tools - ldbtest - convert other result values to LDB codes as well
I've forgotten this in my first patchset.

Reviewed by: Tridge
2011-03-04 08:51:45 +01:00
Andrew Tridgell
949427c208 python: use os.environ[] instead of os.putenv()
using os.putenv() causes too much confusion, as it doesn't update
os.getenv()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-22 02:51:10 +01:00
Matthieu Patou
95eb3020de pyldb: Add tests for the ldb_result object 2011-02-21 10:56:00 +03:00
Matthieu Patou
4c74c5f557 pyldb: create LdbResult, return value from ldb.search is now a LdbResult 2011-02-21 10:55:59 +03:00
Matthieu Patou
b1595f40c5 ldb: controls marshalling/unmarshalling improvement
Add a function to marshall a control to a string
Refactor the code of ldb_control_parse_strings to allow to extract the
core code into ldb_control_parse_from_string so that this function can
be called for just 1 string
2011-02-21 10:55:59 +03:00
Simo Sorce
0a05a364f3 Increase minor version since a public header has changed
Samba4 now depends on a new macro defined in the public ldb_modules.h header:
LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECK.

Bump up the minor release of ldb accordingly.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Mon Feb 14 19:39:31 CET 2011 on sn-devel-104
2011-02-14 19:39:31 +01:00
Andrew Tridgell
95e347a2d0 s4-ldb: fixed a uninitialised el->flags in ldb_tdb
this caused an intermittent failure in some tests

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-14 17:55:09 +11:00
Andrew Tridgell
c2ccd24ebf s4-ldb: added LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECK
this allows a ldb module to force an element as single valued
2011-02-14 17:55:08 +11:00
Andrew Tridgell
a48328a828 s4-ldb: use a helper function for single valued checking
this gives us a single piece of logic for single value checking in the
tdb backend

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-14 17:55:08 +11:00
Andrew Tridgell
a26f8b8ae6 ldb-web: update mailing list info 2011-02-14 17:55:08 +11:00
Matthieu Patou
a7301556d2 pyldb: fix a bug in the unit test which prevented ldb.python to run all the tests in the testsuite
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Feb 13 00:14:24 CET 2011 on sn-devel-104
2011-02-13 00:14:24 +01:00
Matthieu Patou
17fdee0e92 ldb: use the sizeof of the control variable as offset instead of hardcoded values, helps to avoid bugs 2011-02-13 01:23:01 +03:00
Matthieu Patou
ad9b670f47 ldb: remove "magic" string in ldb_controls, replace them with constants defined in ldb.h
Allow to have less magic value in the control code and will allow not to
duplicate names when doing a function that marshal a control to it's
string representation
2011-02-13 00:51:05 +03:00