abartlet/samba.git/.git
6 years agoselftest: Clear environment before each provision jamie-selftest-clean-envs-for-provision
Jamie McClymont [Mon, 29 Jan 2018 05:59:34 +0000 (18:59 +1300)]
selftest: Clear environment before each provision

Currently, if an environment is being provisioned after a test which used
ad_member_rfc2307, the provisioning process has all of the following in its
environment:

{
'DC_NETBIOSNAME'               => 'LOCALDC',
'DC_PASSWORD'                  => 'locDCpass1',
'DC_SERVER_IP'                 => '127.0.0.21',
'DC_SERVER_IPV6'               => 'fd00:0000:0000:0000:0000:0000:5357:5f15',
'DC_SERVER'                    => 'localdc',
'DC_USERNAME'                  => 'Administrator',
'DOMAIN'                       => 'SAMBADOMAIN',
'LOCAL_PATH'                   => '/.../st/ad_member_rfc2307/share',
'LOCK_DIR'                     => '/.../st/ad_member_rfc2307/lockdir',
'NETBIOSNAME'                  => 'RFC2307MEMBER',
'NMBD_SOCKET_DIR'              => '/.../st/ad_member_rfc2307/nmbd',
'NSS_WRAPPER_GROUP'            => '/.../st/ad_member_rfc2307/private/group',
'NSS_WRAPPER_HOSTNAME'         => 'rfc2307member.samba.example.com',
'NSS_WRAPPER_HOSTS'            => '/.../st/hosts',
'NSS_WRAPPER_MODULE_FN_PREFIX' => 'winbind',
'NSS_WRAPPER_MODULE_SO_PATH'   => '/.../bin/default/nsswitch/libnss-wrapper-winbind.so',
'NSS_WRAPPER_PASSWD'           => '/.../st/ad_member_rfc2307/private/passwd',
'PASSWORD'                     => 'loCalMemberPass',
'REALM'                        => 'SAMBA.EXAMPLE.COM',
'RESOLV_WRAPPER_HOSTS'         => '/.../st/dns_host_file',
'SELFTEST_WINBINDD_SOCKET_DIR' => '/.../st/ad_member_rfc2307/winbindd',
'SERVER_IP'                    => '127.0.0.34',
'SERVER_IPV6'                  => 'fd00:0000:0000:0000:0000:0000:5357:5f22',
'SERVER'                       => 'RFC2307MEMBER',
'USERID'                       => '55668',
'USERNAME'                     => 'jamiemcclymont',
}

Unsurprisingly, some of these can cause issues for the provisioning process, if
a reduced subset of tests is being run which causes the provision to encounter
never-before-seen pairs of adjacent environments.

For example, a run with only
TESTS='--include-env=vampire_dc --include-env=ad_member_rfc2307'
would fail to start up the vampire_dc with:
Could not find machine account in secrets database:
Failed to fetch machine account password from secrets.ldb:
Could not find entry to match filter:
'(&(flatname=SAMBADOMAIN)(objectclass=primaryDomain))' base: 'cn=Primary Domains': No such object: dsdb_search at ../source4/dsdb/common/util.c:4641

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
6 years agoRevert "ctdb-tests: Add a UNIT pseudo-test-suite"
Jamie McClymont [Mon, 29 Jan 2018 23:40:25 +0000 (12:40 +1300)]
Revert "ctdb-tests: Add a UNIT pseudo-test-suite"

This reverts commit 50150d75814de6a1e2cb28fb7af72caa31d73e3c.

6 years agoRevert "ctdb-tests: Fix a typo"
Jamie McClymont [Mon, 29 Jan 2018 23:40:20 +0000 (12:40 +1300)]
Revert "ctdb-tests: Fix a typo"

This reverts commit 8b82d10856160d3b3f172bf7d45ac561002dbcac.

6 years agonsswitch: fix wbinfo -m --verbose trust type "Local"
Ralph Boehme [Thu, 1 Mar 2018 10:43:39 +0000 (11:43 +0100)]
nsswitch: fix wbinfo -m --verbose trust type "Local"

