ira/third_party.git
12 years agoAvoid some // style comments in divls64
Volker Lendecke [Wed, 10 Aug 2011 17:50:52 +0000 (19:50 +0200)]
Avoid some // style comments in divls64

12 years agoAdapt divlu64 to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:49:55 +0000 (19:49 +0200)]
Adapt divlu64 to Samba coding conventions

12 years agoAvoid some // style comments in divlu64
Volker Lendecke [Wed, 10 Aug 2011 17:49:23 +0000 (19:49 +0200)]
Avoid some // style comments in divlu64

12 years agoAdapt fls64 to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:52 +0000 (19:46 +0200)]
Adapt fls64 to Samba coding conventions

12 years agoAdapt tally_num to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:37 +0000 (19:46 +0200)]
Adapt tally_num to Samba coding conventions

12 years agoAdapt tally_add to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:24 +0000 (19:46 +0200)]
Adapt tally_add to Samba coding conventions

12 years agoAdapt renormalize to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:00 +0000 (19:46 +0200)]
Adapt renormalize to Samba coding conventions

12 years agoAdapt shift_overflows to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:45:40 +0000 (19:45 +0200)]
Adapt shift_overflows to Samba coding conventions

12 years agoAdapt bucket_min to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:45:24 +0000 (19:45 +0200)]
Adapt bucket_min to Samba coding conventions

12 years agoAdapt bucket_of to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:45:14 +0000 (19:45 +0200)]
Adapt bucket_of to Samba coding conventions

12 years agoAdapt tally_new to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:44:45 +0000 (19:44 +0200)]
Adapt tally_new to Samba coding conventions

12 years agoSlightly simplify tally_new
Volker Lendecke [Wed, 10 Aug 2011 17:44:10 +0000 (19:44 +0200)]
Slightly simplify tally_new

12 years agoFix a c++ warning
Volker Lendecke [Wed, 10 Aug 2011 17:43:21 +0000 (19:43 +0200)]
Fix a c++ warning

12 years agoFix a c++ warning
Volker Lendecke [Wed, 10 Aug 2011 17:42:54 +0000 (19:42 +0200)]
Fix a c++ warning

12 years agotevent: cleanup nesting counter when doing a full reinit.
Simo Sorce [Tue, 26 Apr 2011 03:40:15 +0000 (23:40 -0400)]
tevent: cleanup nesting counter when doing a full reinit.

We may be forking from within a loop, so we need to clean-up to avoid
aborts when nesting is not allowed and we are in a new children.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agolib-util: Make create_unlink_tmp argument optional
Simo Sorce [Thu, 21 Apr 2011 14:04:06 +0000 (10:04 -0400)]
lib-util: Make create_unlink_tmp argument optional

Use tmpdir() if no dir is provided.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agolib-util: Make useful function a common utility.
Simo Sorce [Thu, 21 Apr 2011 13:45:27 +0000 (09:45 -0400)]
lib-util: Make useful function a common utility.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agolibutil: use AI_ADDRCONFIG only when AI_NUMERIC is not defined
Simo Sorce [Wed, 11 May 2011 21:50:07 +0000 (17:50 -0400)]
libutil: use AI_ADDRCONFIG only when AI_NUMERIC is not defined

This flag prevents startup w/o ip addresses assigned to any interface.
If AI_NUMERIC is passed it should be safe to avoid it.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agopytalloc: Regenerate ABI file.
Jelmer Vernooij [Wed, 10 Aug 2011 13:20:59 +0000 (15:20 +0200)]
pytalloc: Regenerate ABI file.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Aug 10 16:51:11 CEST 2011 on sn-devel-104

12 years agopytalloc: Use consistent prefix for functions, add ABI file.
Jelmer Vernooij [Wed, 10 Aug 2011 13:15:18 +0000 (15:15 +0200)]
pytalloc: Use consistent prefix for functions, add ABI file.

12 years agotsocket: make use of tevent_queue_add_optimize_empty() to optimize for the empty...
Stefan Metzmacher [Thu, 28 Jul 2011 08:37:51 +0000 (10:37 +0200)]
tsocket: make use of tevent_queue_add_optimize_empty() to optimize for the empty queue case

metze

