samba.git
10 years agotevent: version 0.9.20 tevent-0.9.20
Stefan Metzmacher [Fri, 27 Sep 2013 02:06:00 +0000 (04:06 +0200)]
tevent: version 0.9.20

This adds the following new features:

- tevent_queue_wait_send/recv()
- tevent_num_signals()
- tevent_sa_info_queue_count()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 12 00:39:35 CET 2013 on sn-devel-104

10 years agotevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and TEVENT_SA_INFO_QUE...
Stefan Metzmacher [Mon, 9 Dec 2013 09:32:00 +0000 (10:32 +0100)]
tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and TEVENT_SA_INFO_QUEUE_COUNT

This way the caller can change use the supported limits without using hardcoded
values.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256
Stefan Metzmacher [Mon, 9 Dec 2013 09:29:45 +0000 (10:29 +0100)]
tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256

There are some existing callers which assume the old
SA_INFO_QUEUE_COUNT 100 value.

256 should give room for the future.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: tevent_epoll_set_panic_fallback() can be a void function
Stefan Metzmacher [Wed, 11 Dec 2013 17:58:41 +0000 (18:58 +0100)]
tevent: tevent_epoll_set_panic_fallback() can be a void function

There's no case where this could return an error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: make use of talloc_get_type_abort() in tevent_epoll.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_epoll.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: make use of talloc_get_type_abort() in tevent_signal.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_signal.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: make use of talloc_get_type_abort() in tevent_select.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_select.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: make use of talloc_get_type_abort() in tevent_req.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_req.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: make use of talloc_get_type_abort() in tevent_queue.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_queue.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: use talloc_get_type_abort() in the documentation examples
Stefan Metzmacher [Thu, 5 Dec 2013 07:46:47 +0000 (08:46 +0100)]
tevent: use talloc_get_type_abort() in the documentation examples

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: add tevent_queue_wait_send/recv()
Gregor Beck [Thu, 19 Sep 2013 13:14:25 +0000 (15:14 +0200)]
tevent: add tevent_queue_wait_send/recv()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: tevent_req_create() already uses ZERO_STRUCT(req)
Stefan Metzmacher [Fri, 27 Sep 2013 01:02:24 +0000 (03:02 +0200)]
tevent: tevent_req_create() already uses ZERO_STRUCT(req)

There's no need to zero individual members.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: let tevent_req_received() clear the private_cancel function
Stefan Metzmacher [Fri, 27 Sep 2013 00:59:22 +0000 (02:59 +0200)]
tevent: let tevent_req_received() clear the private_cancel function

This makes sure it's not called when the private state is already gone.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: cancel the timeout timer when the request is finished
Stefan Metzmacher [Sat, 17 Sep 2011 17:53:55 +0000 (19:53 +0200)]
tevent: cancel the timeout timer when the request is finished

As we might defer the callback with tevent_req_defer_callback()
when calling tevent_req_done(), we should cancel the timeout directly.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos3/rpc_server: don't unmarshall PDUs twice
David Disseldorp [Tue, 10 Dec 2013 12:59:06 +0000 (13:59 +0100)]
s3/rpc_server: don't unmarshall PDUs twice

DCE/RPC PDUs are currently unmarshalled firstly by the generic librpc
dcerpc_read_ncacn_packet_[send/recv] functions, and subsequently a
second time by the source3 rpc_server, which ignores the unmarshalled
packet and re-parses the receive buffer.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Dec 11 22:24:31 CET 2013 on sn-devel-104

10 years agoshadow_copy2: add a comment explaining why we don't talloc_zero_array().
Michael Adam [Wed, 11 Dec 2013 08:41:38 +0000 (09:41 +0100)]
shadow_copy2: add a comment explaining why we don't talloc_zero_array().

Since I stumbled over this slighly sublte point, I thought it is
worthwile to point it our in a comment.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Dec 11 19:55:20 CET 2013 on sn-devel-104