Remove wrong "Local" strcmp(), there's another one, the correct one, a few lines
below. Since commit 95e3307917b5731ab883ee5fce530c5b559b4934
WBC_DOMINFO_TRUSTTYPE_NONE, which corresponded to the string "None" in the
winbindd response, is not used anymore.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar  2 05:49:18 CET 2018 on sn-devel-144

6 years agos3:smbd: Do not crash if we fail to init the session table
Andreas Schneider [Mon, 19 Feb 2018 17:07:50 +0000 (18:07 +0100)]
s3:smbd: Do not crash if we fail to init the session table

This should the following segfault with SMB1:

  #6  sig_fault (sig=<optimized out>) at ../lib/util/fault.c:94
  #7  <signal handler called>
  #8  smbXsrv_session_create (conn=conn@entry=0x5654d3512af0, now=now@entry=131594481900356690, _session=_session@entry=0x7ffc93a778e8)
      at ../source3/smbd/smbXsrv_session.c:1212
  #9  0x00007f7618aa21ef in reply_sesssetup_and_X (req=req@entry=0x5654d35174b0) at ../source3/smbd/sesssetup.c:961
  #10 0x00007f7618ae17b0 in switch_message (type=<optimized out>, req=req@entry=0x5654d35174b0) at ../source3/smbd/process.c:1726
  #11 0x00007f7618ae3550 in construct_reply (deferred_pcd=0x0, encrypted=false, seqnum=0, unread_bytes=0, size=140, inbuf=0x0, xconn=0x5654d35146d0)
      at ../source3/smbd/process.c:1762
  #12 process_smb (xconn=xconn@entry=0x5654d3512af0, inbuf=<optimized out>, nread=140, unread_bytes=0, seqnum=0, encrypted=<optimized out>,
      deferred_pcd=deferred_pcd@entry=0x0) at ../source3/smbd/process.c:2008
  #13 0x00007f7618ae4c41 in smbd_server_connection_read_handler (xconn=0x5654d3512af0, fd=40) at ../source3/smbd/process.c:2608
  #14 0x00007f761587eedb in epoll_event_loop_once () from /lib64/libtevent.so.0

Inspection the core shows that:
  conn->client-session_table is NULL
  conn->protocol is PROTOCOL_NONE

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibsmb: Use smb2 tcon if conn_protocol >= SMB2_02
Dan Robertson [Thu, 22 Feb 2018 20:47:11 +0000 (20:47 +0000)]
libsmb: Use smb2 tcon if conn_protocol >= SMB2_02

When the connection protocol is SMB2 the tid from the smb1 member is
used instead of smb2 in cli_state_set_tid which often results in a null
deref.

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

Signed-off-by: Dan Robertson <drobertson@tripwire.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoctdb-pmda: Use modified API in pcp library 4.0
Amitay Isaacs [Thu, 1 Mar 2018 01:32:26 +0000 (12:32 +1100)]
ctdb-pmda: Use modified API in pcp library 4.0

Support backward compatibility by checking for __pmID_int type, which
was previously in <pcp/impl.h>.  In the new version, this type is not
defined anymore and there is no need to include <pcp/impl.h>.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Mar  2 00:38:52 CET 2018 on sn-devel-144

6 years agoctdb-tests: Generalise SM_NOTIFY output format in statd-callout tests
Martin Schwenke [Thu, 2 Mar 2017 10:55:54 +0000 (21:55 +1100)]
ctdb-tests: Generalise SM_NOTIFY output format in statd-callout tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-scripts: Clean up statd-callout
Martin Schwenke [Thu, 2 Mar 2017 05:43:51 +0000 (16:43 +1100)]
ctdb-scripts: Clean up statd-callout

