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

1474 Commits

Author SHA1 Message Date
Jelmer Vernooij
05c1beb6b4 tdb: Bump version to 1.2.7 after addition of pytdb.__version__.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 17 18:23:16 UTC 2010 on sn-devel-104
2010-10-17 18:23:16 +00:00
Matthias Dieter Wallnöfer
a3f61dea40 Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c""
This reverts commit 8a2ce5c47c.

Jelmer pointed out that these are also in use by other LDB databases - not only
SAMDB ones.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 13:37:16 UTC 2010 on sn-devel-104
2010-10-17 13:37:16 +00:00
Matthias Dieter Wallnöfer
8a2ce5c47c s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c"
They're only in use by SAMDB code.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 09:40:13 UTC 2010 on sn-devel-104
2010-10-17 09:40:13 +00:00
Matthias Dieter Wallnöfer
39bd4ce920 s4:lib/util/util_ldb.c - remove unused "gendb_add_ldif" call 2010-10-17 10:29:46 +02:00
Matthias Dieter Wallnöfer
be4a0d35ac s4:"wrap_casefold" - move it to "ldb_wrap.c" since it's only used there 2010-10-17 10:20:40 +02:00
Andrew Tridgell
261628d1e4 s4-torture: fixed uninitialised variable error
ret is uninitialised if the directory is empty
2010-10-13 11:00:04 +00:00
Andrew Bartlett
d406e511a5 lib/debug Add DEBUGC and DEBUGADDC as dummies
This allows code that needs to also compile against the source3
debug code to compile in source4.

Andrew Bartlett
2010-10-12 02:54:16 +00:00
Matthieu Patou
77cdef5359 torture: Add debug on what we are removing 2010-10-11 13:46:21 +00:00
Andrew Bartlett
74ed86c4e3 lib/torture: Add function to clean up the output directory
This helps to avoid leaving 85MB of provision around for every
NET-API-BECOME-DC test.

Andrew Bartlett

Signed-off-by: Matthieu Patou <mat@matws.net>
2010-10-11 13:46:21 +00:00
Jelmer Vernooij
ba02178e87 util: Fix installation path of tevent_ntstatus.h, tevent_unix.h (bug 7720).
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Oct 11 09:24:56 UTC 2010 on sn-devel-104
2010-10-11 09:24:56 +00:00
Jelmer Vernooij
dc47e8dc52 libcli-auth: Remove unnecessary dependency on libsamba-hostconfig. 2010-10-11 01:06:35 +02:00
Jelmer Vernooij
904a6c3761 util: Link headers to correct subsystem, fix formatting. 2010-10-10 23:50:46 +02:00
Stefan Metzmacher
9b9489479e socket_wrapper: Make it work on freebsd for udp packets
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Oct 10 12:57:00 UTC 2010 on sn-devel-104
2010-10-10 12:56:59 +00:00
Jelmer Vernooij
3cd558dbeb talloc: Fix #include line in manpage.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct  9 13:53:25 UTC 2010 on sn-devel-104
2010-10-09 13:53:24 +00:00
Kamen Mazdrashki
76a8ae9e0d pytalloc: Fix warning that we are subtracting void* pointers
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Fri Oct  8 23:36:54 UTC 2010 on sn-devel-104
2010-10-08 23:36:54 +00:00
Volker Lendecke
e36e67fe04 tevent: Do not use talloc_autofree_context 2010-10-08 21:11:45 +02:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Andrew Tridgell
bb0017615d waf: fixed exit status of test suites
use RUN_COMMAND() to handle signal errors and exit status
2010-10-07 14:29:21 +11:00
Volker Lendecke
1c9b856670 tevent: Only call handlers that ask for events
The s3 libsmbclient puts two different handlers on a single fd for readability
and writability. With select this works fine, however without this patch we
unconditionally call the write handler even if the socket is only readable. We
should have called the read handler instead.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct  6 23:40:24 UTC 2010 on sn-devel-104
2010-10-06 23:40:24 +00:00
Rusty Russell
2db1987f5a idtree: fix right shift of signed ints, crash on large ids on AIX
Right-shifting signed integers in undefined; indeed it seems that on
AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives
0, not 1 as we might expect.