10 years agoshadow_copy2: revert expensive and unnecessary zero-initialization
Michael Adam [Wed, 11 Dec 2013 08:34:47 +0000 (09:34 +0100)]
shadow_copy2: revert expensive and unnecessary zero-initialization

I was being overly cautious. This is initialization is not
necessary, since further down in the for-loop, the memory
always gets fully initialized because the insert string is
inserted at various slash positions.

So this talloc_zero_array can be skipped: this an expensive
thing to do in virtually every VFS call.

This essentially reverts commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolib:util: fix a comment typo
Michael Adam [Wed, 11 Dec 2013 16:47:36 +0000 (17:47 +0100)]
lib:util: fix a comment typo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3: use directory_create_or_exist_strict() to create corepath
Gregor Beck [Mon, 22 Apr 2013 11:33:00 +0000 (13:33 +0200)]
s3: use directory_create_or_exist_strict() to create corepath

This simplifies the code and even works in testenv where the chown call
fails.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest: pass -l logdir to daemon processes.
Gregor Beck [Mon, 22 Apr 2013 10:35:01 +0000 (12:35 +0200)]
selftest: pass -l logdir to daemon processes.

The daemons try to set up the corefile path within logdir before the config
file was read.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest: use MALLOC_CHECK_=3 to give a diagnostic on failure
Gregor Beck [Wed, 20 Mar 2013 09:58:22 +0000 (10:58 +0100)]
selftest: use MALLOC_CHECK_=3 to give a diagnostic on failure

With MALLOC_CHECK_ set to 2 in case of a failure abort() is called
silently which hopefully creates a core dump.
MALLOC_CHECK_=3 additionally gives an error message on stderr in case.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest: set valgrind options
Gregor Beck [Wed, 20 Mar 2013 09:36:37 +0000 (10:36 +0100)]
selftest: set valgrind options

In particular '--db-attach' interferes badly with the io redirection of the
test environment and is superseded by the vgdb feature of valgrind.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest: setup {NMBD,WINBINDD,SMBD}_VALGRIND
Stefan Metzmacher [Tue, 19 Mar 2013 14:44:02 +0000 (15:44 +0100)]
selftest: setup {NMBD,WINBINDD,SMBD}_VALGRIND

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest/Samba3: export ENVNAME
Stefan Metzmacher [Tue, 19 Mar 2013 14:43:12 +0000 (15:43 +0100)]
selftest/Samba3: export ENVNAME

This is used by selftest/in_screen.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agodocs: Fix typos in vfs_shadow_copy2.8.xml.
Karolin Seeger [Tue, 10 Dec 2013 14:24:31 +0000 (15:24 +0100)]
docs: Fix typos in vfs_shadow_copy2.8.xml.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Dec 10 18:49:21 CET 2013 on sn-devel-104

10 years agos3-lib: Fix %G substitution for domain users in smbd
Andreas Schneider [Wed, 27 Nov 2013 16:21:01 +0000 (17:21 +0100)]
s3-lib: Fix %G substitution for domain users in smbd

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10286
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Tue Dec 10 16:39:43 CET 2013 on sn-devel-104

10 years agos3:winbindd fix use of uninitialized variables
Christian Ambach [Mon, 16 Sep 2013 11:18:17 +0000 (13:18 +0200)]
s3:winbindd fix use of uninitialized variables

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10280

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3:lib/asys modify included headers
Christian Ambach [Fri, 22 Nov 2013 04:12:05 +0000 (05:12 +0100)]
s3:lib/asys modify included headers

use the headers from libreplace, not the system ones

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agosmbd: Always use UCF_PREP_CREATEFILE for filename_convert calls to resolve a path...
Jeremy Allison [Tue, 3 Dec 2013 18:21:16 +0000 (10:21 -0800)]
smbd: Always use UCF_PREP_CREATEFILE for filename_convert calls to resolve a path for open.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Dec  9 21:02:21 CET 2013 on sn-devel-104