This means there will be 2 loops reading the data but the code flow is
much more obvious.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Exit on statd-callout sub-test failure
Martin Schwenke [Thu, 2 Mar 2017 10:35:03 +0000 (21:35 +1100)]
ctdb-tests: Exit on statd-callout sub-test failure

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-scripts: Avoid no-op "ctdb ptrans" call
Martin Schwenke [Tue, 3 Jan 2017 22:53:54 +0000 (09:53 +1100)]
ctdb-scripts: Avoid no-op "ctdb ptrans" call

This causes unnecessary g_lock activity and overhead.

This could be optimised in ctdb.c:control_ptrans().  However, that
makes the code more complex.  Let's only do that if we get more
potentially no-op uses.

Note no optimisation is needed in the "notify" case because there is
already an early exit if there are no items.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tools: Reindent parts of onnode
Martin Schwenke [Tue, 27 Feb 2018 02:59:50 +0000 (13:59 +1100)]
ctdb-tools: Reindent parts of onnode

No functional changes.  Best viewed with diff/show -w to avoid
whitespace differences.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tools: Remove test hooks from onnode
Martin Schwenke [Wed, 28 Feb 2018 04:11:56 +0000 (15:11 +1100)]
ctdb-tools: Remove test hooks from onnode

CTDB_NODES_SOCKETS is no longer used.  The test code uses ONNODE_SSH
to run a fake ssh client.

Leave indenting sloppy and fix it in the next commit so that this
change is clear.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Use fake ssh script for onnode in local daemons tests
Martin Schwenke [Tue, 27 Feb 2018 01:13:37 +0000 (12:13 +1100)]
ctdb-tests: Use fake ssh script for onnode in local daemons tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Add fake ssh command for local daemons tests
Martin Schwenke [Tue, 27 Feb 2018 01:12:45 +0000 (12:12 +1100)]
ctdb-tests: Add fake ssh command for local daemons tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tools: Revisit stray file descriptor avoidance in onnode
Martin Schwenke [Tue, 27 Feb 2018 04:12:26 +0000 (15:12 +1100)]
ctdb-tools: Revisit stray file descriptor avoidance in onnode

Commit 635da189dccef6516d490c228407b9987986c578 fixed a problem where
a stray file descriptor leaked into a subshell.

Explicitly close the file descriptor at the outermost possible point
rather than relying on fakessh() to do it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tools: Introduce a variable to hold the ssh command
Martin Schwenke [Wed, 28 Feb 2018 04:02:03 +0000 (15:02 +1100)]
ctdb-tools: Introduce a variable to hold the ssh command

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tools: Change onnode to use ONNODE_SSH and ONNODE_SSH_OPTS
Martin Schwenke [Tue, 27 Feb 2018 01:11:54 +0000 (12:11 +1100)]
ctdb-tools: Change onnode to use ONNODE_SSH and ONNODE_SSH_OPTS

Instead of more generic SSH and EXTRA_SSH_OPTS.

Quietly drop reference to rsh in case it gives anyone ideas.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-common: Drop debugging variable CTDB_EXTERNAL_TRACE
Martin Schwenke [Tue, 20 Feb 2018 07:32:04 +0000 (18:32 +1100)]
ctdb-common: Drop debugging variable CTDB_EXTERNAL_TRACE

This was an attempt to debug an unexpected situation.  It never
triggered, so delete it and all supporting code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Avoid creating files in /tmp.
Martin Schwenke [Tue, 13 Feb 2018 00:55:07 +0000 (11:55 +1100)]
ctdb-tests: Avoid creating files in /tmp.

Temporary test data should all go somewhere under TEST_VAR_DIR instead
of in the global /tmp.  The existing mktemp could be changed so the
data goes into the test directory but mktemp is overkill in this case.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Check for errors when adding stubs/ subdirectory to PATH
Martin Schwenke [Wed, 7 Feb 2018 02:28:59 +0000 (13:28 +1100)]
ctdb-tests: Check for errors when adding stubs/ subdirectory to PATH

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Clean up PATH setting for stubs/ subdirectory
Martin Schwenke [Tue, 6 Feb 2018 05:41:36 +0000 (16:41 +1100)]
ctdb-tests: Clean up PATH setting for stubs/ subdirectory

