[SCM] Samba Shared Repository - branch v4-8-stable updated
Karolin Seeger
kseeger at samba.org
Fri Aug 24 10:21:13 UTC 2018
The branch, v4-8-stable has been updated
via 9fc7ccf VERSION: Disable GIT_SNAPSHOT for the 4.8.5 release.
via 020b14a WHATSNEW: Add release notes for Samba 4.8.5.
via 2ce60d7 torture: Demonstrate the invalid lock order panic
via 1c0be1f vfs_fruit: Fix a leak of "br_lck"
via 3cc8f9d s3:winbind: Do not lookup local system accounts in AD
via 03e73ff selftest: Load time_audit and full_audit modules for all tests
via 06cf8c4 s3: vfs: time_audit: fix handling of token_blob in smb_time_audit_offload_read_recv()
via 84b7865 selftest: subunithelper needs to follow the subunit spec more closely
via fd137bc unittests.lib_util_modules: test module probe with "skel", not "unix"
via 6b37dea ldb: Release LDB 1.3.6
via e35fd26 ldb: Fix missing NULL terminator in ldb_mod_op_test testsuite
via 0eaf84a libsmb: Fix CID 1438243 Unchecked return value
via b1b882c libsmb: Fix CID 1438244 Unsigned compared against 0
via d4e8fd5 smbd: Fix CID 1438245 Dereference before null check
via 2e28584 smbd: Fix CID 1438246 Unchecked return value
via c45fb4b smbd: Align integer types
via c57c54e ctdb: add expiry test for ctdb_mutex_ceph_rados_helper
via 7cebb48 ctdb_mutex_ceph_rados_helper: fix deadlock via lock renewals
via c245fdc ctdb_mutex_ceph_rados_helper: rename timer_ev to ppid_timer_ev
via af08da4 ctdb_mutex_ceph_rados_helper: use talloc destructor for cleanup
via 6dc7dc9 ctdb_mutex_ceph_rados_helper: Set SIGINT signal handler
via 30c37fc ctdb/build: link ctdb_mutex_ceph_rados_helper against ceph-common
via 0a49817 docs: Add manpage for winbind_krb5_localauth.8
via e9e85a1 docs: Move winbind_krb5_locator manpage to volume 8
via 756feb9 krb5_plugin: Move krb5 locator plugin to krb5_plugin subdir
via f9f1102 krb5_plugin: Install plugins to krb5 modules dir
via 9e3bc4e s3: tests: smbclient. Regression test to ensure we get NT_STATUS_DIRECTORY_NOT_EMPTY on rmdir.
via 694c890 s4/torture: Add new test for DELETE_ON_CLOSE on non-empty directories
via 8bf5c11 s3/libsmb: Explicitly set delete_on_close token for rmdir
via 04c66d8 VERSION: Bump version up to 4.8.5.
via 47081d9 Merge tag 'samba-4.8.4' into v4-8-test
via 6f44ef8 s3/smbd: Ensure quota code is only called when quota support detected
via e93a716 systemd: Only start smb when network interfaces are up
via 4b91f85 s3/utils: fix regression where specifying -Unetbios/root works
via 807611f s3/smbd: allow set quota for non root user (when built with --enable-selftest)
via 2162b45 s3/script/tests: Add simple (smb1 & smb2) get/set/list tests for smbcquotas
via 6938ec9 s3/script/test: modify existing smbcquota test to use SMB2 in addition to SMB1.
via 87bf244 s3/smbd: smb2 server implementation for query get/set info.
via aa7fb23 s3/smbd: adjust smb1 server to use idl structs and generated ndr push/pull funcs
via 34208d3 s3/libsmb: adjust smb2 code for new idl structs & generated ndr push/pull funcs.
via f1e7ffd s3/libsmb: adjust smb1 cli code to use idl structs and ndr push/pull funcs.
via 964626e librpc/idl Add some query [getset]info quota related structures
via d10a32c s3/smbd: Don't stat when doing a quota operation (as it's a fake file)
via f4a456a s3/libsmb: Avoid potential smbpanic calling parse_user_quota_list.
via acacc78 s3/lib: Fix misleading typo in debug message
via aeb57fe s3: smbd: Fix AIX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
via 91c15b4 s3: smbd: Fix FreeBSD sendfile() for SMB2. Ensure we don't spin on EAGAIN.
via b21e833 s3: smbd: Fix HPUX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
via 4e0c971 s3: smbd: Fix Solaris sendfile() for SMB2. Ensure we don't spin on EAGAIN.
via 37e2ff7 s3: smbd: Fix Linux sendfile() for SMB2. Ensure we don't spin on EAGAIN.
via 357d2b6 dns wildcards: fix BUG 13536
via a01a981 dns wildcards: tests to confirm BUG 13536
via 25e23c2 s3: smbd: fix path check in smbd_smb2_create_durable_lease_check()
via a734876 s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
via a970d45 s3: libsmbclient: Fix cli_splice() fallback when reading less than a complete file.
via 41302b4 s3: torture: Test SMB1 cli_splice() fallback path when doing a non-full file splice.
via a96f69a docs/vfs_ceph: add CTDB_SAMBA_SKIP_SHARE_CHECK=yes caveat
via 3558765 vfs_ceph: don't lie about flock support
via 2a54623 ldb: Refuse to build Samba against a newer minor version of ldb
via 04a8995 samba-tool trust: support discovery via netr_GetDcName
via 4b3ac37 s3:selftest: run rpc.lsa.lookupsids also with explicit [smb1] and [smb2]
via ecf9e20 s4:librpc: autonegotiate SMB1/2/3
via e9494f9 python/tests: use explicit "client ipc max protocol = NT1" for samba.tests.net_join_no_spnego
via 94ab84f tests/auth_log: Permit SMB2 service description if empty binding is used for kerberos authentication
via 5b60ffc s4:libcli: add smb_connect_nego_{send,recv}()
via dcaa67f s4:libcli: allow a fallback to NTLMSSP if SPNEGO is not supported locally
via 3212bc7 s4:libcli: add fallback_to_anonymous to smb2_connect_send()
via 2fd61b0 s4:libcli: allow passing an already negotiated connection to smb2_connect_send()
via 2635c62 s4:libcli: split out smb2_connect_session_start()
via dbf268e s4:libcli: add smb2_transport_raw_init()
via 1136ff2 s4:libcli: allow passing an already negotiated connection to smb_composite_connect()
via 77ab463 s4:libcli: use talloc_zero() for struct smb_composite_connect in fetchfile.c
via 19e65af s4:libcli: add smbcli_transport_raw_init()
via 92b6b90 s4:libcli: split out smb_raw_negotiate_fill_transport()
via d23a1c1 librpc: add binding handle support for [smb1]
via b336179 s3: smbd: always set vuid in check_user_ok()
via c5680ba s3: smbd/durable: remove dev and inode check from vfs_default_durable_reconnect_check_stat()
via 6930bb9 libsmbclient: Initialize written in cli_splice_fallback()
via 40c9784 libsmbclient: Initialize written value before use.
via c7bedb9 lib: smb_threads: fix access before init bug
via adef988 python: pysmbd: Additional error path leak fix.
via 425f513 s3:smbd: don't allow renaming basefile if streams are open
via dd78d9a s3:locking: add file_has_open_streams()
via 85571d0 s3:smbd: add private option NTCREATEX_OPTIONS_PRIVATE_STREAM_BASEOPEN
via 93ec87e s4:torture/vfs/fruit: adjust test testing basefile rename to expect failure
via 36972fd s4:torture/smb2/streams: try to rename basefile while is has open streams
via 00b001b selftest: run smb2.streams tests against a share with vfs_streams_xattr
via af4cb57 vfs_fruit: delete 0 byte size streams if AAPL is enabled
via c88aa5f s4:torture: test setting EOF of a stream to 0 with enabled AAPL extensions
via 2ea15c5 s4:torture/vfs/fruit: decrease large resource fork size in test from 1 GB to 64 MB
via b5d333c ctdb-tests: Avoid segfault by initializing logging
via a19d52e ctdb-tests: Avoid segfault by initializing logging
via 6600f4b ctdb-pmda: Use modified API in pcp library 4.0
via 0e3f149 socket_wrapper: Add missing dependency on tirpc
via 7f46b39 ctdb-daemon: Only consider client ID for local database attach
via 35128a9 ctdb-tests: Switch fake_ctdbd to use ctdb_get_peer_pid()
via 8af4bac uid_wrapper: Be strict when checking __attribute__ features
via e021b43 resolv_wrapper: Be strict when checking __attribute__ features
via 81a05ba pam_wrapper: Be strict when checking __attribute__ features
via d3b773d nss_wrapper: Be strict when checking __attribute__ features
via a4ada0b socket_wrapper: Be strict when checking __attribute__ features
via 7a0807d wafsamba: Be strict when checking __attribute__ features
via 89de78e wafsamba: Add strict option to CHECK_CODE
via 4561e66 ctdb-common: Use correct return type for tevent_queue_add_entry
via a95e528 tdb: Fix build on AIX
via ac5ca1d ctdb: Fix build on AIX
via 9974975 ctdb-common: Use sin6_len only if the structure supports it
via bf7ae2f replace: Add test for sin6_len in sockaddr_in6 structure
via 2819c0d ctdb-docs: Fix the documentation for VNN map
via 7a701e2 ctdb-server: Rename CTDB_BROADCAST_VNNMAP -> CTDB_BROADCAST_ACTIVE
via a2d3593 ctdb-tests: Add a simple test for database traverses
via 1f25b710 ctdb-tests: Add check for non-lmaster node status in integration tests
via f4d7abd ctdb-client: Fix typo where CTDB_BROADCAST_ALL is repeated
via eaa3c9a s3:tests: Add test for smbclient --quiet
via de5bde9 s3:client: Add --quiet option to smbclient
via 1df7f93 VERSION: Bump version up to 4.8.4...
from 626c489 VERSION: Disable GIT_SNAPSHOT for the Samba 4.8.4 release.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-8-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 119 +++-
buildtools/wafsamba/samba_autoconf.py | 12 +-
buildtools/wafsamba/wscript | 4 +
ctdb/client/client_tunnel.c | 4 +-
ctdb/common/ctdb_util.c | 4 +-
ctdb/common/sock_io.c | 6 +-
ctdb/common/system_util.c | 2 +-
ctdb/doc/ctdb.1.xml | 7 +-
ctdb/include/ctdb_private.h | 7 +-
ctdb/protocol/protocol.h | 2 +-
ctdb/protocol/protocol_debug.c | 4 +-
ctdb/protocol/protocol_util.c | 2 +-
ctdb/server/ctdb_cluster_mutex.c | 4 +-
ctdb/server/ctdb_control.c | 36 +-
ctdb/server/ctdb_ltdb_server.c | 21 +-
ctdb/server/ctdb_server.c | 16 +-
ctdb/server/ctdb_traverse.c | 4 +-
ctdb/server/ipalloc.c | 4 +-
ctdb/tests/scripts/integration.bash | 1 +
ctdb/tests/simple/79_volatile_db_traverse.sh | 94 +++
ctdb/tests/src/ctdb_takeover_tests.c | 8 +-
ctdb/tests/src/fake_ctdbd.c | 10 +-
ctdb/tests/src/fetch_loop.c | 3 +
ctdb/tests/src/fetch_loop_key.c | 3 +
ctdb/tests/src/fetch_readonly.c | 3 +
ctdb/tests/src/fetch_readonly_loop.c | 3 +
ctdb/tests/src/fetch_ring.c | 3 +
ctdb/tests/src/g_lock_loop.c | 4 +-
ctdb/tests/src/ipalloc_read_known_ips.c | 4 +-
ctdb/tests/src/message_ring.c | 3 +
ctdb/tests/src/transaction_loop.c | 3 +
ctdb/tests/src/tunnel_test.c | 3 +
ctdb/tests/src/update_record.c | 3 +
ctdb/tests/src/update_record_persistent.c | 3 +
ctdb/tools/ctdb_killtcp.c | 6 +-
ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c | 200 ++++--
ctdb/utils/ceph/test_ceph_rados_reclock.sh | 57 +-
ctdb/utils/pmda/pmda_ctdb.c | 30 +-
ctdb/wscript | 17 +-
docs-xml/manpages/vfs_ceph.8.xml | 19 +
docs-xml/manpages/winbind_krb5_localauth.8.xml | 86 +++
...b5_locator.7.xml => winbind_krb5_locator.8.xml} | 6 +-
docs-xml/wscript_build | 6 +-
lib/ldb/ABI/{ldb-1.3.5.sigs => ldb-1.3.6.sigs} | 0
...b-util.py3-1.3.5.sigs => pyldb-util-1.3.6.sigs} | 0
...il.py3-1.3.5.sigs => pyldb-util.py3-1.3.6.sigs} | 0
lib/ldb/tests/ldb_mod_op_test.c | 4 +-
lib/ldb/wscript | 34 +-
lib/replace/wscript | 4 +
lib/tdb/tools/tdbtool.c | 8 +-
lib/util/smb_threads.h | 3 +
librpc/idl/quota.idl | 54 ++
librpc/idl/wscript_build | 1 +
librpc/rpc/binding.c | 1 +
librpc/rpc/rpc_common.h | 2 +
librpc/wscript_build | 5 +
nsswitch/{ => krb5_plugin}/winbind_krb5_locator.c | 0
nsswitch/wscript_build | 12 +-
packaging/systemd/smb.service.in | 3 +-
python/samba/netcmd/domain.py | 26 +-
python/samba/tests/auth_log.py | 28 +-
python/samba/tests/dns_wildcard.py | 48 ++
python/samba/tests/net_join_no_spnego.py | 2 +
selftest/knownfail | 3 +
selftest/subunithelper.py | 3 +-
selftest/target/Samba3.pm | 21 +-
source3/client/client.c | 9 +-
source3/include/smb.h | 3 +
source3/lib/sendfile.c | 293 ++++++++-
source3/lib/sysquotas.c | 2 +-
source3/libsmb/cli_smb2_fnum.c | 99 ++-
source3/libsmb/cliquota.c | 399 ++++++------
source3/libsmb/clireadwrite.c | 6 +-
source3/libsmb/libsmb_file.c | 2 +-
source3/libsmb/proto.h | 6 +
source3/locking/locking.c | 31 +
source3/locking/proto.h | 1 +
source3/modules/vfs_ceph.c | 11 +-
source3/modules/vfs_fruit.c | 27 +-
source3/modules/vfs_time_audit.c | 12 +-
source3/script/tests/getset_quota.py | 154 +++++
source3/script/tests/test_dfree_quota.sh | 14 +-
source3/script/tests/test_smbclient_s3.sh | 76 +++
source3/script/tests/test_smbcquota.py | 244 ++++++++
.../script/tests/test_smbcquota.sh | 42 +-
source3/selftest/tests.py | 12 +-
source3/smbd/durable.c | 24 -
source3/smbd/nttrans.c | 668 ++++++++++++---------
source3/smbd/open.c | 7 +-
source3/smbd/proto.h | 14 +
source3/smbd/pysmbd.c | 1 +
source3/smbd/reply.c | 4 +
source3/smbd/smb2_create.c | 16 +-
source3/smbd/smb2_getinfo.c | 87 ++-
source3/smbd/smb2_setinfo.c | 41 ++
source3/smbd/trans2.c | 3 +-
source3/smbd/uid.c | 2 +
source3/torture/torture.c | 153 +++++
source3/utils/smbcquotas.c | 3 +-
source3/winbindd/winbindd_util.c | 2 +
source3/wscript_build | 2 +
source4/dns_server/dnsserver_common.c | 1 +
source4/libcli/raw/clitransport.c | 44 ++
source4/libcli/raw/clitree.c | 1 +
source4/libcli/raw/rawnegotiate.c | 74 ++-
source4/libcli/smb2/connect.c | 69 ++-
source4/libcli/smb2/session.c | 35 +-
source4/libcli/smb2/transport.c | 35 ++
source4/libcli/smb_composite/connect.c | 48 +-
source4/libcli/smb_composite/connect_nego.c | 209 +++++++
source4/libcli/smb_composite/fetchfile.c | 2 +-
source4/libcli/smb_composite/smb_composite.h | 23 +
source4/libcli/wscript_build | 20 +-
source4/librpc/rpc/dcerpc_connect.c | 257 ++++----
source4/ntvfs/cifs/vfs_cifs.c | 1 +
source4/torture/basic/delete.c | 87 +++
source4/torture/smb2/durable_v2_open.c | 11 +-
source4/torture/smb2/streams.c | 82 +++
source4/torture/vfs/fruit.c | 315 +++++++++-
testsuite/unittests/test_lib_util_modules.c | 2 +-
third_party/nss_wrapper/wscript | 2 +
third_party/pam_wrapper/wscript | 2 +
third_party/resolv_wrapper/wscript | 2 +
third_party/socket_wrapper/wscript | 4 +-
third_party/uid_wrapper/wscript | 4 +-
126 files changed, 3908 insertions(+), 992 deletions(-)
create mode 100755 ctdb/tests/simple/79_volatile_db_traverse.sh
create mode 100644 docs-xml/manpages/winbind_krb5_localauth.8.xml
rename docs-xml/manpages/{winbind_krb5_locator.7.xml => winbind_krb5_locator.8.xml} (96%)
copy lib/ldb/ABI/{ldb-1.3.5.sigs => ldb-1.3.6.sigs} (100%)
copy lib/ldb/ABI/{pyldb-util.py3-1.3.5.sigs => pyldb-util-1.3.6.sigs} (100%)
copy lib/ldb/ABI/{pyldb-util.py3-1.3.5.sigs => pyldb-util.py3-1.3.6.sigs} (100%)
create mode 100644 librpc/idl/quota.idl
rename nsswitch/{ => krb5_plugin}/winbind_krb5_locator.c (100%)
create mode 100755 source3/script/tests/getset_quota.py
create mode 100755 source3/script/tests/test_smbcquota.py
copy python/samba/tests/policy.py => source3/script/tests/test_smbcquota.sh (52%)
mode change 100644 => 100755
create mode 100644 source4/libcli/smb_composite/connect_nego.c
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index fd52ff2..9776c92 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=8
-SAMBA_VERSION_RELEASE=4
+SAMBA_VERSION_RELEASE=5
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index d092972..cde1819 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,119 @@
=============================
+ Release Notes for Samba 4.8.5
+ August 24, 2018
+ =============================
+
+
+This is the latest stable release of the Samba 4.8 release series.
+
+
+Changes since 4.8.4:
+--------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 13474: python: pysmbd: Additional error path leak fix.
+ * BUG 13511: libsmbclient: Initialize written value before use.
+ * BUG 13519: ldb: Refuse to build Samba against a newer minor version of
+ ldb.
+ * BUG 13527: s3: libsmbclient: Fix cli_splice() fallback when reading less
+ than a complete file.
+ * BUG 13537: Using "sendfile = yes" with SMB2 can cause CPU spin.
+
+o Andrew Bartlett <abartlet at samba.org>
+ * BUG 13575: ldb: Release LDB 1.3.6.
+
+o Bailey Berro <baileyberro at chromium.org>
+ * BUG 13511: libsmbclient: Initialize written in cli_splice_fallback().
+
+o Ralph Boehme <slow at samba.org>
+ * BUG 13318: Durable Handles reconnect fails in a cluster when the cluster
+ fs uses different device ids.
+ * BUG 13351: s3: smbd: Always set vuid in check_user_ok().
+ * BUG 13441: vfs_fruit: Delete 0 byte size streams if AAPL is enabled.
+ * BUG 13451: Fail renaming file if that file has open streams.
+ * BUG 13505: lib: smb_threads: Fix access before init bug.
+ * BUG 13535: s3: smbd: Fix path check in
+ smbd_smb2_create_durable_lease_check().
+
+o Alexander Bokovoy <ab at samba.org>
+ * BUG 13538: samba-tool trust: Support discovery via netr_GetDcName.
+
+o Samuel Cabrero <scabrero at suse.de>
+ * BUG 13540: ctdb_mutex_ceph_rados_helper: Set SIGINT signal handler.
+
+o David Disseldorp <ddiss at samba.org>
+ * BUG 13506: vfs_ceph: Don't lie about flock support.
+ * BUG 13540: Fix deadlock with ctdb_mutex_ceph_rados_helper.
+
+o Amitay Isaacs <amitay at gmail.com>
+ * BUG 13493: ctdb: Fix build on FreeBSD and AIX.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 13553: libsmb: Fix CID 1438243 (Unchecked return value), CID 1438244
+ (Unsigned compared against 0), CID 1438245 (Dereference before null check),
+ CID 1438246 (Unchecked return value).
+ * BUG 13584: vfs_fruit: Fix a panic if fruit_access_check detects a locking
+ conflict.
+
+o Gary Lockyer <gary at catalyst.net.nz>
+ * BUG 13536: The current position in the dns name was not advanced past the
+ '.' character.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 13308: samba-tool domain trust: Fix trust compatibility to Windows
+ Server 1709 and FreeIPA.
+
+o Oleksandr Natalenko <oleksandr at redhat.com>
+ * BUG 13559: systemd: Only start smb when network interfaces are up.
+
+o Noel Power <noel.power at suse.com>
+ * BUG 13553: Fix quotas with SMB2.
+ * BUG 13563: s3/smbd: Ensure quota code is only called when quota support
+ detected.
+
+o Anoop C S <anoopcs at redhat.com>
+ * BUG 13204: s3/libsmb: Explicitly set delete_on_close token for rmdir.
+
+o Andreas Schneider <asn at samba.org>
+ * BUG 13489: krb5_plugin: Install plugins to krb5 modules dir.
+ * BUG 13503: s3:winbind: Do not lookup local system accounts in AD.
+
+o Martin Schwenke <martin at meltin.net>
+ * BUG 13499: Don't use CTDB_BROADCAST_VNNMAP.
+ * BUG 13500: ctdb-daemon: Only consider client ID for local database attach.
+
+o Justin Stephenson <jstephen at redhat.com>
+ * BUG 13485: s3:client: Add "--quiet" option to smbclient.
+
+o Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
+ * BUG 13568: s3: vfs: time_audit: Fix handling of token_blob in
+ smb_time_audit_offload_read_recv().
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+ =============================
Release Notes for Samba 4.8.4
August 14, 2018
=============================
@@ -85,8 +200,8 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
=============================
Release Notes for Samba 4.8.3
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index cc08e0d..1b1e88a 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -365,7 +365,7 @@ def CHECK_CODE(conf, code, define,
headers=None, msg=None, cflags='', includes='# .',
local_include=True, lib=None, link=True,
define_ret=False, quote=False,
- on_target=True):
+ on_target=True, strict=False):
'''check if some code compiles and/or runs'''
if CONFIG_SET(conf, define):
@@ -395,6 +395,16 @@ def CHECK_CODE(conf, code, define,
cflags = TO_LIST(cflags)
+ # Be strict when relying on a compiler check
+ # Some compilers (e.g. xlc) ignore non-supported features as warnings
+ if strict:
+ extra_cflags = None
+ if conf.env["CC_NAME"] == "gcc":
+ extra_cflags = "-Werror"
+ elif conf.env["CC_NAME"] == "xlc":
+ extra_cflags = "-qhalt=w"
+ cflags.append(extra_cflags)
+
if local_include:
cflags.append('-I%s' % conf.curdir)
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 3b36b57..1567c4b 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -374,6 +374,7 @@ def configure(conf):
conf.CHECK_CODE('''int main(void) { return 0; }
__attribute__((visibility("default"))) void vis_foo2(void) {}''',
cflags=conf.env.VISIBILITY_CFLAGS,
+ strict=True,
define='HAVE_VISIBILITY_ATTR', addmain=False)
# check HAVE_CONSTRUCTOR_ATTRIBUTE
@@ -391,6 +392,7 @@ def configure(conf):
''',
'HAVE_CONSTRUCTOR_ATTRIBUTE',
addmain=False,
+ strict=True,
msg='Checking for library constructor support')
# check HAVE_DESTRUCTOR_ATTRIBUTE
@@ -408,6 +410,7 @@ def configure(conf):
''',
'HAVE_DESTRUCTOR_ATTRIBUTE',
addmain=False,
+ strict=True,
msg='Checking for library destructor support')
conf.CHECK_CODE('''
@@ -424,6 +427,7 @@ def configure(conf):
''',
'HAVE___ATTRIBUTE__',
addmain=False,
+ strict=True,
msg='Checking for __attribute__')
if sys.platform.startswith('aix'):
diff --git a/ctdb/client/client_tunnel.c b/ctdb/client/client_tunnel.c
index 17b6546..f3b1a00 100644
--- a/ctdb/client/client_tunnel.c
+++ b/ctdb/client/client_tunnel.c
@@ -431,8 +431,8 @@ struct tevent_req *ctdb_tunnel_request_send(TALLOC_CTX *mem_ctx,
};
if (destnode == CTDB_BROADCAST_ALL ||
- destnode == CTDB_BROADCAST_VNNMAP ||
- destnode == CTDB_BROADCAST_ALL) {
+ destnode == CTDB_BROADCAST_ACTIVE ||
+ destnode == CTDB_BROADCAST_CONNECTED) {
state->wait_for_reply = false;
}
if (! state->wait_for_reply) {
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index 82526b5..ffaa1a7 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -389,8 +389,8 @@ void ctdb_canonicalize_ip(const ctdb_sock_addr *ip, ctdb_sock_addr *cip)
sizeof(cip->ip.sin_addr));
} else {
cip->ip6.sin6_family = AF_INET6;
-#ifdef HAVE_SOCK_SIN_LEN
- cip->ip6.sin_len = sizeof(ctdb_sock_addr);
+#ifdef HAVE_SOCK_SIN6_LEN
+ cip->ip6.sin6_len = sizeof(ctdb_sock_addr);
#endif
cip->ip6.sin6_port = ip->ip6.sin6_port;
memcpy(&cip->ip6.sin6_addr,
diff --git a/ctdb/common/sock_io.c b/ctdb/common/sock_io.c
index 3f7138f..e9e2fa3 100644
--- a/ctdb/common/sock_io.c
+++ b/ctdb/common/sock_io.c
@@ -275,7 +275,7 @@ int sock_queue_write(struct sock_queue *queue, uint8_t *buf, size_t buflen)
{
struct tevent_req *req;
struct sock_queue_write_state *state;
- bool status;
+ struct tevent_queue_entry *qentry;
if (buflen >= INT32_MAX) {
return -1;
@@ -289,9 +289,9 @@ int sock_queue_write(struct sock_queue *queue, uint8_t *buf, size_t buflen)
state->pkt = buf;
state->pkt_size = (uint32_t)buflen;
- status = tevent_queue_add_entry(queue->queue, queue->ev, req,
+ qentry = tevent_queue_add_entry(queue->queue, queue->ev, req,
sock_queue_trigger, queue);
- if (! status) {
+ if (qentry == NULL) {
talloc_free(req);
return -1;
}
diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c
index f27eed7..f1e9763 100644
--- a/ctdb/common/system_util.c
+++ b/ctdb/common/system_util.c
@@ -154,7 +154,7 @@ static bool parse_ipv6(const char *s, const char *ifaces, unsigned port, ctdb_so
saddr->ip6.sin6_scope_id = if_nametoindex(ifaces);
}
-#ifdef HAVE_SOCK_SIN_LEN
+#ifdef HAVE_SOCK_SIN6_LEN
saddr->ip6.sin6_len = sizeof(*saddr);
#endif
return true;
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 8dfca3b..b7362a4 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -292,10 +292,9 @@
<title>Virtual Node Number (VNN) map</title>
<para>
Consists of the number of virtual nodes and mapping from
- virtual node numbers to physical node numbers. Virtual
- nodes host CTDB databases. Only nodes that are
- participating in the VNN map can become lmaster or dmaster
- for database records.
+ virtual node numbers to physical node numbers. Only nodes
+ that are participating in the VNN map can become lmaster for
+ database records.
</para>
</refsect3>
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 23cb7dc..25d0047 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -726,9 +726,12 @@ int ctdb_set_db_readonly(struct ctdb_context *ctdb,
int ctdb_process_deferred_attach(struct ctdb_context *ctdb);
-int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
+int32_t ctdb_control_db_attach(struct ctdb_context *ctdb,
+ TDB_DATA indata,
TDB_DATA *outdata,
- uint8_t db_flags, uint32_t client_id,
+ uint8_t db_flags,
+ uint32_t srcnode,
+ uint32_t client_id,
struct ctdb_req_control_old *c,
bool *async_reply);
int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata,
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index cb807e3..7189fab 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -44,7 +44,7 @@ enum ctdb_operation {
/* send a broadcast to all nodes in the cluster, active or not */
#define CTDB_BROADCAST_ALL 0xF0000002
/* send a broadcast to all nodes in the current vnn map */
-#define CTDB_BROADCAST_VNNMAP 0xF0000003
+#define CTDB_BROADCAST_ACTIVE 0xF0000003
/* send a broadcast to all connected nodes */
#define CTDB_BROADCAST_CONNECTED 0xF0000004
/* send a broadcast to selected connected nodes */
diff --git a/ctdb/protocol/protocol_debug.c b/ctdb/protocol/protocol_debug.c
index 4e15663..a34f5a8 100644
--- a/ctdb/protocol/protocol_debug.c
+++ b/ctdb/protocol/protocol_debug.c
@@ -264,8 +264,8 @@ static void ctdb_pnn_print(uint32_t pnn, FILE *fp)
fprintf(fp, "CURRENT");
} else if (pnn == CTDB_BROADCAST_ALL) {
fprintf(fp, "ALL");
- } else if (pnn == CTDB_BROADCAST_VNNMAP) {
- fprintf(fp, "VNNMAP");
+ } else if (pnn == CTDB_BROADCAST_ACTIVE) {
+ fprintf(fp, "ACTIVE");
} else if (pnn == CTDB_BROADCAST_CONNECTED) {
fprintf(fp, "CONNECTED");
} else if (pnn == CTDB_MULTICAST) {
diff --git a/ctdb/protocol/protocol_util.c b/ctdb/protocol/protocol_util.c
index 73652e7..c75555f 100644
--- a/ctdb/protocol/protocol_util.c
+++ b/ctdb/protocol/protocol_util.c
@@ -206,7 +206,7 @@ static int ipv6_from_string(const char *str, struct sockaddr_in6 *ip6)
return EINVAL;
}
-#ifdef HAVE_SOCK_SIN_LEN
+#ifdef HAVE_SOCK_SIN6_LEN
ip6->sin6_len = sizeof(*ip6);
#endif
return 0;
diff --git a/ctdb/server/ctdb_cluster_mutex.c b/ctdb/server/ctdb_cluster_mutex.c
index 9397746..804c6d5 100644
--- a/ctdb/server/ctdb_cluster_mutex.c
+++ b/ctdb/server/ctdb_cluster_mutex.c
@@ -19,11 +19,11 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <tevent.h>
-
#include "replace.h"
#include "system/network.h"
+#include <tevent.h>
+
#include "lib/util/debug.h"
#include "lib/util/time.h"
#include "lib/util/strv.h"
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index b537cd1..848010e 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -267,18 +267,34 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
}
case CTDB_CONTROL_DB_ATTACH:
- return ctdb_control_db_attach(ctdb, indata, outdata, 0, client_id,
- c, async_reply);
+ return ctdb_control_db_attach(ctdb,
+ indata,
+ outdata,
+ 0,
+ srcnode,
+ client_id,
+ c,
+ async_reply);
case CTDB_CONTROL_DB_ATTACH_PERSISTENT:
- return ctdb_control_db_attach(ctdb, indata, outdata,
- CTDB_DB_FLAGS_PERSISTENT, client_id,
- c, async_reply);
+ return ctdb_control_db_attach(ctdb,
+ indata,
+ outdata,
+ CTDB_DB_FLAGS_PERSISTENT,
+ srcnode,
+ client_id,
+ c,
+ async_reply);
case CTDB_CONTROL_DB_ATTACH_REPLICATED:
- return ctdb_control_db_attach(ctdb, indata, outdata,
- CTDB_DB_FLAGS_REPLICATED, client_id,
- c, async_reply);
+ return ctdb_control_db_attach(ctdb,
+ indata,
+ outdata,
+ CTDB_DB_FLAGS_REPLICATED,
+ srcnode,
+ client_id,
+ c,
+ async_reply);
case CTDB_CONTROL_SET_CALL:
return control_not_implemented("SET_CALL", NULL);
@@ -860,7 +876,7 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode,
return -1;
}
- if (((destnode == CTDB_BROADCAST_VNNMAP) ||
+ if (((destnode == CTDB_BROADCAST_ACTIVE) ||
(destnode == CTDB_BROADCAST_ALL) ||
(destnode == CTDB_BROADCAST_CONNECTED)) &&
!(flags & CTDB_CTRL_FLAG_NOREPLY)) {
@@ -868,7 +884,7 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode,
return -1;
}
- if (destnode != CTDB_BROADCAST_VNNMAP &&
+ if (destnode != CTDB_BROADCAST_ACTIVE &&
destnode != CTDB_BROADCAST_ALL &&
destnode != CTDB_BROADCAST_CONNECTED &&
(!ctdb_validate_pnn(ctdb, destnode) ||
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c
index c199aac..ca5bb12 100644
--- a/ctdb/server/ctdb_ltdb_server.c
+++ b/ctdb/server/ctdb_ltdb_server.c
@@ -1105,9 +1105,12 @@ int ctdb_process_deferred_attach(struct ctdb_context *ctdb)
/*
a client has asked to attach a new database
*/
-int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
+int32_t ctdb_control_db_attach(struct ctdb_context *ctdb,
+ TDB_DATA indata,
TDB_DATA *outdata,
- uint8_t db_flags, uint32_t client_id,
+ uint8_t db_flags,
+ uint32_t srcnode,
+ uint32_t client_id,
struct ctdb_req_control_old *c,
bool *async_reply)
{
@@ -1128,7 +1131,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
* allow all attach from the network since these are always from remote
* recovery daemons.
*/
- if (client_id != 0) {
+ if (srcnode == ctdb->pnn && client_id != 0) {
client = reqid_find(ctdb->idr, client_id, struct ctdb_client);
}
if (client != NULL) {
@@ -1535,9 +1538,15 @@ static void ctdb_ltdb_seqnum_check(struct tevent_context *ev,
TDB_DATA data;
data.dptr = (uint8_t *)&ctdb_db->db_id;
data.dsize = sizeof(uint32_t);
- ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_VNNMAP, 0,
- CTDB_CONTROL_UPDATE_SEQNUM, 0, CTDB_CTRL_FLAG_NOREPLY,
- data, NULL, NULL);
+ ctdb_daemon_send_control(ctdb,
+ CTDB_BROADCAST_ACTIVE,
+ 0,
+ CTDB_CONTROL_UPDATE_SEQNUM,
+ 0,
+ CTDB_CTRL_FLAG_NOREPLY,
+ data,
+ NULL,
+ NULL);
}
ctdb_db->seqnum = new_seqnum;
diff --git a/ctdb/server/ctdb_server.c b/ctdb/server/ctdb_server.c
index 8e31038..c991b85 100644
--- a/ctdb/server/ctdb_server.c
+++ b/ctdb/server/ctdb_server.c
@@ -394,14 +394,18 @@ static void ctdb_broadcast_packet_all(struct ctdb_context *ctdb,
}
/*
- broadcast a packet to all nodes in the current vnnmap
+ broadcast a packet to all active nodes
--
Samba Shared Repository
More information about the samba-cvs
mailing list