10 years agosmbd: change flag name from UCF_CREATING_FILE to UCF_PREP_CREATEFILE
Jeremy Allison [Tue, 3 Dec 2013 18:19:09 +0000 (10:19 -0800)]
smbd: change flag name from UCF_CREATING_FILE to UCF_PREP_CREATEFILE

In preparation to using it for all open calls.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agosmbd: Fix regression for the dropbox case.
Volker Lendecke [Tue, 3 Dec 2013 12:20:17 +0000 (13:20 +0100)]
smbd: Fix regression for the dropbox case.

We need to allow to save a file to a directory with perm -wx.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-winbindd: Fix DEBUG statement in winbind_msg_offline().
Jan Brummer [Mon, 9 Dec 2013 14:22:29 +0000 (15:22 +0100)]
s3-winbindd: Fix DEBUG statement in winbind_msg_offline().

Guenther

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10285

Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Dec  9 17:28:37 CET 2013 on sn-devel-104

10 years agoCVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.
Jeremy Allison [Fri, 8 Nov 2013 06:41:22 +0000 (22:41 -0800)]
CVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Dec  9 09:00:41 CET 2013 on sn-devel-104

10 years agoCVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.
Jeremy Allison [Fri, 8 Nov 2013 05:40:55 +0000 (21:40 -0800)]
CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.
Jeremy Allison [Fri, 8 Nov 2013 04:38:01 +0000 (20:38 -0800)]
CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s3:Ensure we always check call_id when validating an RPC reply.
Jeremy Allison [Thu, 17 Oct 2013 21:44:35 +0000 (14:44 -0700)]
CVE-2013-4408:s3:Ensure we always check call_id when validating an RPC reply.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoCVE-2013-4408:s3:ctdb_conn: add some length verification to ctdb_packet_more()
Stefan Metzmacher [Wed, 16 Oct 2013 14:26:58 +0000 (16:26 +0200)]
CVE-2013-4408:s3:ctdb_conn: add some length verification to ctdb_packet_more()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:libcli/util: add some size verification to tstream_read_pdu_blob_done()
Stefan Metzmacher [Wed, 16 Oct 2013 12:17:49 +0000 (14:17 +0200)]
CVE-2013-4408:libcli/util: add some size verification to tstream_read_pdu_blob_done()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s3:util_tsock: add some overflow detection to tstream_read_packet_done()
Stefan Metzmacher [Wed, 16 Oct 2013 12:17:49 +0000 (14:17 +0200)]
CVE-2013-4408:s3:util_tsock: add some overflow detection to tstream_read_packet_done()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()
Stefan Metzmacher [Wed, 16 Oct 2013 12:17:49 +0000 (14:17 +0200)]
CVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s4:dcerpc_sock: check for invalid frag_len within sock_complete_packet()
Stefan Metzmacher [Tue, 24 Sep 2013 03:03:40 +0000 (05:03 +0200)]
CVE-2013-4408:s4:dcerpc_sock: check for invalid frag_len within sock_complete_packet()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()
Stefan Metzmacher [Wed, 25 Sep 2013 21:25:12 +0000 (23:25 +0200)]
CVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s4:dcerpc_smb: check for invalid frag_len in send_read_request_continue()
Stefan Metzmacher [Wed, 25 Sep 2013 21:25:12 +0000 (23:25 +0200)]
CVE-2013-4408:s4:dcerpc_smb: check for invalid frag_len in send_read_request_continue()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s4:dcerpc: check for invalid frag_len in ncacn_pull()
Stefan Metzmacher [Wed, 25 Sep 2013 21:25:12 +0000 (23:25 +0200)]
CVE-2013-4408:s4:dcerpc: check for invalid frag_len in ncacn_pull()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s3:rpc_client: verify frag_len at least contains the header size
Stefan Metzmacher [Wed, 25 Sep 2013 21:25:12 +0000 (23:25 +0200)]
CVE-2013-4408:s3:rpc_client: verify frag_len at least contains the header size

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:s3:rpc_client: check for invalid frag_len in dcerpc_pull_ncacn_packet()
Stefan Metzmacher [Wed, 25 Sep 2013 21:25:12 +0000 (23:25 +0200)]
CVE-2013-4408:s3:rpc_client: check for invalid frag_len in dcerpc_pull_ncacn_packet()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_next...
Stefan Metzmacher [Tue, 24 Sep 2013 03:03:40 +0000 (05:03 +0200)]
CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_next_vector()