Drop unnecessary PATH setting in rc.local. The functions file no
longer sets PATH so setting it here is unnecessary.  Fix a comment
referencing this PATH setting.

Given EVENTSCRIPTS_PATH is no longer used, use a more obvious variable
name and fail on missing stubs/ subdirectory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Drop unneccessary unset of variable
Martin Schwenke [Wed, 7 Feb 2018 02:25:58 +0000 (13:25 +1100)]
ctdb-tests: Drop unneccessary unset of variable

The comment is incorrect.  This is only set when running simple tests
on local daemons.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Use consistent NAT gateway nodes file
Martin Schwenke [Mon, 12 Feb 2018 00:34:57 +0000 (11:34 +1100)]
ctdb-tests: Use consistent NAT gateway nodes file

Using a different file each time causes the event script to believe
that the configuration has changed even though only the node states
have changed.  Change this to stop the tests from doing something
unexpected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Fix a double-typo bug
Martin Schwenke [Fri, 9 Feb 2018 10:18:03 +0000 (21:18 +1100)]
ctdb-tests: Fix a double-typo bug

Amazingly, the code actually works!  Understanding why is homework for
real shell experts, who are not necessarily created ==!

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-scripts: Add default for public addresses file where missing
Martin Schwenke [Thu, 22 Feb 2018 07:48:23 +0000 (18:48 +1100)]
ctdb-scripts: Add default for public addresses file where missing

This makes it consistent with the rest of the script code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-scripts: Do not use ctdb_service_reconfigure() for policy routing
Martin Schwenke [Tue, 6 Feb 2018 01:00:31 +0000 (12:00 +1100)]
ctdb-scripts: Do not use ctdb_service_reconfigure() for policy routing

This is an unconditional reconfiguration so skip the unnecessary
logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-packaging: Package event scripts via a wildcard
Martin Schwenke [Fri, 16 Feb 2018 03:04:04 +0000 (14:04 +1100)]
ctdb-packaging: Package event scripts via a wildcard

This avoids churn as event scripts are renamed and moved about.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-packaging: Make the ctdb package own more directories
Martin Schwenke [Fri, 16 Feb 2018 03:03:07 +0000 (14:03 +1100)]
ctdb-packaging: Make the ctdb package own more directories

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agowafsamba: Build with -Wimplicit-fallthrough if supported
Andreas Schneider [Wed, 26 Jul 2017 14:29:06 +0000 (16:29 +0200)]
wafsamba: Build with -Wimplicit-fallthrough if supported

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar  1 19:38:12 CET 2018 on sn-devel-144

6 years agoauth:credentials: Avoid an 'else' branch
Andreas Schneider [Thu, 1 Mar 2018 10:04:49 +0000 (11:04 +0100)]
auth:credentials: Avoid an 'else' branch

This moves the 'return' statement to the end of the 'case' and makes clear
we leave here.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoauth:credentials: Add FALL_THROUGH statements in credentials.c
Andreas Schneider [Wed, 26 Jul 2017 16:20:53 +0000 (18:20 +0200)]
auth:credentials: Add FALL_THROUGH statements in credentials.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agowinbind: Fix --ping-dc error handling
Volker Lendecke [Mon, 26 Feb 2018 14:32:05 +0000 (15:32 +0100)]
winbind: Fix --ping-dc error handling

If the child dies at the wrong moment, we get an error in the "req" itself.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Mar  1 14:48:19 CET 2018 on sn-devel-144

6 years agowinbind: Fix a race between the sigchld and 0-sized socket read
Volker Lendecke [Mon, 26 Feb 2018 14:12:14 +0000 (15:12 +0100)]
winbind: Fix a race between the sigchld and 0-sized socket read

Fix a bug when a child dies when a request is pending in the child. If the
signal handler fires before epoll finds out the other end of the parent-child
socket is closed, we close the socket on our side without taking care of the
pending request. This causes two problems: First, that one pending request
never is replied to properly, and secondly, we might end up with EPOLL_DEL on a
wrong file descriptor. This causes all sorts of trouble if we hit an active
one.

