Stefan Metzmacher [Fri, 22 Feb 2013 20:48:11 +0000 (21:48 +0100)]
tevent: fix some compiler warnings in testsuite.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Tue, 26 Feb 2013 14:51:38 +0000 (15:51 +0100)]
tevent: fix a comment typo in tevent_epoll.c
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Galen.Liu [Mon, 4 Feb 2013 06:43:01 +0000 (07:43 +0100)]
tevent: fix --disable-python cause configure fails (bug #8718)
When we disable python, it will cause build fail!
so, the patch will fix it.
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Fri, 22 Feb 2013 13:26:16 +0000 (14:26 +0100)]
tevent: define TEVENT_NUM_SIGNALS based on configure checks
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Fri, 22 Feb 2013 13:53:07 +0000 (14:53 +0100)]
lib/replace: add AC_CHECK_VALUEOF() macro
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Fri, 22 Feb 2013 13:20:07 +0000 (14:20 +0100)]
wafsamba: add CHECK_VALUEOF() helper
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Fri, 1 Mar 2013 08:27:29 +0000 (09:27 +0100)]
s3:lib/events: make use of tevent_common_loop_timer_delay()
This is critical as we also use tevent_common_add_timer().
And if the common code does internal changes, it may affects
both tevent_common_add_timer() and tevent_common_loop_timer_delay()
together!
Without this we rely on a specific behavior and version of
tevent.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Timur Bakeyev [Thu, 28 Feb 2013 00:25:07 +0000 (16:25 -0800)]
Fix bug # 9666 - Broken filtering of link-local addresses.
This patch should address the problem with Link Local addresses
on FreeBSD and Linux.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 28 20:56:57 CET 2013 on sn-devel-104
Stefan Metzmacher [Thu, 21 Feb 2013 07:29:18 +0000 (08:29 +0100)]
s3:pylibsmb: make sure we get tevent debug messages
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 28 14:34:24 CET 2013 on sn-devel-104
Stefan Metzmacher [Thu, 21 Feb 2013 07:39:05 +0000 (08:39 +0100)]
s3:lib/events: make use of samba_tevent_set_debug()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 07:35:50 +0000 (08:35 +0100)]
s4:lib/events: make use of samba_tevent_set_debug()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 08:00:56 +0000 (09:00 +0100)]
lib/util: add samba_tevent_set_debug()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 07:23:42 +0000 (08:23 +0100)]
lib/util: allow samba_tevent_debug() to take a name as context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 07:32:35 +0000 (08:32 +0100)]
auth/pycredentials: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 07:31:41 +0000 (08:31 +0100)]
s4:pyregistry: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 21 Feb 2013 07:30:51 +0000 (08:30 +0100)]
s4:pygensec: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Thu, 28 Feb 2013 09:54:21 +0000 (10:54 +0100)]
s3:lib/events: add missing TEVENT_TRACE_BEFORE/AFTER_WAIT handling
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Michael Adam [Wed, 27 Feb 2013 00:28:51 +0000 (01:28 +0100)]
s4:winbindd: fix spacing and line length in cmd_getpwnam_recv_domain()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 28 03:54:41 CET 2013 on sn-devel-104
Michael Adam [Tue, 26 Feb 2013 08:39:17 +0000 (09:39 +0100)]
s3:smbd: fix missing space in debug message in initial_break_processing()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Thu, 7 Feb 2013 22:12:20 +0000 (09:12 +1100)]
build: Do not force a specific perl from ${PERL} when running pod2man
pod2man should have the right #!/usr/bin/perl line already, and forcing it may
cause us to use the wrong perl.
Essentially treat this like any other system binary, rather than forcing
it to use the first perl we found.
This essentially reverts
e80f576db66ad04592ac436ed74ceb9b96452060.
Current SLES11 does not seem to have the issue this was added to
address.
Andrew Bartlett
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 28 02:14:25 CET 2013 on sn-devel-104
Daniel Kobras [Sat, 23 Feb 2013 00:24:26 +0000 (16:24 -0800)]
Fix bug #9039 'map untrusted to domain' treats WORKSTATION as bogus domain.
s3: never try to map global SAM name
Do not treat the global SAM name as a BOGUS domain, and exempt
local users from mapping, instead. This change reinstates the
exact mapping behaviour of Samba 3.2 if parameter 'map untrusted
to domain' is set.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Richard Sharpe [Wed, 27 Feb 2013 04:22:05 +0000 (20:22 -0800)]
Make sure that domain joins work correctly when the DC disallows NTLM auth.
Signed-Off-By: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-By: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 27 21:49:25 CET 2013 on sn-devel-104
Michael Adam [Wed, 27 Feb 2013 00:04:46 +0000 (01:04 +0100)]
s4:winbindd: do not drop the workgroup name in the getgrgid call
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104
Michael Adam [Tue, 26 Feb 2013 23:45:55 +0000 (00:45 +0100)]
s4:winbindd: do not drop the workgroup name in the getgrnam and getgrent calls.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Richard Sharpe [Sat, 23 Feb 2013 16:41:27 +0000 (08:41 -0800)]
Fix bug #9674 - Samba denies owner Read Control when there is a DENY entry while W2K08 does not.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 23 19:28:15 CET 2013 on sn-devel-104
Alexander Bokovoy [Fri, 22 Feb 2013 10:07:19 +0000 (12:07 +0200)]
Make systemctl reference indirect in packaging/NetworkManager/30-winbind-systemd
Some distributions have clever dependency generators when building packages
and generate dependencies for each executable called out in shell scripts.
The end result is that a package built out of samba would contain explicit dependency
to systemd even though it is usable without systemd.
Making systemctl reference indirect avoids explicit dependency.
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Feb 22 18:18:20 CET 2013 on sn-devel-104
Andreas Schneider [Wed, 20 Feb 2013 09:52:37 +0000 (10:52 +0100)]
s3-rpc_server: Make sure that fd is really closed on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:48:05 +0000 (10:48 +0100)]
lib-util: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:45:06 +0000 (10:45 +0100)]
s3-vfs: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:42:54 +0000 (10:42 +0100)]
s4-lib: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:38:13 +0000 (10:38 +0100)]
s3-libsmb: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:36:52 +0000 (10:36 +0100)]
ndrdump: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:25:55 +0000 (10:25 +0100)]
smbpasswd: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:23:45 +0000 (10:23 +0100)]
smbget: Fix file descriptor leak.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:22:00 +0000 (10:22 +0100)]
s4-policy: Fix memory leaks in push_recursive().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:09:20 +0000 (10:09 +0100)]
s4-cifsdd: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:10:15 +0000 (10:10 +0100)]
s4-registry: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 09:03:13 +0000 (10:03 +0100)]
s4-registry: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:51:43 +0000 (09:51 +0100)]
winbind: Don't leak centry memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:48:59 +0000 (09:48 +0100)]
s4-client: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:47:19 +0000 (09:47 +0100)]
s3-torture: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:43:44 +0000 (09:43 +0100)]
wbinfo: Fix several memory leaks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:41:55 +0000 (09:41 +0100)]
winbind: Don't leak memory on return.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:31:17 +0000 (09:31 +0100)]
s3-smbd: Don't leak subcntarr array.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:26:02 +0000 (09:26 +0100)]
torture: Don't leak file resource handle in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:16:25 +0000 (09:16 +0100)]
s3-vfs: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:15:26 +0000 (09:15 +0100)]
s3-param: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:11:48 +0000 (09:11 +0100)]
s3-lsasd: Don't leak file descriptors.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:06:51 +0000 (09:06 +0100)]
s3-spoolss: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:03:17 +0000 (09:03 +0100)]
s3-net: Don't leak username.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 08:23:37 +0000 (09:23 +0100)]
s4-client: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 20 Feb 2013 07:58:02 +0000 (08:58 +0100)]
s4-client: Don't leak resource handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 17:19:12 +0000 (18:19 +0100)]
torture: Make sure we don't overrun the buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 15:02:01 +0000 (16:02 +0100)]
torture: Fix memcmp of short buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 08:32:30 +0000 (09:32 +0100)]
torture: Fix array access in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 08:23:53 +0000 (09:23 +0100)]
pdb: Fix array overrun by one.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 08:00:51 +0000 (09:00 +0100)]
s4-libcli: Check return value of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 07:58:00 +0000 (08:58 +0100)]
pyauth: Check return value of lpcfg_from_py_object().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 19 Feb 2013 07:56:22 +0000 (08:56 +0100)]
ndrdump: Check return value of ndr_pull_init_blob().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 17:00:38 +0000 (18:00 +0100)]
s4-libcli: Check return code of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:32:28 +0000 (17:32 +0100)]
librpc: Add NULL check for ndr functions for epm bindings.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:30:19 +0000 (17:30 +0100)]
s3-tldap: Make sure we don't deref a null pointer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:26:14 +0000 (17:26 +0100)]
s4-libcli: Add null check for ndr functions in rap.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:21:31 +0000 (17:21 +0100)]
nmbd: Fix request data data processing.
answers->rdata is an array and will never be NULL.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:17:19 +0000 (17:17 +0100)]
torture: Fix samsync domain_name checks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:11:15 +0000 (17:11 +0100)]
libsmb: Fix possible null pointer dereference.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 16:08:21 +0000 (17:08 +0100)]
ndr: Comparing an array to null is always true.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 15:24:38 +0000 (16:24 +0100)]
winbind: Correctly cast name to messaging_send_buf().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 14:48:24 +0000 (15:48 +0100)]
winbind: Use uint8_t type and use const where needed.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 14:46:52 +0000 (15:46 +0100)]
messages: Use uint8_t type.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Mon, 18 Feb 2013 14:44:20 +0000 (15:44 +0100)]
winbind: Make domain_name const in wcache_ndr_key().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Björn Jacke [Tue, 19 Feb 2013 18:09:25 +0000 (19:09 +0100)]
build: use -fstack-protector if available
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Feb 22 15:38:21 CET 2013 on sn-devel-104
Björn Jacke [Tue, 19 Feb 2013 18:07:34 +0000 (19:07 +0100)]
Revert "wafbuild: use -Wstack-protector if available"
This reverts commit
e6643fbf48afccd0acedb65fbe24d3ce84d44c40.
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>
Björn Jacke [Wed, 20 Feb 2013 16:06:49 +0000 (17:06 +0100)]
build/autoconf: put ld check variable in quotes
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Mon, 11 Feb 2013 03:46:43 +0000 (14:46 +1100)]
dsdb-descriptor: Avoid segfault copying an SD without an owner or group
This is an unusual SD, but it does exist is some very old upgraded databases.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 22 11:06:17 CET 2013 on sn-devel-104
Andrew Bartlett [Mon, 11 Feb 2013 03:45:57 +0000 (14:45 +1100)]
dsdb-descriptor: Spell out security descriptor flags as constants
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Tue, 15 Jan 2013 21:52:41 +0000 (08:52 +1100)]
torture-drs: Fix comment in replica_sync test
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 7 Feb 2013 08:35:15 +0000 (19:35 +1100)]
torture-drs: Make the samba4.drs.repl_schema.python emit failures, not errors on add failure
This then allows this particular failure to be masked with a knownfail.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Fri, 15 Feb 2013 02:32:06 +0000 (13:32 +1100)]
ldb: Add missing dependency on replace for ldb
This brings in rep_timegm() on Solaris for example.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Tue, 19 Feb 2013 00:44:19 +0000 (11:44 +1100)]
build: Remove includes.h dep in winbind client libraries
Our LGPL winbind client libs do not link against our server-side code, and
should not use the server-side includes.h.
This removes a build-time dep on talloc that was brought in via includes.h as
this code also does not use talloc.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Tue, 19 Feb 2013 00:15:20 +0000 (11:15 +1100)]
build: Remove unused includes.h reference to avoid build-time talloc dep
talloc is not a dependency of this library, but is required by includes.h.
By not including includes.h, we avoid needing to add an otherwise false talloc dep.
(this comes up if talloc.h is not installed as a system package).
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Björn Jacke [Wed, 20 Feb 2013 18:57:24 +0000 (19:57 +0100)]
build:autoconf: fix output of syslog-facility check
thanks to Thomas Bork for reporting!
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 21 00:00:06 CET 2013 on sn-devel-104
Christian Ambach [Wed, 20 Feb 2013 15:59:05 +0000 (16:59 +0100)]
s3:rpc_client fix a crash
state->cli->dc does not have to be set (e.g. when running
net rpc join against an older Samba PDC), so check it before dereferencing it
This fixes Bug 9669 - net rpc join crashes against a Samba 3.0.33 PDC
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9669
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Feb 20 19:00:52 CET 2013 on sn-devel-104
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb'
Since we open with dbwrap, it auto-converts old tdbs (which it will
rename to secrets.tdb.bak once it's done).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Wed Feb 20 07:09:19 CET 2013 on sn-devel-104
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
param: 'use ntdb' flag (off by default).
For simplicity, we use this in the caller to choose between filenames.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
tdb_wrap: prevent tdbs called ".ntdb" or without extensions.
This is another belt-and-braces check in case someone decides to turn
on the fancy new .ntdb extension, and we haven't converted it to ntdb.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
dbwrap_local_open: never open the .tdb if there is an .ntdb
This provides an extra safety check that everyone is using one or the
other: you can't create a tdb file if there's an ntdb file.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
dbwrap_local_open: open NTDB if extension is .ntdb
This switches dbwrap_local_open() based on the extension of the
database name, so it handles both TDB and NTDB files.
Moreover, if asked to open a .ntdb, and there's no ntdb file but
there's a .tdb file, it converts that then moves it to .tdb.bak before
opening, and turn the .tdb file into a dangling symlink to make sure
it's never accidentally re-created or used:
$ ls -l secrets.tdb
lrwxrwxrwx 1 rusty rusty 23 Feb 11 11:31 secrets.tdb -> This is now in an NTDB
This provides transparent upgrade if people decide to use NTDB on a
database. Downgrade would be manual, eg:
ntdbdump foo.ntdb | tdbrestore foo.tdb && mv foo.ntdb foo.ntdb.bak
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)]
source3: explicitly disable NTDB support.
The next patch make dbwrap_local_open() call the ntdb backend for ntdb
files, but we don't want to add ntdb support to the old autoconf
build. It's cleaner to use the existing DISABLE_NTDB flag rather than
test for _SAMBA_BUILD_ in dbwrap_local_open.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Wed, 20 Feb 2013 04:28:59 +0000 (14:58 +1030)]
dbwrap: dbwrap_ntdb.c
This is a dbwrap backend for ntdb. It's a fairly straight conversion from
the tdb version.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Rusty Russell [Sun, 17 Feb 2013 10:26:34 +0000 (20:56 +1030)]
ntdb: fix database corruption when transaction doesn't change anything.
ntdb's transaction code has an optimization which tdb's doesnt: it
only writes the parts of blocks whose contents have changed. This
means we can actually have a transaction which turns out to need no
recovery region.
This breaks the recovery setup logic, which sets the current recovery
size to 0 if there's no recovery area, and assumes that we'll always
create a new recovery area since the recovery will always need > 0
bytes.
In fact, if we really haven't changed anything, we can skip the
transaction commit altogether: since this happens at least once with
Samba, it's worth doing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Fri, 15 Feb 2013 13:29:51 +0000 (14:29 +0100)]
s3:selftest: generate ${SELFTESTPREFIX}/subunit with the raw output
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Feb 20 01:33:50 CET 2013 on sn-devel-104
Stefan Metzmacher [Fri, 15 Feb 2013 13:23:50 +0000 (14:23 +0100)]
s3:torture: call fault_setup() to get usage backtraces
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 10:04:18 +0000 (11:04 +0100)]
s3:include: avoid TEVENT_COMPAT_DEFINES
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:57:54 +0000 (10:57 +0100)]
s3:lib: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:57:54 +0000 (10:57 +0100)]
s3:nmbd: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:57:54 +0000 (10:57 +0100)]
s3:modules: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:57:54 +0000 (10:57 +0100)]
s3:rpc_server: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:57:54 +0000 (10:57 +0100)]
s3:winbindd: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 18 Feb 2013 09:53:02 +0000 (10:53 +0100)]
s3:lib: s/event_add_fd/tevent_add_fd and s/EVENT_FD_/TEVENT_FD_
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>