The obvious fix is to make id and oid unsigned: l (level count) is also
logically unsigned.

(Note: Samba doesn't generally get to ids > 1 billion, but ctdb does)

Reported-by: Chris Cowan <cc@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@samba.org>
Autobuild-Date: Wed Oct  6 08:31:09 UTC 2010 on sn-devel-104
2010-10-06 08:31:09 +00:00
Stefan Metzmacher
59d00fc439 lib/util/asn1: let asn1_peek_full_tag() return an error if we fail to parse tag hdr/len
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct  4 14:46:40 UTC 2010 on sn-devel-104
2010-10-04 14:46:40 +00:00
Stefan Metzmacher
4423aa59ab tsocket: make sure we delete the fd event before calling close()
We got random double free errors, when getting events from
epoll_wait() and try to dereference the private talloc pointer
attached to it.

Before doing the close() in the tstream_disconnect_send() function
we need to delete the fd event.

commit 38f505530b only fixed it for
tdgram sockets.

metze
2010-10-04 14:05:15 +00:00
Jelmer Vernooij
20d39691a8 tdb: Only use system pytdb when using system tdb. 2010-10-04 13:52:09 +02:00
Jelmer Vernooij
e805bf52c9 tdb: Support using system pytdb. 2010-10-04 13:52:09 +02:00
Jelmer Vernooij
6cd722d950 pytdb: Add __version__ attribute. 2010-10-04 13:52:09 +02:00
Jelmer Vernooij
22f633d094 pytdb: Include Python.h first to prevent warning. 2010-10-02 23:40:19 +02:00
Kirill Smelkov
ab37c48e57 pytdb: Check errors after PyObject_New() calls
The call could fail with e.g. MemoryError, and we'll dereference NULL
pointer without checking.

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-02 22:53:27 +02:00
Kirill Smelkov
bdd6bef5dd pytdb: Add support for tdb_repack()
Cc: 597386@bugs.debian.org
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-02 22:40:56 +02:00
Kirill Smelkov
a29142855e pytdb: Add TDB_INCOMPATIBLE_HASH open flag
In 2dcf76 Rusty added TDB_INCOMPATIBLE_HASH open flag which selects
Jenkins lookup3 hash for new databases.

Expose this flag to python users too.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-02 22:36:52 +02:00
Volker Lendecke
fc6e910e69 s3: Fix a 64-bit BUG
Quick explanation why this is a problem:

It is not safe to pass a pointer to a uint32_t into a routine that expects
a size_t *. The routine that this pointer is passed to has no chance to find
out that in reality it was passed a pointer to a uint32_t. On platforms where
sizeof(size_t)==8, we get a nice overwrite of a stack area that should not
be overwritten.

As this happens over an over again: Does someone know a means to make gcc
stop with an error in this case?

Volker
2010-10-02 11:17:49 +02:00
Günther Deschner
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
Jelmer Vernooij
e36f726281 subunit: Import new upstream snapshot (adds subunit_progress()) 2010-09-30 09:29:42 +02:00
Jelmer Vernooij
41182200a3 testtools: Import new upstream snapshot. 2010-09-30 09:18:01 +02:00
Andrew Tridgell
3b52b6249b util: added BINARY_ARRAY_SEARCH_V()
this is used to search an array of values
2010-09-29 16:36:22 -07:00
Jelmer Vernooij
63928c82c1 ldb/tevent: Fix detection of waf paths. 2010-09-28 09:12:41 +02:00
Jelmer Vernooij
4752d88fed tevent: Remove make targets that are not relevant for tevent. 2010-09-28 09:12:41 +02:00
Jelmer Vernooij
302423f306 tevent: Don't update Makefile/configure files. 2010-09-28 09:12:40 +02:00
Stefan Metzmacher
38f505530b tsocket: make sure we delete the fd event before calling close()
We got random double free errors, when getting events from
epoll_wait() and try to dereference the private talloc pointer
attached to it.

Before doing the close() in the tstream_disconnect_send() function
we need to delete the fd event.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 28 01:02:55 UTC 2010 on sn-devel-104
2010-09-28 01:02:55 +00:00
Volker Lendecke
35d9530f3b Remove talloc_autofree_context() from pm_process
This would be a classic for talloc_tos(), InFile is freed a few lines down. But
unfortunately S4 does not support talloc_tos().
2010-09-27 18:14:47 +02:00
Volker Lendecke
8e02130c62 Lift talloc_autofree_context() from OpenConfFile() 2010-09-27 18:14:47 +02:00
Michael Adam
84127dd504 libsmbconf: parse an empty share as empty share, not as NULL.
This fixes a segfault in net conf import:
Importing a text file with an empty share resulted in a segfault.
Now this creates an empty share in registry config, just as it
should.

Thanks to Gregor Beck <gbeck@sernet.de> for reporting.
2010-09-27 12:43:39 +02:00
Stefan Metzmacher
f9ba8f5d8a lib/util: change tevent_req_nterror() to a macro
This way we can record where a tevent_req was finished by
tevent_req_nterror().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 27 03:18:14 UTC 2010 on sn-devel-104
2010-09-27 03:18:14 +00:00
Rusty Russell
b7cd6af5b4 tdb: fix non-WAF build, commit 1.2.6 ABI file.
Sorry Jeremy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-09-27 11:06:51 +09:30
Rusty Russell
2dcf76c924 tdb: TDB_INCOMPATIBLE_HASH, to allow safe changing of default hash.
This flag to tdb_open/tdb_open_ex effects creation of a new database:
1) Uses the Jenkins lookup3 hash instead of the old gdbm hash if none is
   specified,