The fix for this problem is not to close the socket in winbind_child_died().
This however stops an idle child that dies hard from being properly cleaned up.
The fix for that is to add the child->monitor_fde that is set pending only when
no child request is active. This way we can remove the close(sock) in the
signal handler.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Remove the "winbindd_children" global
Volker Lendecke [Mon, 26 Feb 2018 12:48:24 +0000 (13:48 +0100)]
winbind: Remove the "winbindd_children" global

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Use forall_children in reinit_after_fork()
Volker Lendecke [Mon, 26 Feb 2018 12:45:01 +0000 (13:45 +0100)]
winbind: Use forall_children in reinit_after_fork()

This removes the special handling for idmap_child() after the "This is
a little tricky" comment. I believe this was not required at all, the
idmap_child is part of the winbindd_children list.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Use forall_children in winbind_msg_ip_dropped_parent()
Volker Lendecke [Mon, 26 Feb 2018 12:37:05 +0000 (13:37 +0100)]
winbind: Use forall_children in winbind_msg_ip_dropped_parent()

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Use forall_domain_children in winbind_msg_online
Volker Lendecke [Mon, 26 Feb 2018 12:24:50 +0000 (13:24 +0100)]
winbind: Use forall_domain_children in winbind_msg_online

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Use forall_domain_children in winbind_msg_offline()
Volker Lendecke [Mon, 26 Feb 2018 12:20:25 +0000 (13:20 +0100)]
winbind: Use forall_domain_children in winbind_msg_offline()

Note that we only walk the domain children, which all have
child->domain != NULL. So we don't need that check anymore.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Remove unused winbindd_internal_child()
Volker Lendecke [Mon, 26 Feb 2018 12:15:14 +0000 (13:15 +0100)]
winbind: Remove unused winbindd_internal_child()

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: "internal" children never have a domain set
Volker Lendecke [Mon, 26 Feb 2018 12:14:21 +0000 (13:14 +0100)]
winbind: "internal" children never have a domain set

Look at setup_domain_child(): There we always set child->domain. The only other
two children are the idmap and locator children, which don't have a domain set.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Use forall_children in winbind_child_died()
Volker Lendecke [Mon, 26 Feb 2018 11:59:06 +0000 (12:59 +0100)]
winbind: Use forall_children in winbind_child_died()

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agowinbind: Implement forall_children()
Volker Lendecke [Mon, 26 Feb 2018 11:55:31 +0000 (12:55 +0100)]
winbind: Implement forall_children()

Step 0 in removing winbindd_children as a variable: We have access to
all children via our domain list and the two explicit children. There's
no need to separately maintain a list of winbind children. Maintaining
child->pid != 0 is sufficient to make sure we only walk active children.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agothird_party: Add missing config.h in libpamtest
Andreas Schneider [Tue, 27 Feb 2018 08:18:36 +0000 (09:18 +0100)]
third_party: Add missing config.h in libpamtest

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agothird_party: Update pam_wrapper to version 1.0.5
Andreas Schneider [Thu, 22 Feb 2018 16:00:14 +0000 (17:00 +0100)]
third_party: Update pam_wrapper to version 1.0.5

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agodomain.py: Give some advice if the schema upgrade command fails
Garming Sam [Tue, 27 Feb 2018 23:38:12 +0000 (12:38 +1300)]
domain.py: Give some advice if the schema upgrade command fails

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoRemove some bashisms from the test scripts
Timur I. Bakeyev [Mon, 11 Dec 2017 01:47:21 +0000 (02:47 +0100)]
Remove some bashisms from the test scripts

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agotests/dbcheck: Provision using the old schema and ignore displayName
Garming Sam [Tue, 27 Feb 2018 23:17:46 +0000 (12:17 +1300)]
tests/dbcheck: Provision using the old schema and ignore displayName