We should do this explicit instead of relying on
tstream_readv_pdu_ask_for_next_vector() to catch the overflow.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoCVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_done()
Stefan Metzmacher [Tue, 24 Sep 2013 03:03:40 +0000 (05:03 +0200)]
CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_done()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoctdb:packaging:RPM: don't run autogen.
Michael Adam [Fri, 6 Dec 2013 00:37:34 +0000 (01:37 +0100)]
ctdb:packaging:RPM: don't run autogen.

autogen is already run in maketarball.sh which generates
the tarball for the RPM.

This way, we don't have a rpm build dependency on autoconf.
Recent changes introduced a dependency into autoconf
version >= 2.60, so this fix allows the generated
source RPM to be built also on older platforms.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Dec  9 05:47:00 CET 2013 on sn-devel-104

10 years agoctdb:packaging:RPM: package the new manpages
Michael Adam [Fri, 6 Dec 2013 00:33:57 +0000 (01:33 +0100)]
ctdb:packaging:RPM: package the new manpages

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb:build: install the new manpages
Michael Adam [Fri, 6 Dec 2013 00:31:11 +0000 (01:31 +0100)]
ctdb:build: install the new manpages

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agolib/ntdb optimize includes in ntdb tools
Christian Ambach [Fri, 22 Nov 2013 04:19:16 +0000 (05:19 +0100)]
lib/ntdb optimize includes in ntdb tools

use the private header (which will use libreplace or system headers)
instead of direct includes of system includes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sat Dec  7 18:38:21 CET 2013 on sn-devel-104

10 years agolib/ntdb optimize includes in ntdb tests
Christian Ambach [Fri, 22 Nov 2013 04:18:36 +0000 (05:18 +0100)]
lib/ntdb optimize includes in ntdb tests

use the private header (which will use libreplace or system headers)
instead of direct includes of system includes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
10 years agolib/ntdb correct includes in private header
Christian Ambach [Fri, 22 Nov 2013 04:17:38 +0000 (05:17 +0100)]
lib/ntdb correct includes in private header

include all necessary headers when libreplace is not around

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
10 years agolib/ntdb fix compilation when libreplace is not around
Christian Ambach [Fri, 22 Nov 2013 04:15:59 +0000 (05:15 +0100)]
lib/ntdb fix compilation when libreplace is not around

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
10 years agolib/socket_wrapper fix compilation when libreplace is not around
Christian Ambach [Fri, 22 Nov 2013 04:15:13 +0000 (05:15 +0100)]
lib/socket_wrapper fix compilation when libreplace is not around

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
10 years agos3:vfs_btrfs change includes
Christian Ambach [Fri, 22 Nov 2013 04:13:17 +0000 (05:13 +0100)]
s3:vfs_btrfs change includes

use the ones from libreplace instead of system ones

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
10 years agos3:pam_smbpass change includes
Christian Ambach [Fri, 22 Nov 2013 04:13:56 +0000 (05:13 +0100)]
s3:pam_smbpass change includes

use the ones from libreplace instead of system ones

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
10 years agos3:vfs fix a compile warning
Christian Ambach [Wed, 4 Dec 2013 21:50:31 +0000 (22:50 +0100)]
s3:vfs fix a compile warning

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Dec  7 14:20:43 CET 2013 on sn-devel-104

