1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

4642 Commits

Author SHA1 Message Date
Jelmer Vernooij
8f4e4d2e30 Adapt Zahari's test to the generic LDB Python tests. 2009-03-20 22:58:15 +01:00
zahari
4fff36f618 Setting nTSecurityDescriptor via LDAP fails
Fix for the problem was substitute talloc_strndup() with
talloc_memdup(), allocate 1 more character and put null character
('\0') in the extra place so data copied is null terminated.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-03-20 22:54:15 +01:00
Jelmer Vernooij
ee577ef0ee Add more comments. 2009-03-20 22:52:57 +01:00
Andrew Bartlett
4a45b0da57 s4:ldb Allow paged_searches to be mixed with other controls
I want to mix this with the server-side sort in particular.

Andrew Bartlett
2009-03-20 16:45:52 +11:00
Andrew Bartlett
1dc5b90e86 s4:ldb Fix the paged_searches module
This simplifies the code, removes presumptions about being the only
control in the reply, and allows it to function against Windows 2008.

For searches which did not require a paged result, the module was
simply returning a failure when the compleated search did not include
a paged result control.

Andrew Bartlett
2009-03-20 16:28:40 +11:00
Jelmer Vernooij
5fe2b28f45 Merge branch 'master' of git://git.samba.org/samba into minschema 2009-03-20 01:30:36 +01:00
Jelmer Vernooij
722dc9eed3 pyldb: Improve exception message when a list is expected. 2009-03-20 00:33:43 +01:00
Andrew Tridgell
844a1b3cd2 flush after showing the prompt in smbclient 2009-03-19 16:07:07 +11:00
Björn Jacke
a23719babb fix build on sles8 and other old popt installations
Signed-off-by: Michael Adam <obnox@samba.org>
2009-03-17 15:47:20 +01:00
Andrew Tridgell
a1ebb85020 added support for parentGUID
This is made up of 4 parts:

  1) change our schema to include the parentGUID attribute type

  2) in the add hook in the objectclass module, get the objectGUID of
  the parent and add it to the message as parentGUID

  3) in the rename hook in the objectclass module, get the objectGUID
  of the new parent, and insert an async modify request after the
  renmam is done

  4) added a simple test suite
2009-03-17 14:18:53 +11:00
Jelmer Vernooij
c223beee2a Merge branch 'tdr' of /home/jelmer/samba4 2009-03-15 14:57:58 +01:00
Jelmer Vernooij
4638633308 Move tdr to top-level. 2009-03-14 21:57:44 +01:00
Stefan Metzmacher
a3d5d8378c s4:events: allow nested events until we fixed all code to avoid them
metze
2009-03-12 14:21:25 +01:00
Stefan Metzmacher
6802394212 s4:ldb: allow nested events until the code is fixed to avoid them
metze
2009-03-12 14:21:20 +01:00
Stefan Metzmacher
1e4f78cc41 s4:ldb: setup tevent debug functions on a selfcreated event context
metze
2009-03-12 12:04:30 +01:00
Simo Sorce
97cccb2219 Fix extended operation return path.
Extended operations return was not going thorugh the same patch as others
leaving the ctx around. Plus we were neutralizing the spy too early so that it
didn't set the request_terminated flag as it should have.

This should hopefully fix the failures in the build farm.
2009-03-10 11:08:53 -04:00
Simo Sorce
f088353d37 Fix potential segfaults using freed memory.
In some code paths ltdb_context was still referenced even after we were returned
an error by one of the callbacks. Because the interface assumes that once an
error is returned the ldb_request may be freed, and because the ltdb_context was
allocated as a child of the request, this might cause access to freed memory.
Allocate the ltdb_context on ldb, and keep track of what's going on with the
request by adding a spy children on it. This way even if the request is freed
before the ltdb_callback is called, we will safely free the ctx and just quietly
return.
2009-03-09 20:12:11 -04:00
Andrew Bartlett
5a10d80491 Remove parse_control from header, long after the function was removed
Simo reminded me that when (long ago) I moved parse_controls away from
this place, I forgot to update the manually maintained header file.

Andrew Bartlett
2009-03-05 11:07:35 +11:00
Jelmer Vernooij
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Stefan Metzmacher
64662cb0c3 s4:ldb_map: include ldb_includes.h first to get replace.h as first header
This should bring the build on AIX one step further.

metze
2009-02-26 09:42:29 +01:00
Simo Sorce
fd3f3e68f2 Use stdbool.h instead of manually defining bool 2009-02-25 10:02:41 -05:00
Stefan Metzmacher
2bd8cacf0e s4:lib/events: map TEVENT_DEBUG_TRACE to debug level 10
metze
2009-02-25 15:05:50 +01:00
Jeremy Allison
a028e9640b Make S4 build on OpenSolaris.
Jeremy.
2009-02-24 15:27:47 -08:00
Simo Sorce
1cd7fe7194 Fix headers, ldb_includes.h is a private header,
do not reference it from ldb.h
2009-02-23 17:38:11 -05:00
Simo Sorce
689b8f5bb3 Make all transactions nested in ldb. The current samba4 code expects this
behavior anyway, and given we can only have one transaction active per
ldb context this is the only sane model we can support.