These tests are currently not run on Ubuntu due to bashisms in the test.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agolibsmb: Remove incorrect fall through comment in trusts_util.c
Andreas Schneider [Fri, 13 Oct 2017 09:06:48 +0000 (11:06 +0200)]
libsmb: Remove incorrect fall through comment in trusts_util.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar  1 09:52:37 CET 2018 on sn-devel-144

6 years agos3:spoolss: Remove incorrect fall through comment in srv_spoolss_nt.c
Andreas Schneider [Fri, 13 Oct 2017 09:11:24 +0000 (11:11 +0200)]
s3:spoolss: Remove incorrect fall through comment in srv_spoolss_nt.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:lib: Add FALL_THROUGH statements in http.c
Andreas Schneider [Fri, 13 Oct 2017 09:27:38 +0000 (11:27 +0200)]
s4:lib: Add FALL_THROUGH statements in http.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:dsdb: Add FALL_THROUGH statements in password_hash.c
Andreas Schneider [Fri, 13 Oct 2017 09:26:38 +0000 (11:26 +0200)]
s4:dsdb: Add FALL_THROUGH statements in password_hash.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:winbindd: Add FALL_THROUGH statements in idmap_autorid.c
Andreas Schneider [Fri, 13 Oct 2017 09:25:27 +0000 (11:25 +0200)]
s3:winbindd: Add FALL_THROUGH statements in idmap_autorid.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in ntlm_auth.c
Andreas Schneider [Fri, 13 Oct 2017 09:24:23 +0000 (11:24 +0200)]
s3:utils: Add FALL_THROUGH statements in ntlm_auth.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in net_registry_check.c
Andreas Schneider [Fri, 13 Oct 2017 09:18:09 +0000 (11:18 +0200)]
s3:utils: Add FALL_THROUGH statements in net_registry_check.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Add FALL_THROUGH statements in reply.c
Andreas Schneider [Fri, 13 Oct 2017 09:15:31 +0000 (11:15 +0200)]
s3:smbd: Add FALL_THROUGH statements in reply.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:rpcclient: Add FALL_THROUGH statements in rpcclient.c
Andreas Schneider [Fri, 13 Oct 2017 09:13:42 +0000 (11:13 +0200)]
s3:rpcclient: Add FALL_THROUGH statements in rpcclient.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lsa: Add FALL_THROUGH statements in srv_lsa_nt.c
Andreas Schneider [Fri, 13 Oct 2017 09:12:43 +0000 (11:12 +0200)]
s3:lsa: Add FALL_THROUGH statements in srv_lsa_nt.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:modules: Add FALL_THROUGH statements in getdate.c
Andreas Schneider [Fri, 13 Oct 2017 09:08:36 +0000 (11:08 +0200)]
s3:modules: Add FALL_THROUGH statements in getdate.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:libnet: Add FALL_THROUGH statements in libnet_join.c
Andreas Schneider [Thu, 27 Jul 2017 14:59:40 +0000 (16:59 +0200)]
s3:libnet: Add FALL_THROUGH statements in libnet_join.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agonsswitch: Add FALL_THROUGH statements in pam_winbind.c
Andreas Schneider [Thu, 27 Jul 2017 14:56:27 +0000 (16:56 +0200)]
nsswitch: Add FALL_THROUGH statements in pam_winbind.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoauth:gensec: Add FALL_THROUGH statements in spnego.c
Andreas Schneider [Wed, 26 Jul 2017 16:24:26 +0000 (18:24 +0200)]
auth:gensec: Add FALL_THROUGH statements in spnego.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoauth:credentials: Add FALL_THROUGH statements in credentials_secrets.c
Andreas Schneider [Wed, 26 Jul 2017 16:23:31 +0000 (18:23 +0200)]
auth:credentials: Add FALL_THROUGH statements in credentials_secrets.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:torture: Add FALL_THROUGH statements in rpc/spoolss.c
Andreas Schneider [Wed, 26 Jul 2017 15:41:26 +0000 (17:41 +0200)]
s4:torture: Add FALL_THROUGH statements in rpc/spoolss.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:torture: Add FALL_THROUGH statements in basic/misc.c
Andreas Schneider [Wed, 26 Jul 2017 15:39:52 +0000 (17:39 +0200)]
s4:torture: Add FALL_THROUGH statements in basic/misc.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:rpc_server: Add FALL_THROUGH statements in dcesrv_srvsvc.c
Andreas Schneider [Wed, 26 Jul 2017 15:39:04 +0000 (17:39 +0200)]
s4:rpc_server: Add FALL_THROUGH statements in dcesrv_srvsvc.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:auth: Add FALL_THROUGH statements in gensec_krb5.c
Andreas Schneider [Wed, 26 Jul 2017 15:33:12 +0000 (17:33 +0200)]
s4:auth: Add FALL_THROUGH statements in gensec_krb5.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:auth: Add FALL_THROUGH statements in auth_sam.c
Andreas Schneider [Wed, 26 Jul 2017 15:30:53 +0000 (17:30 +0200)]
s4:auth: Add FALL_THROUGH statements in auth_sam.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:auth: Add FALL_THROUGH statements in auth_util.c
Andreas Schneider [Wed, 26 Jul 2017 15:29:55 +0000 (17:29 +0200)]
s4:auth: Add FALL_THROUGH statements in auth_util.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:samdb: Add FALL_THROUGH statements in linked_attributes.c
Andreas Schneider [Wed, 26 Jul 2017 15:28:11 +0000 (17:28 +0200)]
s4:samdb: Add FALL_THROUGH statements in linked_attributes.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:samdb: Add FALL_THROUGH statements in cracknames.c
Andreas Schneider [Wed, 26 Jul 2017 15:21:02 +0000 (17:21 +0200)]
s4:samdb: Add FALL_THROUGH statements in cracknames.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:rpc_server: Add FALL_THROUGH statements in rpc_server.c
Andreas Schneider [Wed, 26 Jul 2017 15:42:46 +0000 (17:42 +0200)]
s3:rpc_server: Add FALL_THROUGH statements in rpc_server.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in net_rpc_conf.c
Andreas Schneider [Wed, 26 Jul 2017 15:58:40 +0000 (17:58 +0200)]
s3:utils: Add FALL_THROUGH statements in net_rpc_conf.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in net_conf.c
Andreas Schneider [Wed, 26 Jul 2017 15:57:10 +0000 (17:57 +0200)]
s3:utils: Add FALL_THROUGH statements in net_conf.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in regedit.c
Andreas Schneider [Wed, 26 Jul 2017 15:55:35 +0000 (17:55 +0200)]
s3:utils: Add FALL_THROUGH statements in regedit.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Add FALL_THROUGH statements in trans2.c
Andreas Schneider [Wed, 26 Jul 2017 15:52:06 +0000 (17:52 +0200)]
s3:smbd: Add FALL_THROUGH statements in trans2.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Add FALL_THROUGH statements in nttrans.c
Andreas Schneider [Wed, 26 Jul 2017 15:50:18 +0000 (17:50 +0200)]
s3:smbd: Add FALL_THROUGH statements in nttrans.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:modules: Add FALL_THROUGH statements in vfs_acl_common.c
Andreas Schneider [Wed, 26 Jul 2017 15:53:45 +0000 (17:53 +0200)]
s3:modules: Add FALL_THROUGH statements in vfs_acl_common.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:libsmb: Add FALL_THROUGH statements in dsgetdcname.c
Andreas Schneider [Wed, 26 Jul 2017 15:36:50 +0000 (17:36 +0200)]
s3:libsmb: Add FALL_THROUGH statements in dsgetdcname.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_sd.c
Andreas Schneider [Wed, 26 Jul 2017 15:54:48 +0000 (17:54 +0200)]
s3:lib: Add FALL_THROUGH statements in util_sd.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in sysacls.c
Andreas Schneider [Wed, 26 Jul 2017 15:51:08 +0000 (17:51 +0200)]
s3:lib: Add FALL_THROUGH statements in sysacls.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in cbuf.c
Andreas Schneider [Wed, 26 Jul 2017 15:25:30 +0000 (17:25 +0200)]
s3:lib: Add FALL_THROUGH statements in cbuf.c