2) Places a non-zero field in header->rwlocks, so older versions of TDB will
   refuse to open it.

This means that the caller (ie Samba) can set this flag to safely
change the hash function.  Versions of TDB from this one on will either
use the correct hash or refuse to open (if a different hash is specified).
Older TDB versions will see the nonzero rwlocks field and refuse to open
it under any conditions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-09-27 10:48:28 +09:30
Rusty Russell
ccac258d14 tdb: automatically identify Jenkins hash tdbs
If the caller to tdb_open_ex() doesn't specify a hash, and tdb_old_hash
doesn't match, try tdb_jenkins_hash.

This was Metze's idea: it makes life simpler, especially with the upcoming
TDB_INCOMPATIBLE_HASH flag.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-09-27 10:48:28 +09:30
Rusty Russell
3258cf3f11 tdb: add Bob Jenkins lookup3 hash as helper hash.
This is a better hash than the default: shipping it with tdb makes it easy
for callers to use it as the hash by passing it to tdb_open_ex().

This version taken from CCAN and modified, which took it from
http://www.burtleburtle.net/bob/c/lookup3.c.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-09-27 10:48:28 +09:30
Stefan Metzmacher
182a69c5be lib/util/asn1: add asn1_peek_tag_needed_size() and asn1_peek_full_tag()
We need a way to ask for the length of a tag without having the full
buffer yet.

metze
2010-09-26 06:45:39 +02:00
Jelmer Vernooij
0a18f89e8a pyteven: Fix build warnings. 2010-09-25 12:20:58 -07:00
Jelmer Vernooij
296ff486e4 Check in configure/Makefile for those projects that have waf as primary build system. 2010-09-25 12:20:57 -07:00
Jelmer Vernooij
e68afdc02f pytevent: Add more tests. 2010-09-25 12:20:57 -07:00