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

5959 Commits

Author SHA1 Message Date
Andrew Tridgell
8741f03995 pyldb: added validate option to ldb.modify()
This allows validation of ldb messages in a ldb modify operation to be
bypassed, by setting validate=False. This is useful in the dbcheck
tool to allow for removing invalid empty attributes from the database
2011-06-14 09:39:24 +02:00
Andrew Bartlett
16b1c77644 lib/util Bring procid_str() into lib/util as server_id_string()
This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
d057116cc2 server_id.idl: Bring server_id.idl in common
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +02:00
Andrew Bartlett
8d803d5a0a s4-cluster Use task_id instead of id2 to clarify server_id structure
This seems a clearer and more acceptable name.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +02:00
Matthias Dieter Wallnöfer
ba5cec5804 ldb:ldb_msg.c - move away from "errno"
Reviewed-by: Tridge
2011-06-09 09:34:55 +02:00
Andrew Tridgell
79ef434b90 s4-interface: raise the debug level for interface discovery 2011-06-08 04:56:04 +02:00
Andrew Tridgell
3ccb72d749 s4-ipv6: fixed iface_list_same_net() for IPv6 2011-06-07 12:55:37 +10:00
Andrew Tridgell
6a6d4d8884 s4-ipv6: fix iface_list_best_ip() for IPv6
return an interface with the same address family as the target
2011-06-07 12:55:37 +10:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
de46ad9084 lib/util use modules_path(), data_path() and shlib_ext() from source3
This brings these helpful utility functions in common, as they are not
based on either loadparm system.

(The 'modules dir' parameter from Samba4 will shortly be removed, so
there is no loss in functionality)

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Tridgell
d168a5e703 s4-ipv6: fill in family when initialising from sockaddr
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jun  6 05:35:36 CEST 2011 on sn-devel-104
2011-06-06 05:35:36 +02:00
Andrew Tridgell
25ac58dcce s4-ipv6: fix the address family for IPv6 string addresses 2011-06-06 12:26:11 +10:00
Andrew Tridgell
3736f29696 s4-ipv6: use the server address family
don't force v4 in connect_multi
2011-06-06 12:26:11 +10:00
Andrew Tridgell
dc1e6109c8 s4-ipv6: enable IPv6 by default
it now passes all tests
2011-06-06 12:26:10 +10:00
Andrew Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Andrew Tridgell
44d47e8515 s4-ipv6: allow ipv6 to be enabled/disabled in smb.conf
this adds the parametric option ipv6:enable=true/false

It defaults to false for now, until the remaining issues with testing
of ipv6 are resolved
2011-06-06 12:26:10 +10:00
Andrew Tridgell
df632483f1 s4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLY
this changes ipv6_listen() to use IPV6_V6ONLY, and to setup the right
scope id for link local IPv6 addresses
2011-06-06 12:26:09 +10:00
Andrew Tridgell
244137b10d s4-ipv6: added socket_address_from_sockaddr_storage()
this converts a struct sockaddr_storage to a struct socket_address
2011-06-06 12:26:09 +10:00
Andrew Tridgell
d8d63b53b7 s4-ipv6: added ipv4 functions to interface code
this adds iface_list_first_v4() and iface_list_n_is_v4(). The NBT
server will use these to allow it to listen only for IPv4 addresses.
2011-06-06 12:26:09 +10:00
Andrew Tridgell
a527b96c96 s4-ipv6: fixed a warning 2011-06-06 12:26:09 +10:00
Andrew Tridgell
62af4a3798 s4-ipv6: allow IPv6 addresses in our interfaces list 2011-06-06 12:26:09 +10:00
Andrew Tridgell
2fc11518b7 s4-ipv6: added iface_list_wildcard()
this returns a list of wildcard address to listen on, when we don't
have 'bind interfaces only' set. It is a list, not a single address,
we need to listen separately for the IPv6 "::" address from the IPv4
0.0.0.0 address.

This also takes account of the loadparm "socket address" option
2011-06-06 12:26:09 +10:00
Rusty Russell
0204ae6229 lib/util/time.c: timeval_current_ofs_usec
Several places want "microseconds from current time", and several were
simply handing "usecs" values which could be over a million.

Using a helper to do this is safer and more readable.

I didn't replace any obviously correct callers (ie. constants).

I also renamed wait_nsec in source3/lib/util_sock.c; it's actually
microseconds not nanoseconds (introduced with this code in Volker's
19b783cc Async wrapper for open_socket_out_send/recv).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Matthias Dieter Wallnöfer
d34205add3 s4:ldb-samba/ldb_wrap.*-dsdb/samdb/samdb.c - handle LDB connection flags as unsigned
The LDB API ("ldb_connect") prescribes that they should be "unsigned".

Signed-off-by: Metze
2011-05-21 16:21:14 +02:00
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
Andrew Bartlett
30979f3ea1 build: Expand dcerpc-samba grouping library
This is possible in common now because the generated RPC code does not
rely on a particular dcerpc layer.

Andrew Bartlett
2011-05-18 16:12:07 +02:00
Andrew Tridgell
c596d85afd s4-interfaces: keep interfaces in the order they were declared
the spoolss notify test depends on the interfaces order

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun May  8 13:57:58 CEST 2011 on sn-devel-104
2011-05-08 13:57:58 +02:00
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett
2011-05-08 12:57:04 +02:00
Andrew Bartlett
f346a73785 lib/socket move interfaces code to the top level 2011-05-08 12:57:04 +02:00
Andrew Bartlett
879498b362 s4-lib/socket Samba4 is not IPv6 compatible
Don't add IPv6 interfaces until we actually support them.

I'll soon have IPv6 service at home, and then I'll make it my buisness
to sort this out once and for all.