12 years agotevent: change the version to 0.9.14 after the tevent_queue changes
Stefan Metzmacher [Tue, 9 Aug 2011 14:12:40 +0000 (16:12 +0200)]
tevent: change the version to 0.9.14 after the tevent_queue changes

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Aug  9 23:02:17 CEST 2011 on sn-devel-104

12 years agotevent: fix some comments in tevent.h
Stefan Metzmacher [Tue, 9 Aug 2011 14:05:36 +0000 (16:05 +0200)]
tevent: fix some comments in tevent.h

metze

12 years agotevent: add tevent_queue_add_entry() and tevent_queue_add_optimize_empty()
Stefan Metzmacher [Thu, 28 Jul 2011 08:45:22 +0000 (10:45 +0200)]
tevent: add tevent_queue_add_entry() and tevent_queue_add_optimize_empty()

This adds more flexible handling for the add operation:

- It allows the caller to remove a tevent_req from the queue
  by calling talloc_free() on the returned tevent_queue_entry.
- It allows the caller to optimize for the empty queue case,
  where it the caller wants to avoid the delay caused by
  the immediate event.

metze

12 years agotevent: splitout tevent_queue_add_internal() from tevent_queue_add()
Stefan Metzmacher [Tue, 9 Aug 2011 13:33:37 +0000 (15:33 +0200)]
tevent: splitout tevent_queue_add_internal() from tevent_queue_add()

metze

12 years agotevent: allow tevent_queue_add() to take a NULL trigger function
Stefan Metzmacher [Thu, 28 Jul 2011 07:45:15 +0000 (09:45 +0200)]
tevent: allow tevent_queue_add() to take a NULL trigger function

This way the caller can add a blocker to the queue.

metze

12 years agotevent: add tevent_queue_running() function
Stefan Metzmacher [Thu, 28 Jul 2011 07:46:34 +0000 (09:46 +0200)]
tevent: add tevent_queue_running() function

metze

12 years agoldb: fix the canonicalisation of booleans
Andrew Tridgell [Tue, 9 Aug 2011 06:41:16 +0000 (16:41 +1000)]
ldb: fix the canonicalisation of booleans

we were canonicalising "FALSE" to "FALS"

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

12 years agotalloc: prepare for 2.0.6 release
Andrew Tridgell [Mon, 8 Aug 2011 22:40:17 +0000 (08:40 +1000)]
talloc: prepare for 2.0.6 release

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 04:03:49 CEST 2011 on sn-devel-104

12 years agotalloc: ensure the sibling linked list remains valid during a free
Andrew Tridgell [Mon, 8 Aug 2011 08:24:32 +0000 (18:24 +1000)]
talloc: ensure the sibling linked list remains valid during a free

This ensures that the sibling list of a pointer doesn't become invalid
during a free operation. It is an alternative fix to the fix in
6f51a1f45bf4de062cce7a562477e8140630a53d, and avoids the problem of
trying to calculate the parent pointer early

This should fix the subtle spoolss talloc bug that Simo found

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 01:53:17 CEST 2011 on sn-devel-104

12 years agopyldb: fix uninitialized memory bug in PyArg_ParseTuple() argument
Stefan Metzmacher [Mon, 8 Aug 2011 11:21:18 +0000 (13:21 +0200)]
pyldb: fix uninitialized memory bug in PyArg_ParseTuple() argument

"s#", &str, &len) required 'len' as 'int' not as 'Py_ssize_t'.
With Py_ssize_t the 2nd half of a 64bit Py_ssize_t, will be
uninitialized as 'int' is only 32bit.

metze

12 years agobuild: provide tevent-util as a public library
Andrew Bartlett [Fri, 29 Jul 2011 07:01:38 +0000 (17:01 +1000)]
build: provide tevent-util as a public library

This is needed so that OpenChange can get at _tevent_req_nterr(), which is referenced
by generated PIDL output.

Andrew Bartlett

12 years agopyldb: Generate ABI file.
Jelmer Vernooij [Sun, 7 Aug 2011 15:17:18 +0000 (17:17 +0200)]
pyldb: Generate ABI file.

12 years agopyldb: Consistently use pyldb_ prefix.
Jelmer Vernooij [Sun, 7 Aug 2011 15:08:56 +0000 (17:08 +0200)]
pyldb: Consistently use pyldb_ prefix.

