sfrench/samba-autobuild/.git
9 years agotdb: Improve wording in a comment
Volker Lendecke [Wed, 24 Sep 2014 17:46:17 +0000 (19:46 +0200)]
tdb: Improve wording in a comment

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 Sep 25 00:59:16 CEST 2014 on sn-devel-104

9 years agos3:torture: in LOCAL-MESSAGING-READ3, print some messages to child
Michael Adam [Tue, 23 Sep 2014 07:52:16 +0000 (09:52 +0200)]
s3:torture: in LOCAL-MESSAGING-READ3, print some messages to child

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Sep 24 11:09:43 CEST 2014 on sn-devel-104

9 years agos3:torture: in LOCAL-MESSAGING-READ3, tell child to exit and wait
Michael Adam [Tue, 23 Sep 2014 07:51:40 +0000 (09:51 +0200)]
s3:torture: in LOCAL-MESSAGING-READ3, tell child to exit and wait

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoselftest: run smbtorture3 LOCAL-MESSAGING-FDPASS2 test
Michael Adam [Wed, 24 Sep 2014 05:19:03 +0000 (07:19 +0200)]
selftest: run smbtorture3 LOCAL-MESSAGING-FDPASS2 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:torture: work on LOCAL-MESSAGING-FDPASS2
Michael Adam [Tue, 23 Sep 2014 07:53:15 +0000 (09:53 +0200)]
s3:torture: work on LOCAL-MESSAGING-FDPASS2

- parent: fork
- parent: create up and down pipes,
- parent: pass read end of up pipe and write end of down pipe to child
- parent: write to up pipe
- child:  read from up pipe
- child:  write to down pipe
- parent: read from down pipe

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoselftest: run smbtorture3 LOCAL-MESSAGING-FDPASS1 test
Michael Adam [Mon, 22 Sep 2014 18:13:39 +0000 (20:13 +0200)]
selftest: run smbtorture3 LOCAL-MESSAGING-FDPASS1 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:torture: add test LOCAL-MESSAGING-FDPASS1
Michael Adam [Mon, 18 Aug 2014 16:20:34 +0000 (18:20 +0200)]
s3:torture: add test LOCAL-MESSAGING-FDPASS1

Verify that a process can not pass an fd to itself.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:messaging: add fds-array to messaging_send_iov()
Michael Adam [Sat, 17 May 2014 13:19:18 +0000 (15:19 +0200)]
s3:messaging: add fds-array to messaging_send_iov()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:messaging: add fds-array to message-backend send function
Michael Adam [Sat, 17 May 2014 13:16:02 +0000 (15:16 +0200)]
s3:messaging: add fds-array to message-backend send function

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:messaging: make it possible to receive a fd array from another process
Stefan Metzmacher [Tue, 24 Jun 2014 05:39:05 +0000 (07:39 +0200)]
s3:messaging: make it possible to receive a fd array from another process

In order to receive the fd array the caller needs to use
messaging_filtered_read_send/recv(). For all higher level
methods we silently close/ignore the fd array.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: add fds-array to unix_msg_send() for fd passing
Michael Adam [Sat, 17 May 2014 22:22:55 +0000 (00:22 +0200)]
s3:unix_msg: add fds-array to unix_msg_send() for fd passing

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: pass the fd array to the unix_msg recv_callback function
Stefan Metzmacher [Mon, 23 Jun 2014 15:16:32 +0000 (17:16 +0200)]
s3:unix_msg: pass the fd array to the unix_msg recv_callback function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: add fds-array to unix_dgram_send() for fd-passing
Michael Adam [Sat, 17 May 2014 22:22:19 +0000 (00:22 +0200)]
s3:unix_msg: add fds-array to unix_dgram_send() for fd-passing

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: pass the fd array to the unix_dgram recv_callback function
Stefan Metzmacher [Mon, 23 Jun 2014 15:16:32 +0000 (17:16 +0200)]
s3:unix_msg: pass the fd array to the unix_dgram recv_callback function

For now unix_msg_recv() will just close the fds, but they will be passed
to the unix_msg recv_callback in the next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: read fds from recvmsg in unix_dgram_recv_handler()
Michael Adam [Mon, 23 Jun 2014 14:47:24 +0000 (16:47 +0200)]
s3:unix_msg: read fds from recvmsg in unix_dgram_recv_handler()