10 years agoldb: bad if test in ldb_comparison_fold()
Jeremy Allison [Fri, 6 Dec 2013 23:58:02 +0000 (15:58 -0800)]
ldb: bad if test in ldb_comparison_fold()

Found by David Binderman <dcb314@hotmail.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Dec  7 11:10:47 CET 2013 on sn-devel-104

10 years agodocs: update the manpage of vfs_shadow_copy2
Michael Adam [Wed, 4 Dec 2013 09:27:24 +0000 (10:27 +0100)]
docs: update the manpage of vfs_shadow_copy2

Document the configuration and all the options
available for the shadow_copy2 module.

Pair-Programmed-With: Björn Baumbach <bb@sernet.de>

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): Fri Dec  6 22:26:31 CET 2013 on sn-devel-104

10 years agos3:modules:shadow_copy2: remove redundant documentation comment block
Michael Adam [Wed, 4 Dec 2013 14:55:19 +0000 (15:55 +0100)]
s3:modules:shadow_copy2: remove redundant documentation comment block

and refer to the manual page instead

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:modules:shadow_copy2: improve headline comment
Michael Adam [Wed, 4 Dec 2013 14:50:26 +0000 (15:50 +0100)]
s3:modules:shadow_copy2: improve headline comment

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:module:shadow_copy2: add my (C)
Michael Adam [Wed, 4 Dec 2013 12:40:14 +0000 (13:40 +0100)]
s3:module:shadow_copy2: add my (C)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:torture:smb2: add new durable-v2-open.reopen1a test
Michael Adam [Fri, 29 Nov 2013 17:45:35 +0000 (18:45 +0100)]
s4:torture:smb2: add new durable-v2-open.reopen1a test

- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Dec  6 15:59:15 CET 2013 on sn-devel-104

10 years agos4:torture:smb2: add new durable-open.reopen1a test
Michael Adam [Fri, 29 Nov 2013 17:20:01 +0000 (18:20 +0100)]
s4:torture:smb2: add new durable-open.reopen1a test

- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agocldap: quieten error when abandon packet is sent
Garming Sam [Wed, 4 Dec 2013 22:53:14 +0000 (11:53 +1300)]
cldap: quieten error when abandon packet is sent

The specification indicates that no response needs to be sent when receiving
an abandon request packet.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Dec  6 07:13:29 CET 2013 on sn-devel-104

10 years agopyntdb: Add tests for Python API.
Jelmer Vernooij [Sun, 1 Dec 2013 23:20:36 +0000 (23:20 +0000)]
pyntdb: Add tests for Python API.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agopyntdb: Don't segfault when passing in None as filename (for memory db)
Jelmer Vernooij [Sun, 1 Dec 2013 23:20:35 +0000 (23:20 +0000)]
pyntdb: Don't segfault when passing in None as filename (for memory db)

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agopyntdb: Don't allow access after a database is closed.
Jelmer Vernooij [Sun, 1 Dec 2013 23:20:34 +0000 (23:20 +0000)]
pyntdb: Don't allow access after a database is closed.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb tests: Remove custom code for "tdb2", which has been split out into ntdb.
Jelmer Vernooij [Sun, 1 Dec 2013 23:20:33 +0000 (23:20 +0000)]
tdb tests: Remove custom code for "tdb2", which has been split out into ntdb.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: Remove samba3.smb2.lock.*.rw-exclusive from flapping file
Christof Schmitt [Thu, 5 Dec 2013 22:53:47 +0000 (15:53 -0700)]
selftest: Remove samba3.smb2.lock.*.rw-exclusive from flapping file

This test demonstrates a problem with byte range locks and AIO.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec  6 05:19:37 CET 2013 on sn-devel-104

10 years agoselftest: Run smb2.lock tests also against AIO share
Christof Schmitt [Thu, 5 Dec 2013 22:22:13 +0000 (15:22 -0700)]
selftest: Run smb2.lock tests also against AIO share

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoselftest: Introduce share for testing AIO
Christof Schmitt [Thu, 5 Dec 2013 22:20:06 +0000 (15:20 -0700)]
selftest: Introduce share for testing AIO

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3: Return correct error code from SMB2 AIO read failure
Christof Schmitt [Thu, 5 Dec 2013 23:20:26 +0000 (16:20 -0700)]
s3: Return correct error code from SMB2 AIO read failure