12 years agos4-ldb: two DNs only match if they have the same deletion status
Andrew Tridgell [Thu, 4 Aug 2011 04:59:47 +0000 (14:59 +1000)]
s4-ldb: two DNs only match if they have the same deletion status

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Aug  4 09:34:08 CEST 2011 on sn-devel-104

12 years agotalloc: check block count aftter references test
Andrew Tridgell [Thu, 4 Aug 2011 02:07:19 +0000 (12:07 +1000)]
talloc: check block count aftter references test

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: rule_id in ldb_parse_tree should be const
Andrew Tridgell [Tue, 2 Aug 2011 07:17:13 +0000 (17:17 +1000)]
ldb: rule_id in ldb_parse_tree should be const

this allows assignment to a constant string without allocation

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

12 years agoldb: added a new always-fail ldap extended match OID
Andrew Tridgell [Tue, 2 Aug 2011 07:16:44 +0000 (17:16 +1000)]
ldb: added a new always-fail ldap extended match OID

this is used when rewriting filter rules to replace a filter rule with
one that is guaranteed not to match

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

12 years agoldb: changed DN matching rules to obey GUID/SID/string ordering
Andrew Tridgell [Tue, 2 Aug 2011 07:15:28 +0000 (17:15 +1000)]
ldb: changed DN matching rules to obey GUID/SID/string ordering

when matching two DNs, the GUID takes priority, then the SID, then the
string component

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: added signatures for 1.1.2
Andrew Tridgell [Wed, 3 Aug 2011 06:44:28 +0000 (16:44 +1000)]
ldb: added signatures for 1.1.2

12 years agoldb: raise minor version
Andrew Tridgell [Mon, 1 Aug 2011 02:24:38 +0000 (12:24 +1000)]
ldb: raise minor version

needed for new module function ldb_dn_replace_components()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: added ldb_parse_tree_walk()
Andrew Tridgell [Mon, 1 Aug 2011 07:46:39 +0000 (17:46 +1000)]
ldb: added ldb_parse_tree_walk()

this walks a ldb parse tree, calling a callback on each node

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: added ldb_dn_replace_components()
Andrew Tridgell [Mon, 1 Aug 2011 02:24:13 +0000 (12:24 +1000)]
ldb: added ldb_dn_replace_components()

this allows you to replace the string part of a DN with the string
part from another DN. This is useful when you want to fix a DN that
has the right GUID but the wrong string part, because the target
object has moved.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb-samba: Explain the current behaviour of ldif_canonicalise_objectCategory
Andrew Bartlett [Mon, 1 Aug 2011 23:35:23 +0000 (09:35 +1000)]
ldb-samba: Explain the current behaviour of ldif_canonicalise_objectCategory

12 years agopyldb: return a copy of key constant DNs via python interface
Andrew Tridgell [Mon, 1 Aug 2011 02:39:48 +0000 (12:39 +1000)]
pyldb: return a copy of key constant DNs via python interface

this prevents an easy coding error where the caller modifies one of
the key DNs for the database, by using an add_child function or
similar

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agoFix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
Jeremy Allison [Mon, 1 Aug 2011 18:49:10 +0000 (11:49 -0700)]
Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c

Make SA_RESETHAND conditional on its existance.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Aug  1 22:03:45 CEST 2011 on sn-devel-104

12 years agotalloc: added test suite for talloc_free_children()
Andrew Tridgell [Fri, 29 Jul 2011 01:57:07 +0000 (11:57 +1000)]
talloc: added test suite for talloc_free_children()

this tests the fix from Simo

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104

12 years agotalloc: preserve context name on talloc_free_children()
Simo Sorce [Wed, 27 Jul 2011 16:02:35 +0000 (12:02 -0400)]
talloc: preserve context name on talloc_free_children()

Otherwise tc->name will end up pointing to garbage when it is not
set to a const but rather to a string allocate as child of the context itself.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agopyldb: added binary_encode() and binary_decode() methods
Andrew Tridgell [Thu, 28 Jul 2011 07:03:06 +0000 (17:03 +1000)]
pyldb: added binary_encode() and binary_decode() methods

this gives access to RFC2254 encoding from python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: added a test for an invalid search expression
Andrew Tridgell [Thu, 28 Jul 2011 05:56:15 +0000 (15:56 +1000)]
ldb: added a test for an invalid search expression