6 years agos3:auth: Add FALL_THROUGH statements in pampass.c
Andreas Schneider [Thu, 27 Jul 2017 14:55:23 +0000 (16:55 +0200)]
s3:auth: Add FALL_THROUGH statements in pampass.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:auth: Add FALL_THROUGH statements in auth_sam.c
Andreas Schneider [Wed, 26 Jul 2017 15:35:28 +0000 (17:35 +0200)]
s3:auth: Add FALL_THROUGH statements in auth_sam.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibrpc:ndr: Add FALL_THROUGH statements in ndr_cab.c
Andreas Schneider [Wed, 26 Jul 2017 15:03:09 +0000 (17:03 +0200)]
librpc:ndr: Add FALL_THROUGH statements in ndr_cab.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibgpo: Add FALL_THROUGH statements in gpo_sec.c
Andreas Schneider [Wed, 26 Jul 2017 15:43:53 +0000 (17:43 +0200)]
libgpo: Add FALL_THROUGH statements in gpo_sec.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in common/summary.c
Andreas Schneider [Wed, 26 Jul 2017 16:28:12 +0000 (18:28 +0200)]
lib:tdb: Add FALL_THROUGH statements in common/summary.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in tdbtool.c
Andreas Schneider [Wed, 26 Jul 2017 14:58:00 +0000 (16:58 +0200)]
lib:tdb: Add FALL_THROUGH statements in tdbtool.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in hash.c
Andreas Schneider [Wed, 26 Jul 2017 14:55:10 +0000 (16:55 +0200)]
lib:tdb: Add FALL_THROUGH statements in hash.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_str.c
Andreas Schneider [Wed, 26 Jul 2017 15:25:20 +0000 (17:25 +0200)]
s3:lib: Add FALL_THROUGH statements in util_str.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_path.c
Andreas Schneider [Thu, 27 Jul 2017 14:57:38 +0000 (16:57 +0200)]
s3:lib: Add FALL_THROUGH statements in util_path.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in substitute_generic.c
Andreas Schneider [Wed, 26 Jul 2017 15:22:44 +0000 (17:22 +0200)]
s3:lib: Add FALL_THROUGH statements in substitute_generic.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in util_file.c
Andreas Schneider [Wed, 26 Jul 2017 16:41:25 +0000 (18:41 +0200)]
lib:util: Add FALL_THROUGH statements in util_file.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in charset/charset_macosxfs.c
Andreas Schneider [Wed, 26 Jul 2017 16:40:14 +0000 (18:40 +0200)]
lib:util: Add FALL_THROUGH statements in charset/charset_macosxfs.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in substitute.c
Andreas Schneider [Wed, 26 Jul 2017 14:49:50 +0000 (16:49 +0200)]
lib:util: Add FALL_THROUGH statements in substitute.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:param: Add FALL_THROUGH statements in loadparm.c
Andreas Schneider [Thu, 27 Jul 2017 13:20:57 +0000 (15:20 +0200)]
lib:param: Add FALL_THROUGH statements in loadparm.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_outbound.c
Andreas Schneider [Thu, 27 Jul 2017 13:20:04 +0000 (15:20 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_outbound.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map.c
Andreas Schneider [Thu, 27 Jul 2017 13:19:23 +0000 (15:19 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map.c

6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_inbound.c
Andreas Schneider [Thu, 27 Jul 2017 13:18:28 +0000 (15:18 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_inbound.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in common/ldb_dn.c
Andreas Schneider [Thu, 27 Jul 2017 13:17:21 +0000 (15:17 +0200)]
lib:ldb: Add FALL_THROUGH statements in common/ldb_dn.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>