This is similar to commit 27e20d5d60ea8aa526bcb7c2dfc18dd2de0bb97b which
fixed the same case for SMB2 writes: When sending the AIO read fails,
return the real error instead of mapping it to NT_STATUS_FILE_CLOSED.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-aio: Use correct locking context for SMB2
Christof Schmitt [Thu, 5 Dec 2013 22:57:54 +0000 (15:57 -0700)]
s3-aio: Use correct locking context for SMB2

The synchronous SMB2 reads and writes use open_persistent_id. The AIO
codepathes have to use the same, otherwise a write will conflict with a
lock on the same open file.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-torture: Call cli_flush().
Andreas Schneider [Wed, 4 Dec 2013 13:02:00 +0000 (14:02 +0100)]
s3-torture: Call cli_flush().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Dec  6 03:07:32 CET 2013 on sn-devel-104

10 years agokrb5_wrap: Move function declaration outside the function.
Andreas Schneider [Wed, 4 Dec 2013 13:01:59 +0000 (14:01 +0100)]
krb5_wrap: Move function declaration outside the function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3-libsmb: Fix a memory leak in get_pdc_ip().
Andreas Schneider [Wed, 4 Dec 2013 13:01:58 +0000 (14:01 +0100)]
s3-libsmb: Fix a memory leak in get_pdc_ip().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3-torture: Make sure status is used initialized.
Andreas Schneider [Wed, 4 Dec 2013 13:01:57 +0000 (14:01 +0100)]
s3-torture: Make sure status is used initialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3-torture: Fix several memory leaks in delete_fn().
Andreas Schneider [Wed, 4 Dec 2013 13:01:56 +0000 (14:01 +0100)]
s3-torture: Fix several memory leaks in delete_fn().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3-utils: Fix a memory leak in smbget.
Andreas Schneider [Wed, 4 Dec 2013 13:01:55 +0000 (14:01 +0100)]
s3-utils: Fix a memory leak in smbget.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Use talloc for asprintf.
Andreas Schneider [Wed, 4 Dec 2013 13:01:54 +0000 (14:01 +0100)]
s4-torture: Use talloc for asprintf.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Fix out of bound array access.
Andreas Schneider [Wed, 4 Dec 2013 13:01:53 +0000 (14:01 +0100)]
s4-torture: Fix out of bound array access.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3-torture: Comment out dead code in spoolss test.
Andreas Schneider [Wed, 4 Dec 2013 13:01:52 +0000 (14:01 +0100)]
s3-torture: Comment out dead code in spoolss test.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Fix some compile warnings in spoolss.
Andreas Schneider [Wed, 4 Dec 2013 13:01:51 +0000 (14:01 +0100)]
s4-torture: Fix some compile warnings in spoolss.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Make sure handles are correctly initialized.
Andreas Schneider [Wed, 4 Dec 2013 13:01:50 +0000 (14:01 +0100)]
s4-torture: Make sure handles are correctly initialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Make sure the handles are initialized correctly.
Andreas Schneider [Wed, 4 Dec 2013 13:01:49 +0000 (14:01 +0100)]
s4-torture: Make sure the handles are initialized correctly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-torture: Make sure the handles are not used uninitialized.
Andreas Schneider [Wed, 4 Dec 2013 13:01:48 +0000 (14:01 +0100)]
s4-torture: Make sure the handles are not used uninitialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos4-libcli: Add smb2_util_handle_empty().
Andreas Schneider [Wed, 4 Dec 2013 13:01:47 +0000 (14:01 +0100)]
s4-libcli: Add smb2_util_handle_empty().