this tests the fix for invalid expressions in & and | expressions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agoldb: fixed a search expression parse bug
Andrew Tridgell [Thu, 28 Jul 2011 05:51:31 +0000 (15:51 +1000)]
ldb: fixed a search expression parse bug

when a secondary component of a & or | expression was invalid, it was
ignored rather than giving an error. For example:

 (|(objectclass=user)(samaccountname=foo\blah))

was treated as being:

 (objectclass=user)

whereas it should be an error, as foo\blah is invalid

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agotevent: Slightly simplify poll_event_loop_poll
Volker Lendecke [Thu, 28 Jul 2011 12:09:13 +0000 (14:09 +0200)]
tevent: Slightly simplify poll_event_loop_poll

No real code change. Do an early return instead of an if-statement, avoiding
one level of indentation.

12 years agoAdd wait_for_read_send/recv
Volker Lendecke [Tue, 26 Jul 2011 13:06:44 +0000 (15:06 +0200)]
Add wait_for_read_send/recv

Wait for readability of a socket as a tevent_req

12 years agoldb-samba: Allow --show-binary flag on defaultSecurityDescriptor
Amitay Isaacs [Fri, 15 Jul 2011 01:25:36 +0000 (11:25 +1000)]
ldb-samba: Allow --show-binary flag on defaultSecurityDescriptor

This allows users to display defaultSecurityDescriptor in fully expanded form.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoldb: Expose ldb_handler_fold() funcion
Amitay Isaacs [Fri, 15 Jul 2011 01:23:03 +0000 (11:23 +1000)]
ldb: Expose ldb_handler_fold() funcion

This allows creation of derived syntax handlers from the base directory string.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agotalloc: Support PYTHON environment variable.
Jelmer Vernooij [Tue, 26 Jul 2011 19:07:20 +0000 (21:07 +0200)]
talloc: Support PYTHON environment variable.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 22:21:30 CEST 2011 on sn-devel-104

12 years agolibsamba-util: Build in libbitmap.
Jelmer Vernooij [Tue, 26 Jul 2011 11:29:00 +0000 (13:29 +0200)]
libsamba-util: Build in libbitmap.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 14:45:27 CEST 2011 on sn-devel-104

12 years agolib/ccan: update to init-1192-gdd04041
Rusty Russell [Mon, 25 Jul 2011 08:48:27 +0000 (18:18 +0930)]
lib/ccan: update to init-1192-gdd04041

