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

2104 Commits

Author SHA1 Message Date
Simo Sorce
74f3e52f00 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>
2011-08-10 18:14:02 +02:00
Simo Sorce
09ad4d47f8 lib-util: Make create_unlink_tmp argument optional
Use tmpdir() if no dir is provided.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10 18:14:02 +02:00
Simo Sorce
05455b459a lib-util: Make useful function a common utility.
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10 18:14:02 +02:00
Simo Sorce
185cd4c794 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>
2011-08-10 18:14:02 +02:00
Jelmer Vernooij
4b94926ac3 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
2011-08-10 16:51:11 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Stefan Metzmacher
b97aab0223 tsocket: make use of tevent_queue_add_optimize_empty() to optimize for the empty queue case
metze
2011-08-10 08:04:15 +02:00
Stefan Metzmacher
fd3382906a 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
2011-08-09 23:02:17 +02:00
Stefan Metzmacher
c6363bb352 tevent: fix some comments in tevent.h
metze
2011-08-09 21:37:42 +02:00
Stefan Metzmacher
1533f1722d 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
2011-08-09 21:37:41 +02:00
Stefan Metzmacher
6b7d58cb4e tevent: splitout tevent_queue_add_internal() from tevent_queue_add()
metze
2011-08-09 21:37:41 +02:00
Stefan Metzmacher
aba9d48f55 tevent: allow tevent_queue_add() to take a NULL trigger function
This way the caller can add a blocker to the queue.

metze
2011-08-09 21:37:41 +02:00
Stefan Metzmacher
3c38ec72e7 tevent: add tevent_queue_running() function
metze
2011-08-09 21:37:40 +02:00
Andrew Tridgell
cba88a2b62 ldb: fix the canonicalisation of booleans
we were canonicalising "FALSE" to "FALS"

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Andrew Tridgell
abd2e25ee0 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
2011-08-09 04:03:49 +02:00
Andrew Tridgell
cf986f2008 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
6f51a1f45b, 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
2011-08-09 01:53:16 +02:00
Stefan Metzmacher
a5fdf05d6c 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
2011-08-08 16:45:27 +02:00
Andrew Bartlett
af5f494bd2 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
2011-08-08 13:34:06 +02:00
Jelmer Vernooij
3bcb8710fd pyldb: Generate ABI file. 2011-08-07 17:17:18 +02:00
Jelmer Vernooij
fdff105854 pyldb: Consistently use pyldb_ prefix. 2011-08-07 17:08:56 +02:00
Andrew Tridgell
fff3f29073 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
2011-08-04 09:34:08 +02:00
Andrew Tridgell
73677875b4 talloc: check block count aftter references test
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
23598d56ff 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>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
849d042dd8 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>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
e07ca09a7b 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>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
a8293a5baa ldb: added signatures for 1.1.2 2011-08-04 16:17:24 +10:00
Andrew Tridgell
39576e9d65 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>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
841d17ff83 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>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
4ba8069e3d 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>
2011-08-04 16:17:24 +10:00
Andrew Bartlett
2ed17af7f9 ldb-samba: Explain the current behaviour of ldif_canonicalise_objectCategory 2011-08-03 18:48:05 +10:00
Andrew Tridgell
a7f3545b82 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>
2011-08-03 14:25:38 +10:00
Jeremy Allison
0c67efdd68 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
2011-08-01 22:03:45 +02:00
Andrew Tridgell
d004fd0b53 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
2011-07-29 11:30:13 +02:00
Simo Sorce
52182a5281 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>
2011-07-29 18:17:44 +10:00
Andrew Tridgell
7ce4aca029 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>
2011-07-29 18:17:44 +10:00
Andrew Tridgell
d815ce094e 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>
2011-07-29 18:17:44 +10:00
Andrew Tridgell
e3b76bd620 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>
2011-07-29 18:17:44 +10:00
Volker Lendecke
83740555ea 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.
2011-07-28 17:42:23 +02:00
Volker Lendecke
4281967990 Add wait_for_read_send/recv
Wait for readability of a socket as a tevent_req
2011-07-28 17:42:22 +02:00
Amitay Isaacs
ef5e9ec3e3 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>
2011-07-28 15:20:51 +10:00
Amitay Isaacs
197996c3df 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>
2011-07-28 15:20:51 +10:00
Jelmer Vernooij
78b54e9ee1 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
2011-07-26 22:21:30 +02:00
Jelmer Vernooij
ac57cfda9d 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
2011-07-26 14:45:26 +02:00
Rusty Russell
6e72370fd7 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
2011-07-25 12:03:40 +02:00
Rusty Russell
91bc5a0d75 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>
2011-07-25 18:07:11 +09:30
Jelmer Vernooij
0397b2ef30 charset: Make name lowercase everywhere. 2011-07-23 22:08:10 +02:00
Andrew Tridgell
e01f3108ff tdb: remove 'EOF' print from tdbrestore
the EOF message is pointless, and makes for noisy scripts

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:37 +10:00
Andrew Tridgell
a36af1a501 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>
2011-07-21 11:44:36 +10:00
Matthieu Patou
3f6df9f9e3 pyldb: add unit test for ldbDn.compare_base 2011-07-21 11:44:34 +10:00
Matthieu Patou
521556ceed ldb-python: add a function to Dn object to compare the Dn with a base DN 2011-07-21 11:44:34 +10:00