For now we directly close the fds, the next commits will pass them
to the recv_callback function.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: add close_fd_array()
Stefan Metzmacher [Wed, 6 Aug 2014 10:42:41 +0000 (12:42 +0200)]
s3:unix_msg: add close_fd_array()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:unix_msg: use sendmsg() in unix_dgram_send_job()
Stefan Metzmacher [Wed, 6 Aug 2014 07:40:56 +0000 (09:40 +0200)]
s3:unix_msg: use sendmsg() in unix_dgram_send_job()

This prepares fd-passing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:messaging: use struct initializers for 'struct messaging_rec'
Stefan Metzmacher [Thu, 7 Aug 2014 07:51:57 +0000 (09:51 +0200)]
s3:messaging: use struct initializers for 'struct messaging_rec'

This makes sure new struct members will always be initialized,
without explicitly finding all users.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoctdb-logging: Add forward declaration of debug_level
Martin Schwenke [Mon, 22 Sep 2014 20:07:47 +0000 (06:07 +1000)]
ctdb-logging: Add forward declaration of debug_level

Warnings are currently produced when compiling Samba and
ctdb_private.h is included.  A forward enum declaration avoids the
warning.

This is a temporary measure.  The log ringbuffer should be removed
soon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Sep 23 10:31:50 CEST 2014 on sn-devel-104

9 years agoctdb-tests: Clean up some tests where IP movement is checked
Martin Schwenke [Fri, 12 Sep 2014 03:20:43 +0000 (13:20 +1000)]
ctdb-tests: Clean up some tests where IP movement is checked

Some of this implements logic that exists in functions.  Some of it is
overly complicated and potentially failure-prone.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Remove dependency on log ringbuffer from missing IP test
Martin Schwenke [Fri, 12 Sep 2014 05:21:49 +0000 (15:21 +1000)]
ctdb-tests: Remove dependency on log ringbuffer from missing IP test

The log ringbuffer will probably be removed.  The test can be
implemented just as reliably by checking IP assignments using "ctdb
ip".

Update wait_until_ips_are_on_node() to print a more useful log
message.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Make all_ips_on_node() do what it should
Martin Schwenke [Wed, 17 Sep 2014 10:34:39 +0000 (20:34 +1000)]
ctdb-tests: Make all_ips_on_node() do what it should

The "-n all" is wrong.

Simplify the implementation and tighten up some uses of this function.

_select_test_node_and_ips() can't use this function anymore.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Factor out new function get_test_ip_mask_and_iface()
Martin Schwenke [Fri, 12 Sep 2014 03:40:01 +0000 (13:40 +1000)]
ctdb-tests: Factor out new function get_test_ip_mask_and_iface()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Simplify and rename wait_until_ips_are_on_nodeglob()
Martin Schwenke [Fri, 12 Sep 2014 03:34:51 +0000 (13:34 +1000)]
ctdb-tests: Simplify and rename wait_until_ips_are_on_nodeglob()

The glob functionality is unsed so simplify the code by removing it.
Rename this function to wait_until_ips_are_on_node().  Update all
calls.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoWHATSNEW: some fixes
Brad Hards [Mon, 22 Sep 2014 07:42:57 +0000 (09:42 +0200)]
WHATSNEW: some fixes

Signed-off-by: Brad Hards <bradh@frogmouth.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep 23 06:54:11 CEST 2014 on sn-devel-104

9 years agolibcli: Fix a segfault calling smbXcli_req_set_pending() on NULL.
Andreas Schneider [Wed, 17 Sep 2014 13:17:50 +0000 (15:17 +0200)]
libcli: Fix a segfault calling smbXcli_req_set_pending() on NULL.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 23 04:23:05 CEST 2014 on sn-devel-104

9 years agos4:librpc: use authenticated epmapping for ncacn_http
Stefan Metzmacher [Sun, 21 Sep 2014 07:20:26 +0000 (09:20 +0200)]
s4:librpc: use authenticated epmapping for ncacn_http

We need to authenticate against the RpcProxy.
In future we could have a way to specify alternative credentials
for the RpcProxy and HttpProxy.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 23 01:34:05 CEST 2014 on sn-devel-104