This imports licensing clarifications and updates as discussed on
samba-technical ("Subject: Re: ccan code breaks older build farm
systems").

In particular, the recent version have per-file license markers, and
some modules are relicenced more liberally: in particular Simo pointed
out that htable was GPL, and indirectly included by libtdb2, which
would have made that GPL as well.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jul 25 12:03:40 CEST 2011 on sn-devel-104

12 years agolib/ccan: add README
Rusty Russell [Mon, 25 Jul 2011 08:37:11 +0000 (18:07 +0930)]
lib/ccan: add README

README points out that these code snippets have their own licenses,
and that their home is elsewhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agocharset: Make name lowercase everywhere.
Jelmer Vernooij [Fri, 22 Jul 2011 16:33:31 +0000 (18:33 +0200)]
charset: Make name lowercase everywhere.

12 years agotdb: remove 'EOF' print from tdbrestore
Andrew Tridgell [Thu, 14 Jul 2011 04:03:15 +0000 (14:03 +1000)]
tdb: remove 'EOF' print from tdbrestore

the EOF message is pointless, and makes for noisy scripts

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

12 years agopyldb: use dn.is_child_of() instead of dn.compare_base()
Andrew Tridgell [Thu, 14 Jul 2011 03:17:49 +0000 (13:17 +1000)]
pyldb: use dn.is_child_of() instead of dn.compare_base()

the compare_base() C API doesn't really fit well in python, as it
returns 0 for true. Better to have a boolean function for the python
interface.

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

12 years agopyldb: add unit test for ldbDn.compare_base
Matthieu Patou [Sat, 11 Jun 2011 14:31:28 +0000 (18:31 +0400)]
pyldb: add unit test for ldbDn.compare_base

12 years agoldb-python: add a function to Dn object to compare the Dn with a base DN
Matthieu Patou [Mon, 23 May 2011 21:30:15 +0000 (01:30 +0400)]
ldb-python: add a function to Dn object to compare the Dn with a base DN

12 years agodebug: log early messages to stdout, and keep it open
Andrew Bartlett [Mon, 18 Jul 2011 07:07:25 +0000 (17:07 +1000)]
debug: log early messages to stdout, and keep it open

The --log-stdout option was compromised by the log file descriptors being
closed once the file process forked.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agolib/util Change debug priority order: DEBUG_STDOUT now overrides DEBUG_FILE
Andrew Bartlett [Mon, 18 Jul 2011 06:00:16 +0000 (16:00 +1000)]
lib/util Change debug priority order: DEBUG_STDOUT now overrides DEBUG_FILE

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoSecond part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems.
Jeremy Allison [Tue, 19 Jul 2011 20:35:45 +0000 (13:35 -0700)]
Second part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems.

Re-add:
smb_ucs2_t toupper_w(smb_ucs2_t v);

and ensure it is called whenever we are operating on smb_ucs2_t
variables. I'd like to make the definition of smb_ucs2_t incompatible
with int and codepoint_t so they can't be mixed, but that's a patch
for another time.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104

12 years agoFirst part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
Jeremy Allison [Tue, 19 Jul 2011 20:19:29 +0000 (13:19 -0700)]
First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems

Remove
int toupper_ascii(int c);
int tolower_ascii(int c);
int isupper_ascii(int c);
int islower_ascii(int c);

and replace with their _m equivalents, as they are identical.

12 years agolib/util/attr: add _UNUSED_ marco
Stefan Metzmacher [Thu, 14 Jul 2011 12:14:12 +0000 (14:14 +0200)]
lib/util/attr: add _UNUSED_ marco

metze

12 years agos4-fault: changed to use %d for PID, instead of %PID%
Andrew Tridgell [Wed, 13 Jul 2011 07:26:31 +0000 (17:26 +1000)]
s4-fault: changed to use %d for PID, instead of %PID%

this matches the s3 behaviour

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

12 years agoldb: added ldb_val_string_cmp()
Andrew Tridgell [Wed, 13 Jul 2011 03:25:34 +0000 (13:25 +1000)]
ldb: added ldb_val_string_cmp()

this should help fix some places where we run past the end of a string

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

12 years agoldb: don't return special DNs on non-base searches
Andrew Tridgell [Wed, 13 Jul 2011 02:25:09 +0000 (12:25 +1000)]
ldb: don't return special DNs on non-base searches

to look at a special DN, give the full DN

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

12 years agoldb: don't shortcut dn comparison for mismatched special DNs
Andrew Tridgell [Wed, 13 Jul 2011 02:24:25 +0000 (12:24 +1000)]
ldb: don't shortcut dn comparison for mismatched special DNs

DNs that start with @ can't be compared via string comparison with
normal DNs

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

12 years agoldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test...
Matthieu Patou [Tue, 12 Jul 2011 15:22:35 +0000 (19:22 +0400)]
ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test should be performed or not

The function ltdb_add_internal is called either from ltdb_add or
ltdb_rename. In case of add we enforce the unique test (unless it has
been relaxed by a upper module through the
LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK flag), but for rename as it
is translated by a delete + a add we relax the test as we can have one
or more attribute which are supposed to be single valued but that are
not (ie. when we have a couple of deleted value on a single valued
attribute), we have already done the tests on insert so make the
assumption that the values are OK.

Without this patch deleting a subnet that has been affected to more than
one site fails as the delete is in fact a rename to GUID\0DEL ... with
an attribute siteObject that has 1 active link value and 1 inactive link
value

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Jul 13 02:29:20 CEST 2011 on sn-devel-104

12 years agosocket_wrapper: make sure interfaces are in the valid range on bind()
Stefan Metzmacher [Sun, 10 Jul 2011 14:40:37 +0000 (16:40 +0200)]
socket_wrapper: make sure interfaces are in the valid range on bind()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 10 18:24:14 CEST 2011 on sn-devel-104

12 years agotevent: change version to 0.9.13 after adding tevent_req_defer_callback()
Stefan Metzmacher [Fri, 8 Jul 2011 14:04:32 +0000 (16:04 +0200)]
tevent: change version to 0.9.13 after adding tevent_req_defer_callback()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 12:16:44 CEST 2011 on sn-devel-104

12 years agotevent: add tevent_req_defer_callback()
Stefan Metzmacher [Fri, 8 Jul 2011 13:54:51 +0000 (15:54 +0200)]
tevent: add tevent_req_defer_callback()

metze

12 years agotevent: fix comments for tevent_req_post()
Stefan Metzmacher [Sat, 9 Jul 2011 09:01:10 +0000 (11:01 +0200)]
tevent: fix comments for tevent_req_post()

metze

12 years agolib/param: Merge struct loadparm_service into common
Andrew Bartlett [Thu, 7 Jul 2011 23:19:43 +0000 (09:19 +1000)]
lib/param: Merge struct loadparm_service into common

This is handled by a common header and a .c file that is included into
both loadparm.c files.

In the process, _lp functions were renamed to lp__ to allow the common
function definition declarations to be used by source3 and source4
(which have different macro definitions).

The only parameter to change type is 'strict_locking' which was a
bool, and is now an int, to accommodate the 'Auto' value from source3.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jul  8 12:35:56 CEST 2011 on sn-devel-104

12 years agos3-param use common struct parmlist_entry to hold parametric options
Andrew Bartlett [Thu, 7 Jul 2011 23:18:09 +0000 (09:18 +1000)]
s3-param use common struct parmlist_entry to hold parametric options

This will allow struct loadparm_service to be shared in future.

Andrew Bartlett

12 years agoparam: Move per-share parameters into a seperate file, to share with s3
Andrew Bartlett [Thu, 7 Jul 2011 12:03:30 +0000 (22:03 +1000)]
param: Move per-share parameters into a seperate file, to share with s3

This will allow the struct loadparm_service to be in common between
the two loadparm implementations in the tree.

Andrew Bartlett

12 years agolib/util Move bitmap.c to lib/util
Andrew Bartlett [Thu, 7 Jul 2011 11:04:31 +0000 (21:04 +1000)]
lib/util Move bitmap.c to lib/util

12 years agos3:libsmb: remove unused clistr_push_fn()
Stefan Metzmacher [Thu, 7 Jul 2011 15:24:32 +0000 (17:24 +0200)]
s3:libsmb: remove unused clistr_push_fn()

metze

12 years agos3:libsmb: remove unused clistr_pull_fn()
Stefan Metzmacher [Wed, 6 Jul 2011 15:57:45 +0000 (17:57 +0200)]
s3:libsmb: remove unused clistr_pull_fn()

metze

12 years agoccan/tally: don't use SIZE_MAX.
Rusty Russell [Wed, 6 Jul 2011 05:17:44 +0000 (14:47 +0930)]
ccan/tally: don't use SIZE_MAX.

Michael Adam points out this broke the build farm (ie. OSF1 axp V5.1 2650 alpha)
so fixed in CCAN and imported from af7a902d74a7926693f55da9e21a67dde46931d4:

    Turns out it's not standard (thanks Samba build farm!)
    And the previous test had a hole in it anyway.  This one is more conservative.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Jul  6 08:34:05 CEST 2011 on sn-devel-104

12 years agolibcli/smb move enum protocol_types to a common header
Andrew Bartlett [Wed, 6 Jul 2011 03:05:45 +0000 (13:05 +1000)]
libcli/smb move enum protocol_types to a common header

12 years agoldb: set -Wl,-no-undefined only on standalone build
Andrew Bartlett [Tue, 5 Jul 2011 05:55:25 +0000 (15:55 +1000)]
ldb: set -Wl,-no-undefined only on standalone build

This ensures that the flag is not propogated to other projects, such
as Samba's source3 waf build.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jul  5 10:37:30 CEST 2011 on sn-devel-104

12 years agoldb: make ldb a top level library for Samba 4.0
Andrew Bartlett [Tue, 5 Jul 2011 00:01:32 +0000 (10:01 +1000)]
ldb: make ldb a top level library for Samba 4.0

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoccan: fix configure tests for __builtin_clz etc.
Rusty Russell [Tue, 5 Jul 2011 03:38:09 +0000 (13:08 +0930)]
ccan: fix configure tests for __builtin_clz etc.

It's not enough to compile-test them: Michael Adam points out that nonexistant
functions merely cause a warning.  We have to try to link them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Jul  5 07:08:55 CEST 2011 on sn-devel-104

12 years agoS3: Fix some nonempty blank lines
Volker Lendecke [Sat, 25 Jun 2011 13:14:25 +0000 (15:14 +0200)]
S3: Fix some nonempty blank lines

12 years agolib/util/string_wrappers: move everything into one HAVE_COMPILER_WILL_OPTIMIZE_OUT_FN...
Stefan Metzmacher [Fri, 24 Jun 2011 19:49:16 +0000 (21:49 +0200)]
lib/util/string_wrappers: move everything into one HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS block

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jun 30 14:29:41 CEST 2011 on sn-devel-104

12 years agoparam: Merge param headers into lib/param/loadparm.h
Andrew Bartlett [Wed, 29 Jun 2011 05:33:54 +0000 (15:33 +1000)]
param: Merge param headers into lib/param/loadparm.h

This defines a common table format, so we can in future define a
common table.

Andrew Bartlett

12 years agolib: Allow NULL converted_size in convert_string_talloc
Volker Lendecke [Thu, 23 Jun 2011 12:44:25 +0000 (14:44 +0200)]
lib: Allow NULL converted_size in convert_string_talloc

12 years agolib/util/charset: Remove autodetection of charset from LOCALE
Andrew Bartlett [Tue, 21 Jun 2011 23:58:59 +0000 (09:58 +1000)]
lib/util/charset: Remove autodetection of charset from LOCALE

In the past, our LOCALE would set the display charset of Samba.  The
display charset has now been removed.  This patch removes the support
code that detected the locale from the environment.  We cannot safely
have 'unix charset' follow the locale (at it creates files on disk and
entries in databases that must not vary), so this code is unused.

As an example, imagine a database is manipulated in the
administrator's locale, and then read by smbd starting up in the
system default locale.  Or smbd restarted by the administrator rather
than a startup script.  Both of these situations could corrupt
databases or filenames on disk.

Andrew Bartlett

12 years agolib/util/charset: Remove 'display charset'
Andrew Bartlett [Tue, 21 Jun 2011 23:52:31 +0000 (09:52 +1000)]
lib/util/charset: Remove 'display charset'

As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:
http://lists.samba.org/archive/samba-technical/2011-June/078190.html

Setting this to a value other than 'unix charset' does not make sense,
as any system where the filesytem charset does not equal the terminal
charset will already have problems with programs as simple as 'ls'.
It also means that our output could not be pasted as our input in
interactive programs or onto our command line, as we never did
translate in the DISPLAY -> UNIX direction.

The d_printf() calls are retained in case we need to revisit this, and
to support display_set_stderr().

Andrew Bartlett

12 years agolib/util: Restore CH_UNIX as source charset for d_printf()
Andrew Bartlett [Tue, 21 Jun 2011 02:53:12 +0000 (12:53 +1000)]
lib/util: Restore CH_UNIX as source charset for d_printf()

I'm changed this during the change to use the d_printf() code in
common, but should not have.

However, there is a puzzle: What is the right source charset?
Translated strings in our .mo and .msg files are in UTF8, but strings
such as file names on remote servers are in UNIX (whatever that is).
I can't see how this actually works properly when either CH_DISPLAY or
CH_UNIX are other than UTF8!

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agolib/util Remove display_cd from d_printf()
Andrew Bartlett [Tue, 21 Jun 2011 02:51:30 +0000 (12:51 +1000)]
lib/util Remove display_cd from d_printf()

The setting of the display charset is now done by
convert_string_talloc() selecting the right charset based on
CH_DISPLAY.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agolib/ccan/tally.h: update for FreeBSD compile.
Rusty Russell [Tue, 21 Jun 2011 01:50:07 +0000 (11:20 +0930)]
lib/ccan/tally.h: update for FreeBSD compile.

Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN:
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Tue Jun 21 10:43:31 2011 +0930

    tally: fix FreeBSD compile, memleak in tests.

    Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104

12 years agolib/util Remove samba-util-common!
Andrew Bartlett [Mon, 20 Jun 2011 10:36:46 +0000 (20:36 +1000)]
lib/util Remove samba-util-common!

All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett

12 years agolib/util: allow parmlist.c to compile under s3 includes.h
Andrew Bartlett [Mon, 20 Jun 2011 10:43:42 +0000 (20:43 +1000)]
lib/util: allow parmlist.c to compile under s3 includes.h