Will be used in the next commit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agotorture: match Windows responses to bad shadow copy IDs
David Disseldorp [Thu, 5 Dec 2013 19:12:53 +0000 (20:12 +0100)]
torture: match Windows responses to bad shadow copy IDs

test_fsrvp_bad_id() issues DeleteShareMapping requests with invalid
shadow copy IDs, expect Windows Server 2012 return codes.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agotorture: test duplicate shares in FSRVP shadow-copy set
David Disseldorp [Thu, 5 Dec 2013 19:12:52 +0000 (20:12 +0100)]
torture: test duplicate shares in FSRVP shadow-copy set

MS-FSRVP 3.1.4.4 documents the requirement for failure when duplicate
volume names are encountered on AddToShadowCopySet.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Fix a panic when a smb2 brlock times out
Volker Lendecke [Thu, 5 Dec 2013 14:50:58 +0000 (15:50 +0100)]
smbd: Fix a panic when a smb2 brlock times out

Found by Peter Somogyi.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec  5 21:21:35 CET 2013 on sn-devel-104

10 years agosmbtorture: New torture test for bug #9870.
Jeremy Allison [Wed, 4 Dec 2013 01:26:26 +0000 (17:26 -0800)]
smbtorture: New torture test for bug #9870.

Not fetching the latest modification time on a folder if we have read locks on it.

Prove we should just rely on the mtime value from the underlying
filesystem, even with an open handle.

  BUG: https://bugzilla.samba.org/show_bug.cgi?id=9870

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Dec  5 10:05:06 CET 2013 on sn-devel-104

10 years agosmbd - allow updates on directory write times on open handles.
Jeremy Allison [Wed, 4 Dec 2013 01:22:19 +0000 (17:22 -0800)]
smbd - allow updates on directory write times on open handles.

If we set a non-null 'old timestamp' in the share mode database
when creating a directory handle, this prevents mtime (write time)
updates from being seen by clients, as we will always return the
timestamp stored in the database whilst the handle is open.

For files this is ok, as we update the stored timestamp
ourselves when we write to the handle. For directories
we should just rely on the mtime value from the underlying
filesystem.

Torture test to follow.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9870

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agoidmap_cache: Use gencache_parse
Volker Lendecke [Wed, 4 Dec 2013 15:37:21 +0000 (15:37 +0000)]
idmap_cache: Use gencache_parse

This avoids a few tallocs and brings down user CPU a bit more

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec  5 03:06:10 CET 2013 on sn-devel-104

10 years agoidmap_cache: Use an fstring instead of talloc_asprintf
Volker Lendecke [Wed, 4 Dec 2013 15:14:03 +0000 (15:14 +0000)]
idmap_cache: Use an fstring instead of talloc_asprintf

In a test doing one million uid2sid calls this brings down user CPU from
1.3 seconds to 0.9 seconds. And it saves a few code lines.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agomessaging3: Do not go through messages.tdb for self-sends
Volker Lendecke [Tue, 3 Dec 2013 13:20:38 +0000 (13:20 +0000)]
messaging3: Do not go through messages.tdb for self-sends

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agotorture: enum snapshots after FSRVP creation
David Disseldorp [Tue, 3 Dec 2013 13:45:50 +0000 (14:45 +0100)]
torture: enum snapshots after FSRVP creation

Issue an SMB2 ENUM_SNAPSHOTS ioctl following FSRVP snapshot creation to
cover Explorer previous file version use-cases.

This test will fail against Windows Server 2012, as FSRVP created
snapshots are not exposed via the ENUM_SNAPSHOTS ioctl.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agotest: add fake_snap.pl for snapshot simulation
David Disseldorp [Tue, 3 Dec 2013 13:45:49 +0000 (14:45 +0100)]
test: add fake_snap.pl for snapshot simulation

The script simulates snapshots by simply copying file data from the base
path to a snapshot path located under .snapshots/@GMT-%Y.%m.%d-%H.%M.%S/

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>