9 years agolibrpc/idl: specify ncacn_http endpoint mapper endpoint
Stefan Metzmacher [Sun, 21 Sep 2014 06:38:42 +0000 (08:38 +0200)]
librpc/idl: specify ncacn_http endpoint mapper endpoint

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:rpc_server: ignore ncacn_http endpoints for now
Stefan Metzmacher [Sun, 21 Sep 2014 06:38:10 +0000 (08:38 +0200)]
s4:rpc_server: ignore ncacn_http endpoints for now

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoncacn_http: DCERPC pipe open using http transport
Samuel Cabrero [Tue, 16 Sep 2014 15:01:02 +0000 (17:01 +0200)]
ncacn_http: DCERPC pipe open using http transport

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoncacn_http: Client implementation
Samuel Cabrero [Tue, 16 Sep 2014 14:41:27 +0000 (16:41 +0200)]
ncacn_http: Client implementation

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoncacn_http: Authentication modules for http library
Samuel Cabrero [Tue, 16 Sep 2014 16:05:53 +0000 (18:05 +0200)]
ncacn_http: Authentication modules for http library

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoncacn_http: Add http library
Samuel Cabrero [Tue, 16 Sep 2014 14:12:26 +0000 (16:12 +0200)]
ncacn_http: Add http library

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos3:smbtorture: align explanations for parameters
Michael Adam [Sun, 21 Sep 2014 23:28:19 +0000 (01:28 +0200)]
s3:smbtorture: align explanations for parameters

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Sep 22 10:31:55 CEST 2014 on sn-devel-104

9 years agos3:smbtorture: mention "-e" in the help text
Michael Adam [Sun, 21 Sep 2014 23:27:33 +0000 (01:27 +0200)]
s3:smbtorture: mention "-e" in the help text

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoselftst: run the smbtorture3 local tests in the "none" environment
Michael Adam [Sun, 21 Sep 2014 23:24:49 +0000 (01:24 +0200)]
selftst: run the smbtorture3 local tests in the "none" environment

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoWHATSNEW: Mention combined CTDB
Amitay Isaacs [Mon, 22 Sep 2014 00:44:47 +0000 (10:44 +1000)]
WHATSNEW: Mention combined CTDB

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Sep 22 07:05:26 CEST 2014 on sn-devel-104

9 years agosmbd: fix a comment typo.
Michael Adam [Sun, 21 Sep 2014 07:32:53 +0000 (09:32 +0200)]
smbd: fix a comment typo.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sun Sep 21 22:43:55 CEST 2014 on sn-devel-104

9 years agos3: reset tracepoint handler in reinit_after fork.
Michael Adam [Sun, 21 Sep 2014 08:29:49 +0000 (10:29 +0200)]
s3: reset tracepoint handler in reinit_after fork.

This for instance fixes panics in the scavenger process
due to talloc stackframes not freed in order.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agoWHATSNEW: Fix typos.
Karolin Seeger [Sun, 21 Sep 2014 18:07:41 +0000 (20:07 +0200)]
WHATSNEW: Fix typos.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoWHATSNEW: Mention unix domain datagram messaging
Volker Lendecke [Sat, 20 Sep 2014 15:20:11 +0000 (17:20 +0200)]
WHATSNEW: Mention unix domain datagram messaging

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Sep 20 21:13:50 CEST 2014 on sn-devel-104

9 years agoWHATSNEW: Mention tdb mutexes
Volker Lendecke [Sat, 20 Sep 2014 15:16:49 +0000 (17:16 +0200)]
WHATSNEW: Mention tdb mutexes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoWHATSNEW: mention overhauled "net idmap" command
Michael Adam [Fri, 19 Sep 2014 23:53:28 +0000 (01:53 +0200)]
WHATSNEW: mention overhauled "net idmap" command

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Sep 20 11:37:51 CEST 2014 on sn-devel-104