Fix ldb_tdb transactions, we could return back with an error with neither
committing nor canceling the actual tdb transaction in some error paths
within the ltdb commit and cancel transaction paths.

Added also some debugging to trace what was going on.
2009-02-23 13:33:19 -05:00
Andrew Tridgell
bb7e6f0f51 Worked around a problem with select/poll/epoll and gnutls
Our packet layer relies on the event system reliably telling us when a
packet is available. When we are using a socket layer like TLS then
things get a bit trickier, as there may be bytes in the encryption
buffer which could be read even if there are no bytes at the socket
level. The GNUTLS library is supposed to prevent this happening by
always leaving some data at the socket level when there is data to be
processed in its buffers, but it seems that this is not always
reliable.

To work around this I have added a new packet option
packet_set_unreliable_select() which tells the packet layer to not
assume that the socket layer has a reliable select, and to instead
keep trying to read from the socket until it gets back no data. This
option is set for the ldap client and server when TLS is negotiated.

This seems to fix the problems with the ldaps tests.
2009-02-18 17:37:45 +11:00
Andrew Tridgell
b1ff79dbb2 fixed some of the TLS problems
This fixes two things in the TLS support for Samba4. The first is to
use a somewhat more correct hostname instead of 'Samba' when
generating the test certificates. That allows TLS test clients (such
as gnutls-cli) to connect to Samba4 using auto-generated certificates.

The second fix is to add a call to gcry_control() to tell gcrypt to
use /dev/urandom instead of /dev/random (on systems that support
that). That means that test certificate generation is now very fast,
which was previously an impediment to putting the TLS tests on the
build farm.
2009-02-18 14:46:57 +11:00
Stefan Metzmacher
f131718c60 s4:lib/socket: add socket_address_copy()
metze
2009-02-13 13:44:38 +01:00
Stefan Metzmacher
f3c5bd9b77 s4:ldb_ildap: remove compiler warnings
metze
2009-02-13 13:44:37 +01:00
Volker Lendecke
147a2e3440 Fix Coverity ID 871 -- do not dereference "sp" before checking for NULL 2009-02-12 23:20:20 +01:00
Volker Lendecke
d75fe9b393 Fix Coverity ID 872 -- we have alread dereferenced "ac" 2 lines above 2009-02-12 23:17:19 +01:00
Stefan Metzmacher
2170a810ed s4:pyregistry: fix crash bugs introduced by e5a6eadd8214b56da34f733318a0fecaebbe5ef5
The registry api uses wild casts in the returned types, so we can't check
the talloc name against the type used in the public api...

metze
2009-02-06 12:13:26 +01:00
Stefan Metzmacher
e5a6eadd82 s4:pyregistry: fix compiler warnings
metze
2009-02-05 17:48:14 +01:00
Stefan Metzmacher
1d22e0ecef s4:pyldb: fix compiler warnings
metze
2009-02-05 17:48:11 +01:00
Stefan Metzmacher
4cb9ccd841 s4:lib/registry: fix c++ warnings
metze
2009-02-05 17:48:10 +01:00
Stefan Metzmacher
e2aab39e56 s4:lib/ldb: call ldb utils always via $VALGRIND ldbfoo$EXEEXT in the tests
metze
2009-02-03 16:31:02 +01:00
Stefan Metzmacher
91c292249b s4:lib/ldb: we should not silence warnings on handwritten python bindings
metze
2009-02-02 15:16:09 +01:00
Stefan Metzmacher
eb012dd212 s4:auth/credentials: the python bindings don't use swig anymore
metze
2009-02-02 15:16:09 +01:00
Stefan Metzmacher
0c3bc60a01 s4:lib/registry: s/new/nkey
metze
2009-02-02 13:09:18 +01:00
Stefan Metzmacher
62a3947d53 s4:ldb_map: s/new/ntree
metze
2009-02-02 13:09:16 +01:00
Stefan Metzmacher
82466db35d s4:ldif_handlers: s/class/sclass
metze
2009-02-02 13:09:15 +01:00
Stefan Metzmacher
79ae2de001 s4:lib/stream: s/private/private_data
metze
2009-02-02 13:08:26 +01:00
Stefan Metzmacher
7db458a56c s4:lib/socket: s/private/private_data
metze
2009-02-02 13:08:25 +01:00
Stefan Metzmacher
735af62105 s4:lib/messaging: s/private/private_data
metze
2009-02-02 13:08:25 +01:00
Simo Sorce
a5e570b562 Start restoring the sqlite3 backend
Passes many tests but not all yet.
2009-01-31 20:01:05 -05:00
Stefan Metzmacher
5f13710ced s4:irpc: avoid c++ reserved word 'private'
metze
2009-02-01 00:17:20 +01:00
Stefan Metzmacher
96f176dbd8 s4:lib/messaging: fix warnings in testsuite
metze
2009-02-01 00:17:20 +01:00
Stefan Metzmacher
f3f2dfc51a s4:lib/messaging: avoid c++ reserved word 'private'
metze
2009-02-01 00:17:19 +01:00
Simo Sorce
0245b9b973 Explicitly include ldb_handlers.h where necessary 2009-01-30 20:12:50 -05:00