Andrew Bartlett
2011-05-08 12:57:03 +02:00
Andrew Bartlett
5a8b6ac4c0 s4-lib merge get_interfaces() from Samba3 to Samba4 2011-05-08 12:57:03 +02:00
Andrew Bartlett
ea0ac9cdfc s4-auth Rename auth -> auth4 to avoid conflict with s3 auth 2011-05-08 10:56:26 +02:00
Andrew Bartlett
1475013963 lib/util Move source3 tdb_wrap_open() into the common code.
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases.  However, having two different tdb_wrap lists is a worse
fate, so this will do for now.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Tridgell
b96389d3e1 s4-socket: rename allow_access() to socket_allow_access()
this prevents a symbol collision with s3

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-05-03 07:37:07 +02:00
Andrew Bartlett
cdd802af83 s4-messaging Rename messaging -> imessaging
This avoid symbol and structure conflicts between Samba3 and Samba4,
and chooses a less generic name.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
eea783e04c lib/util Move set_socket_options() into common code. 2011-05-03 07:37:07 +02:00
Andrew Bartlett
4d0268dce4 s4-lib/socket Merge updated set_socket_options from Samba3 -> Samba4 2011-05-03 07:37:07 +02:00
Andrew Bartlett
4c8de5ab13 s4-cluster Rename server_id.node -> vnn to match Samba3 2011-05-03 07:37:07 +02:00
Andrew Bartlett
85eb4377db s4:cluster Rename .id to .pid in server_id
This also changes some DEBUG messages to use cluster_id_string()
rather than .id, to isolate them from this and other changes.

Andrew Bartlett
2011-05-03 07:37:06 +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
Andrew Bartlett
67905b41a9 s4-param Rename private_path() -> lpcfg_private_path()
This is consistent with lock_path()

Andrew Bartlett
2011-04-29 16:38:14 +10: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 Bartlett
663dc94e63 auth: Move auth_session_info into IDL
This changes auth_session_info_transport to just be a wrapper, rather
than a copy that has to be kept in sync.

As auth_session_info was already wrapped in python, this required
changes to the existing pyauth wrapper and it's users.

Andrew Bartlett
2011-04-05 23:46:04 +02:00
Andrew Bartlett
55134c9a9e s4-credentials Add a command line hook to set the kerberos credentials cache
This allows this to be specified independent of the KRB5CCNAME
environment variable (in this case, it's harder than it should be to
set up in the make test for s3 that way).

Andrew Bartlett
2011-04-04 19:48:43 +10:00
Matthias Dieter Wallnöfer
32a76ca146 s4:lib/policy/gp_ldap.c - make more use of LDB result constants
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Mar 30 09:33:38 CEST 2011 on sn-devel-104
2011-03-30 09:33:38 +02:00
Matthias Dieter Wallnöfer
dcdfc27dbf s4:lib/registry/registry.h - align a copyright line in header comment 2011-03-30 08:46:04 +02:00
Jeremy Allison
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02: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
Andrew Tridgell
3351897924 s4-cmdline: moved loadparm init after fault setup
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-29 06:17:03 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Andrew Tridgell
43a07621bb fault: fixed call to fault_setup() to use new syntax 2011-03-23 11:03:58 +11: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
Jelmer Vernooij
01b0f45d52 lib/registry/tests: Fix prototypes. 2011-03-19 15:33:29 +01:00
Jelmer Vernooij
bd0eced7d5 source4/lib: Fix prototypes for all functions. 2011-03-19 03:20:05 +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
793ffea034 s4-policy: don't make s4 policy.h public
if we are going to make GPO headers public, it should be from libgpo/
2011-03-15 12:22:19 +11:00
Andrew Tridgell
bc99b62b3a ldb: use include <> form for public headers 2011-03-15 12:22:19 +11:00
Andrew Tridgell
b7b2426fe3 ldb: don't install ldb_wrap.h twice 2011-03-15 12:22:18 +11:00
Matthias Dieter Wallnöfer
22fcb8e494 s4:lib/tls/wscript - exclude known broken GNUTLS releases
This definitely fixes bug #7218.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Mar 10 11:58:27 CET 2011 on sn-devel-104
2011-03-10 11:58:27 +01: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
Stefan Metzmacher
494aed59a5 s4:lib/socket: use sockaddr_in6 in ipv6_tcp_accept()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  9 14:36:42 CET 2011 on sn-devel-104
2011-03-09 14:36:42 +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
Jelmer Vernooij
31d09b13d3 tdb: Use <tdb.h> to include tdb so system headers are found when building against system tdb. 2011-02-28 21:11:21 +01:00
Jelmer Vernooij
136c160064 Use <tdb.h> to include tdb, so the system include file gets used when building against
system tdb.
2011-02-28 21:11:21 +01:00
Jelmer Vernooij
21d926f0ef Use <tevent.h> so the system tevent gets included, if enabled. 2011-02-28 21:11:21 +01:00
Andrew Tridgell
11a97d60d9 build: moved util_reg.c into a common subsystem
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Feb 24 05:53:52 CET 2011 on sn-devel-104
2011-02-24 05:53:52 +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
Andrew Tridgell
a12239b131 s4-waf: rename smbpasswd library to smbpasswdparser
this removes a conflict with the s3 smbpasswd binary
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
Jelmer Vernooij
fce1069925 ldb-samba: Add missing dependency on pyldb-util. 2011-02-20 16:51:21 +01:00
Andrew Tridgell
bed374215f s4-idl: rename s4 server_id.idl to server_id4.idl
this avoids a conflict with the new s3 server_id.idl

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-18 18:41:00 +11: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
Günther Deschner
d3c082e539 s4-readline: remove leftover from readline merge.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb 14 14:26:12 CET 2011 on sn-devel-104
2011-02-14 14:26:12 +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
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