9 years agoWHATSNEW: Improved DCERPC man in the middle detection
Stefan Metzmacher [Fri, 19 Sep 2014 23:29:19 +0000 (01:29 +0200)]
WHATSNEW: Improved DCERPC man in the middle detection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoWHATSNEW: Larger IO sizes for SMB2/3 per default
Stefan Metzmacher [Fri, 19 Sep 2014 23:18:53 +0000 (01:18 +0200)]
WHATSNEW: Larger IO sizes for SMB2/3 per default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoWHATSNEW: Winbindd/Netlogon improvements
Stefan Metzmacher [Fri, 19 Sep 2014 23:14:11 +0000 (01:14 +0200)]
WHATSNEW: Winbindd/Netlogon improvements

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agopassdb: Use talloc_zero_array
Volker Lendecke [Sat, 20 Sep 2014 00:08:44 +0000 (02:08 +0200)]
passdb: Use talloc_zero_array

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Sep 20 08:29:31 CEST 2014 on sn-devel-104

9 years agolib/util: Drop unnecessary use of talloc_tos()
Volker Lendecke [Fri, 19 Sep 2014 14:58:52 +0000 (16:58 +0200)]
lib/util: Drop unnecessary use of talloc_tos()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
9 years agolib/util: Return some functions to util_str.c
Martin Schwenke [Fri, 19 Sep 2014 03:42:32 +0000 (13:42 +1000)]
lib/util: Return some functions to util_str.c

These were moved in commit 8e704e4107b284bfc1e43f4c698ac0e6c5ae1800
when util_str.c was not shared.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 19 20:34:05 CEST 2014 on sn-devel-104

9 years agolib/util: Move next_token* functions to util_str.c
Martin Schwenke [Fri, 19 Sep 2014 03:30:26 +0000 (13:30 +1000)]
lib/util: Move next_token* functions to util_str.c

This is part of an attempt to untangle charset from util.c.

Most of this was moved from util_str.c in commit
55903e6f9120f1ec58a8554813229975c3028a09.  next_token() was moved from
charset to util.c in commit 4be643d4ce33d5ce2bf9deacc3f6d0fde90cf626
so that it would be alongside next_token_talloc().

Now that util_str.c is in shared lib/util it is no longer necessary to
have these in util.c.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agolib/util: Move idr_get_new_random() to new source file idtree_random.c
Martin Schwenke [Fri, 19 Sep 2014 05:01:51 +0000 (15:01 +1000)]
lib/util: Move idr_get_new_random() to new source file idtree_random.c

This function depends on genrand.c, which depends on lib/crypto.  This
way the other IDR tree code can be used without lib/crypto.

While doing this, create idtree.h and idtree_random.h and clean up the
includes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agodebug: Standalone compile without includes.h
Martin Schwenke [Mon, 8 Sep 2014 06:32:46 +0000 (16:32 +1000)]
debug: Standalone compile without includes.h

Compiling utilities with includes.h is confusing because includes.h
could come from source3, source4 or ctdb.  Utilities should be
independent of such things.

Add a minimal set of fined-grained includes that attempts to avoid the
catch-all samba_util.h.  A comment indicates what is used from
samba_util.h so that future clean-ups are easier.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agotdb_wrap: Standalone compile without includes.h
Martin Schwenke [Tue, 19 Aug 2014 02:22:00 +0000 (12:22 +1000)]
tdb_wrap: Standalone compile without includes.h

Compiling this generic code is confusing because it uses includes.h,
which could come from source3, source4 or ctdb.  Generic code should
be independent of such things.

Drop include of param.h since nothing from that file is used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agotdb_wrap: tdb_wrap.h doesn't need struct loadparm_context
Martin Schwenke [Tue, 16 Sep 2014 04:01:19 +0000 (14:01 +1000)]
tdb_wrap: tdb_wrap.h doesn't need struct loadparm_context

Not since commit d6db35d7a564ee556b74131ef4c3a3cdb8097e14.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agotdb: tdb.h needs bool type
Martin Schwenke [Tue, 16 Sep 2014 03:42:33 +0000 (13:42 +1000)]
tdb: tdb.h needs bool type

Due to introduction of tdb_runtime_check_for_robust_mutexes().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agolib/crypto: Protect crypto.h against multiple inclusion
Martin Schwenke [Wed, 10 Sep 2014 03:42:00 +0000 (13:42 +1000)]
lib/crypto: Protect crypto.h against multiple inclusion

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agocharset: Avoid compiler warnings with --enable-developer
Martin Schwenke [Wed, 10 Sep 2014 01:10:09 +0000 (11:10 +1000)]
charset: Avoid compiler warnings with --enable-developer

These:

  [ 44/309] Compiling ../lib/util/charset/util_unistr_w.c
  ../../lib/util/charset/util_unistr_w.c: In function ‘strlower_w’:
  ../../lib/util/charset/util_unistr_w.c:182:127: warning: right-hand operand of comma expression has no effect [-Wunused-value]
      COPY_UCS2_CHAR(s,&v);

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoreplace: Fix includes of unistd.h
Martin Schwenke [Fri, 29 Aug 2014 11:13:47 +0000 (21:13 +1000)]
replace: Fix includes of unistd.h

This should always be conditional.  system/passwd.h wants it too so
that uid_t is defined.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agodynconfig: Remove include of nsswitch/winbind_struct_protocol.h
Martin Schwenke [Tue, 19 Aug 2014 02:07:12 +0000 (12:07 +1000)]
dynconfig: Remove include of nsswitch/winbind_struct_protocol.h

Nothing declared in this file is used in dynconfig.c.  It appears that
WINBINDD_SOCKET_DIR used to come from there.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoutil: Fix indentation
Martin Schwenke [Wed, 6 Aug 2014 01:57:06 +0000 (11:57 +1000)]
util: Fix indentation

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agonsswitch: Skip groups we were not able to map.
Andreas Schneider [Fri, 19 Sep 2014 11:33:10 +0000 (13:33 +0200)]
nsswitch: Skip groups we were not able to map.

If we have configured the idmap_ad backend it is possible that the user
is in a group without a gid set. This will result in (uid_t)-1 as the
gid. We return this invalid gid to NSS which is wrong.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Sep 19 17:57:14 CEST 2014 on sn-devel-104

9 years agos3:torture: use cli_state_client_guid in run_smb2_multi_channel()
Stefan Metzmacher [Thu, 19 Jun 2014 23:03:38 +0000 (01:03 +0200)]
s3:torture: use cli_state_client_guid in run_smb2_multi_channel()

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): Fri Sep 19 11:40:15 CEST 2014 on sn-devel-104

9 years agos3:libsmb: add 'cli_state_client_guid'
Stefan Metzmacher [Thu, 19 Jun 2014 23:03:08 +0000 (01:03 +0200)]
s3:libsmb: add 'cli_state_client_guid'

This can be used by tests to use the same client guid for multiple connections.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_sesssetup: we don't need to do a 2nd smb2srv_session_lookup()
Stefan Metzmacher [Sun, 14 Sep 2014 22:10:11 +0000 (00:10 +0200)]
s3:smb2_sesssetup: we don't need to do a 2nd smb2srv_session_lookup()

For the continuation of a SMB2 SessionSetup we already have the
smb2req->session (with NT_STATUS_MORE_PROCESSING_REQUIRED).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_server: add smbd_smb2_signing_key() helper function
Stefan Metzmacher [Thu, 12 Jun 2014 13:31:25 +0000 (15:31 +0200)]
s3:smb2_server: add smbd_smb2_signing_key() helper function

This will find the correct signing key for the connection.

If there's already a channel session key, we need to use that
otherwise we need to use the global session key.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbXsrv_session: add smbXsrv_session_find_channel()
Stefan Metzmacher [Thu, 12 Jun 2014 11:04:40 +0000 (13:04 +0200)]
s3:smbXsrv_session: add smbXsrv_session_find_channel()

This function can check if a smbXsrv_connection is already bound to
a smbXsrv_session.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbXsrv_session: remember the smbXsrv_connection on channel attached to a session
Stefan Metzmacher [Thu, 12 Jun 2014 07:51:18 +0000 (09:51 +0200)]
s3:smbXsrv_session: remember the smbXsrv_connection on channel attached to a session

A session will be usable from multiple connections in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: split out a smbd_add_connection() helper function.
Stefan Metzmacher [Thu, 19 Jun 2014 22:31:31 +0000 (00:31 +0200)]
s3:smbd: split out a smbd_add_connection() helper function.

This attaches a smbXsrv_connection to a smbXsrv_client structure.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: remove now unused smbd_server_connection->conn
Stefan Metzmacher [Thu, 12 Jun 2014 06:43:26 +0000 (08:43 +0200)]
s3:smbd: remove now unused smbd_server_connection->conn

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_lock: iterate over all sconn->client->connections
Stefan Metzmacher [Tue, 16 Sep 2014 07:03:39 +0000 (09:03 +0200)]
s3:smb2_lock: iterate over all sconn->client->connections

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_lock: always use tevent_req_defer_callback() if we go async
Stefan Metzmacher [Tue, 16 Sep 2014 06:05:31 +0000 (08:05 +0200)]
s3:smb2_lock: always use tevent_req_defer_callback() if we go async

process_blocking_lock_queue_smb2() can call reprocess_blocked_smb2_lock()
multiple times, which results in multiple tevent_req_done() calls.

As we could disconnect the connection from there,
process_blocking_lock_queue_smb2() could crash as the local state might be
destroyed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_glue: remove chained fsps from all connections in remove_smb2_chained_fsp()
Stefan Metzmacher [Tue, 16 Sep 2014 05:50:41 +0000 (07:50 +0200)]
s3:smb2_glue: remove chained fsps from all connections in remove_smb2_chained_fsp()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_break: use fsp->conn->sconn->client->connections to send SMB2 oplock breaks
Stefan Metzmacher [Tue, 16 Sep 2014 07:23:54 +0000 (09:23 +0200)]
s3:smb2_break: use fsp->conn->sconn->client->connections to send SMB2 oplock breaks

This means we use the first connection for now.

TODO: we may need to use the connection on which the SMB2 create was done
and fallback to other connections.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_break: pass smbXsrv_connection to smbd_smb2_send_oplock_break()
Stefan Metzmacher [Tue, 16 Sep 2014 04:52:26 +0000 (06:52 +0200)]
s3:smb2_break: pass smbXsrv_connection to smbd_smb2_send_oplock_break()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_create: pass smbXsrv_connection to *deferred*_smb2
Stefan Metzmacher [Tue, 16 Sep 2014 05:49:44 +0000 (07:49 +0200)]
s3:smb2_create: pass smbXsrv_connection to *deferred*_smb2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: pass smbXsrv_connection to schedule_deferred_open_message_smb()
Stefan Metzmacher [Tue, 16 Sep 2014 05:38:44 +0000 (07:38 +0200)]
s3:smbd: pass smbXsrv_connection to schedule_deferred_open_message_smb()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: pass smbXsrv_connection to remove_deferred_open_message_smb()
Stefan Metzmacher [Tue, 16 Sep 2014 05:32:14 +0000 (07:32 +0200)]
s3:smbd: pass smbXsrv_connection to remove_deferred_open_message_smb()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: pass smbXsrv_connection to open_was_deferred()
Stefan Metzmacher [Tue, 16 Sep 2014 04:55:39 +0000 (06:55 +0200)]
s3:smbd: pass smbXsrv_connection to open_was_deferred()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: move smbXsrv_{session,tcon,open} tables to smbXsrv_client
Stefan Metzmacher [Thu, 12 Jun 2014 18:22:54 +0000 (20:22 +0200)]
s3:smbd: move smbXsrv_{session,tcon,open} tables to smbXsrv_client

These should be per client (based on the SMB >= 2.1 client_guid),
this is a preparation for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use tevent_loop_wait() in the parent smbd process.
Michael Adam [Tue, 26 Feb 2013 15:39:46 +0000 (16:39 +0100)]
s3:smbd: use tevent_loop_wait() in the parent smbd process.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:smbd: use tevent_loop_wait() in the child process event loop
Michael Adam [Tue, 26 Feb 2013 15:18:09 +0000 (16:18 +0100)]
s3:smbd: use tevent_loop_wait() in the child process event loop

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

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:smbXsrv_session: change smbXsrv_session->connection to smbXsrv_session->client
Stefan Metzmacher [Thu, 12 Jun 2014 07:30:24 +0000 (09:30 +0200)]
s3:smbXsrv_session: change smbXsrv_session->connection to smbXsrv_session->client

A session will be usable from multiple connections in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use fsp->conn->sconn->client->connections to send SMB1 oplock breaks
Stefan Metzmacher [Tue, 16 Sep 2014 07:23:54 +0000 (09:23 +0200)]
s3:smbd: use fsp->conn->sconn->client->connections to send SMB1 oplock breaks

This means we use the first and only connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use sconn->client->connections in keepalive_fn()
Stefan Metzmacher [Mon, 15 Sep 2014 02:07:43 +0000 (04:07 +0200)]
s3:smbd: use sconn->client->connections in keepalive_fn()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use sconn->client->connections in reload_services()
Stefan Metzmacher [Tue, 10 Jun 2014 13:47:26 +0000 (15:47 +0200)]
s3:smbd: use sconn->client->connections in reload_services()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: remove now unused smbXsrv_connection->sconn
Stefan Metzmacher [Thu, 12 Jun 2014 06:57:22 +0000 (08:57 +0200)]
s3:smbd: remove now unused smbXsrv_connection->sconn

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbXsrv_open: use xconn->client->sconn in smb1srv_open_table_init()
Stefan Metzmacher [Thu, 12 Jun 2014 06:57:22 +0000 (08:57 +0200)]
s3:smbXsrv_open: use xconn->client->sconn in smb1srv_open_table_init()

conn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbXsrv_session: use xconn->client->sconn in smbXsrv_session_logoff()
Stefan Metzmacher [Thu, 12 Jun 2014 06:57:22 +0000 (08:57 +0200)]
s3:smbXsrv_session: use xconn->client->sconn in smbXsrv_session_logoff()

conn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_server: use xconn->client->sconn in smbd_smb2_request_next_incoming()
Stefan Metzmacher [Wed, 11 Jun 2014 08:59:00 +0000 (10:59 +0200)]
s3:smb2_server: use xconn->client->sconn in smbd_smb2_request_next_incoming()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_server: use xconn->client->sconn in smbd_smb2_request_create()
Stefan Metzmacher [Wed, 11 Jun 2014 08:51:04 +0000 (10:51 +0200)]
s3:smb2_server: use xconn->client->sconn in smbd_smb2_request_create()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_server: use xconn->client->sconn in smbd_smb2_first_negprot()
Stefan Metzmacher [Wed, 11 Jun 2014 08:42:01 +0000 (10:42 +0200)]
s3:smb2_server: use xconn->client->sconn in smbd_smb2_first_negprot()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_server: use xconn->client->sconn in smbd_smb2_io_handler()
Stefan Metzmacher [Tue, 10 Jun 2014 18:20:58 +0000 (20:20 +0200)]
s3:smb2_server: use xconn->client->sconn in smbd_smb2_io_handler()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use xconn->client->sconn in make_connection_snum()
Stefan Metzmacher [Mon, 15 Sep 2014 23:03:31 +0000 (01:03 +0200)]
s3:smbd: use xconn->client->sconn in make_connection_snum()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use xconn->client->sconn in smb1_parse_chain()
Stefan Metzmacher [Wed, 11 Jun 2014 10:54:47 +0000 (12:54 +0200)]
s3:smbd: use xconn->client->sconn in smb1_parse_chain()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use xconn->client->sconn in construct_reply()
Stefan Metzmacher [Wed, 11 Jun 2014 10:54:47 +0000 (12:54 +0200)]
s3:smbd: use xconn->client->sconn in construct_reply()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use xconn->client->sconn in reply_special()
Stefan Metzmacher [Wed, 11 Jun 2014 10:54:47 +0000 (12:54 +0200)]
s3:smbd: use xconn->client->sconn in reply_special()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: use xconn->client->sconn in process_smb()
Stefan Metzmacher [Wed, 11 Jun 2014 08:40:42 +0000 (10:40 +0200)]
s3:smbd: use xconn->client->sconn in process_smb()

xconn->sconn will go away soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: introduce 'struct smbXsrv_client' in order to prepare multi-channel support
Stefan Metzmacher [Tue, 20 May 2014 17:47:13 +0000 (19:47 +0200)]
s3:smbd: introduce 'struct smbXsrv_client' in order to prepare multi-channel support

This structure is supposed to hold the global state shared between
multiple connections from the same client.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: pass smbXsrv_connection to make_connection_snum()
Stefan Metzmacher [Mon, 15 Sep 2014 01:47:41 +0000 (03:47 +0200)]
s3:smbd: pass smbXsrv_connection to make_connection_snum()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:smbd: pass smb_request to make_connection_smb1()
Stefan Metzmacher [Mon, 15 Sep 2014 01:47:41 +0000 (03:47 +0200)]
s3:smbd: pass smb_request to make_connection_smb1()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>