[SCM] Samba Shared Repository - branch v4-5-test updated

Karolin Seeger kseeger at samba.org
Fri Sep 16 11:00:06 UTC 2016


The branch, v4-5-test has been updated
       via  dbbf8dc ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control request
       via  fff928d s3/smbd: in call_trans2qfilepathinfo call lstat when dealing with posix pathnames
       via  0558f89 ctdb-packaging: Fix systemd network dependency
       via  b0f7867 ctdb-tests: Add new public IP takeover no-op test
       via  349e65c ctdb-tests: Factor out new local daemons functions ps_ctdbd
       via  30c93b0 ctdb-ipalloc: ipalloc_set_public_ips() can't fail
       via  78ae3ec ctdb-ipalloc: Move merged IP list creation to ipalloc()
       via  0d80ca2 ctdb-ipalloc: Drop known_ips argument from merged IP list creation
       via  9ec74b3 ctdb-ipalloc: Optimise check to see if IPs can be hosted
       via  7ca6d62 ctdb-ipalloc: Whether IPs can be hosted need not depend on merged IP list
       via  2476e08 ctdb-ipalloc: Store known public IPs in IP allocation state
       via  d7c1704 ctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS)
       via  99c3c78 ctdb-tools: CID 1125617 String not null terminated (STRING_NULL)
      from  d899b1b VERSION: Bump version up to 4.5.1...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test


- Log -----------------------------------------------------------------
commit dbbf8dcd7863fd4bd2989a7cf75520c5b788d186
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Sep 13 16:05:14 2016 +1000

    ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control request
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12259
    
    Even though database id is 32-bit, it's sent on wire as 64-bits.
    The database id is the first 32-bits on the wire.  This needs fixing
    eventually, but for now keep the same wire format.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit bdff6255af113827340adc3da609e127503d9ba5)
    
    Autobuild-User(v4-5-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-5-test): Fri Sep 16 12:59:09 CEST 2016 on sn-devel-144

commit fff928d76c7b0df9aee53b0545f4c61bd102da40
Author: Ralph Boehme <slow at samba.org>
Date:   Sun Sep 11 15:35:37 2016 +0200

    s3/smbd: in call_trans2qfilepathinfo call lstat when dealing with posix pathnames
    
    This might be an info level SMB_INFO_QUERY_ALL_EAS which is not covered
    by INFO_LEVEL_IS_UNIX(). If smb_fname is a symlink we would then stat it
    in POSIX context.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12256
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b13b3c11054f918f18841186a6efc5dedd2ffd66)

commit 0558f89c1c3396f7583ba1c0a5607458f418f573
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Sep 8 12:28:00 2016 +1000

    ctdb-packaging: Fix systemd network dependency
    
    https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ says:
    
      network.target has very little meaning during start-up. [...]
      Whether any network interfaces are already configured when it is
      reached is undefined. [...]
    
      network-online.target is a target that actively waits until the
      ne[t]work is "up",
    
    CTDB expects to be able to bind a socket to a node address and expects
    interfaces for public IP addresses to exist.  CTDB also doesn't expect
    time to jump, so also wait until time is synchronised.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12255
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Steve French <sfrench at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    Tested-by: Steve French <sfrench at samba.org>
    (cherry picked from commit 35dcaadc8ebc9ec80e04f1d2eee694ebc6914a31)

commit b0f786770192308967a462fb01cd814475376008
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 13 13:48:19 2016 +1000

    ctdb-tests: Add new public IP takeover no-op test
    
    Test with DisableIPFailover=1 and with no public IP addresses
    configured.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Wed Sep 14 12:30:30 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 9f6015f8a61f71db7239fb8dce94781629b1d4cc)

commit 349e65c0a4a856c29ac18afd19b5f80a2f036e5c
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 13 13:44:04 2016 +1000

    ctdb-tests: Factor out new local daemons functions ps_ctdbd
    
    Useful for being able to ensure that tests are doing what is expected.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 3adf9cad47532d9ebf7ae3e4e618dfe7100008fb)

commit 30c93b0307aceba5a1e7abb22175f0a5793f76b4
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 16:04:18 2016 +1000

    ctdb-ipalloc: ipalloc_set_public_ips() can't fail
    
    So make it a void function.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 7ec7d4f3c08799fa128401f08f2f810672b98ae8)

commit 78ae3ec06794ba7b1d1ae447ecb470091cbf933c
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 15:59:09 2016 +1000

    ctdb-ipalloc: Move merged IP list creation to ipalloc()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 7522a7aee8f4756639311d2450b723debd674c6b)

commit 0d80ca283be892af5baa44abad83ba202eb187af
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 15:57:23 2016 +1000

    ctdb-ipalloc: Drop known_ips argument from merged IP list creation
    
    This is available in the IP allocation state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit c1efb801a41f5b870317b14703b8a1cfecc5c68c)

commit 9ec74b33591a65ca10617a7280a50efe96ff6a31
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 15:51:58 2016 +1000

    ctdb-ipalloc: Optimise check to see if IPs can be hosted
    
    Add an early return if there are no known IP addresses.
    
    Also add an extra comment for clarification.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit fed251726facf30225a131d43658975d5f4befb5)

commit 7ca6d6216c0d32380e0883d8704d645565c7fa11
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 15:49:03 2016 +1000

    ctdb-ipalloc: Whether IPs can be hosted need not depend on merged IP list
    
    Merged IP list won't be available here...
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit dfc3b8855d0a740d4f5218fcda4b3f64d4d6cd17)

commit 2476e08d3f87df9dc013c1f671cb05d6ef8d8000
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 12 15:41:06 2016 +1000

    ctdb-ipalloc: Store known public IPs in IP allocation state
    
    This was dropped because it wasn't used, but it will be needed again.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 0e5c62d8fc7fa51b4fb1dd435fe9c776586e5947)

commit d7c170415ff28f33888858f5e0c39b51787f0b67
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Sep 2 13:23:36 2016 +1000

    ctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12244
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit bacdb2e0f8a5f75c21dd108635d700b59acf2791)

commit 99c3c78264b51e53eabded5ffd228caec92ee02b
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Sep 2 11:56:02 2016 +1000

    ctdb-tools: CID 1125617 String not null terminated (STRING_NULL)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12244
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 19b4fb22a6c62d0f616c5a914f1510ae15677249)

-----------------------------------------------------------------------

Summary of changes:
 ctdb/config/ctdb.service                     |  2 +-
 ctdb/protocol/protocol_control.c             | 14 ++----
 ctdb/server/ctdb_takeover.c                  |  6 +--
 ctdb/server/ipalloc.c                        | 48 ++++++++++++-------
 ctdb/server/ipalloc.h                        |  2 +-
 ctdb/server/ipalloc_private.h                |  1 +
 ctdb/tests/simple/19_ip_takeover_noop.sh     | 71 ++++++++++++++++++++++++++++
 ctdb/tests/simple/28_zero_eventscripts.sh    |  7 +--
 ctdb/tests/simple/scripts/local_daemons.bash | 10 ++++
 ctdb/tests/src/ctdb_takeover_tests.c         |  5 +-
 ctdb/tests/src/rb_test.c                     |  1 +
 ctdb/tools/ctdb.c                            |  1 +
 source3/smbd/trans2.c                        |  7 +--
 13 files changed, 128 insertions(+), 47 deletions(-)
 create mode 100755 ctdb/tests/simple/19_ip_takeover_noop.sh


Changeset truncated at 500 lines:

diff --git a/ctdb/config/ctdb.service b/ctdb/config/ctdb.service
index ea37c30..63cdfa9 100644
--- a/ctdb/config/ctdb.service
+++ b/ctdb/config/ctdb.service
@@ -1,6 +1,6 @@
 [Unit]
 Description=CTDB
-After=network.target
+After=network-online.target time-sync.target
 
 [Service]
 Type=forking
diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c
index d5237ec..a909fc6 100644
--- a/ctdb/protocol/protocol_control.c
+++ b/ctdb/protocol/protocol_control.c
@@ -49,7 +49,6 @@ struct ctdb_reply_control_wire {
 static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
 {
 	size_t len = 0;
-	uint64_t u64;
 
 	if (cd == NULL) {
 		return 0;
@@ -335,8 +334,7 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
 		break;
 
 	case CTDB_CONTROL_GET_DB_SEQNUM:
-		u64 = cd->data.db_id;
-		len = ctdb_uint64_len(u64);
+		len = ctdb_uint64_len((uint64_t)cd->data.db_id);
 		break;
 
 	case CTDB_CONTROL_DB_SET_HEALTHY:
@@ -452,8 +450,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
 static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
 				       uint8_t *buf)
 {
-	uint64_t u64;
-
 	switch (cd->opcode) {
 	case CTDB_CONTROL_PROCESS_EXISTS:
 		ctdb_pid_push(cd->data.pid, buf);
@@ -635,8 +631,7 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
 		break;
 
 	case CTDB_CONTROL_GET_DB_SEQNUM:
-		u64 = cd->data.db_id;
-		ctdb_uint64_push(u64, buf);
+		ctdb_uint32_push(cd->data.db_id, buf);
 		break;
 
 	case CTDB_CONTROL_DB_SET_HEALTHY:
@@ -735,7 +730,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
 				      struct ctdb_req_control_data *cd)
 {
 	int ret = 0;
-	uint64_t u64 = 0;
 
 	cd->opcode = opcode;
 
@@ -964,8 +958,8 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
 		break;
 
 	case CTDB_CONTROL_GET_DB_SEQNUM:
-		ret = ctdb_uint64_pull(buf, buflen, mem_ctx, &u64);
-		cd->data.db_id = (uint32_t)u64;
+		ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
+				       &cd->data.db_id);
 		break;
 
 	case CTDB_CONTROL_DB_SET_HEALTHY:
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index d10ffef..882ee49 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1607,11 +1607,7 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodem
 		return -1;
 	}
 
-	if (! ipalloc_set_public_ips(ipalloc_state, known_ips, available_ips)) {
-		DEBUG(DEBUG_ERR, ("Failed to set public IPs\n"));
-		talloc_free(tmp_ctx);
-		return -1;
-	}
+	ipalloc_set_public_ips(ipalloc_state, known_ips, available_ips);
 
 	if (! ipalloc_can_host_ips(ipalloc_state)) {
 		DEBUG(DEBUG_WARNING,("No nodes available to host public IPs yet\n"));
diff --git a/ctdb/server/ipalloc.c b/ctdb/server/ipalloc.c
index dd88f81..37804ea 100644
--- a/ctdb/server/ipalloc.c
+++ b/ctdb/server/ipalloc.c
@@ -106,8 +106,7 @@ static int getips_count_callback(void *param, void *data)
  * merged list of all public addresses needs to be built so that IP
  * allocation can be done. */
 static struct public_ip_list *
-create_merged_ip_list(struct ipalloc_state *ipalloc_state,
-		      struct ctdb_public_ip_list *known_ips)
+create_merged_ip_list(struct ipalloc_state *ipalloc_state)
 {
 	int i, j;
 	struct public_ip_list *ip_list;
@@ -116,14 +115,14 @@ create_merged_ip_list(struct ipalloc_state *ipalloc_state,
 
 	ip_tree = trbt_create(ipalloc_state, 0);
 
-	if (known_ips == NULL) {
+	if (ipalloc_state->known_public_ips == NULL) {
 		DEBUG(DEBUG_ERR, ("Known public IPs not set\n"));
 		return NULL;
 	}
 
 	for (i=0; i < ipalloc_state->num; i++) {
 
-		public_ips = &known_ips[i];
+		public_ips = &ipalloc_state->known_public_ips[i];
 
 		for (j=0; j < public_ips->num; j++) {
 			struct public_ip_list *tmp_ip;
@@ -225,16 +224,12 @@ void ipalloc_set_node_flags(struct ipalloc_state *ipalloc_state,
 	}
 }
 
-bool ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
+void ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
 			    struct ctdb_public_ip_list *known_ips,
 			    struct ctdb_public_ip_list *available_ips)
 {
 	ipalloc_state->available_public_ips = available_ips;
-
-	ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state,
-						       known_ips);
-
-	return (ipalloc_state->all_ips != NULL);
+	ipalloc_state->known_public_ips = known_ips;
 }
 
 /* This can only return false if there are no available IPs *and*
@@ -244,17 +239,31 @@ bool ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
 bool ipalloc_can_host_ips(struct ipalloc_state *ipalloc_state)
 {
 	int i;
-	struct public_ip_list *ip_list;
+	bool have_ips = false;
 
-
-	for (ip_list = ipalloc_state->all_ips;
-	     ip_list != NULL;
-	     ip_list = ip_list->next) {
-		if (ip_list->pnn != -1) {
-			return true;
+	for (i=0; i < ipalloc_state->num; i++) {
+		struct ctdb_public_ip_list *ips =
+			ipalloc_state->known_public_ips;
+		if (ips[i].num != 0) {
+			int j;
+			have_ips = true;
+			/* Succeed if an address is hosted on node i */
+			for (j=0; j < ips[i].num; j++) {
+				if (ips[i].ip[j].pnn == i) {
+					return true;
+				}
+			}
 		}
 	}
 
+	if (! have_ips) {
+		return false;
+	}
+
+	/* At this point there are known addresses but none are
+	 * hosted.  Need to check if cluster can now host some
+	 * addresses.
+	 */
 	for (i=0; i < ipalloc_state->num; i++) {
 		if (ipalloc_state->available_public_ips[i].num != 0) {
 			return true;
@@ -269,6 +278,11 @@ struct public_ip_list *ipalloc(struct ipalloc_state *ipalloc_state)
 {
 	bool ret = false;
 
+	ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
+	if (ipalloc_state->all_ips == NULL) {
+		return NULL;
+	}
+
 	switch (ipalloc_state->algorithm) {
 	case IPALLOC_LCP2:
 		ret = ipalloc_lcp2(ipalloc_state);
diff --git a/ctdb/server/ipalloc.h b/ctdb/server/ipalloc.h
index 66a5e75..d116426 100644
--- a/ctdb/server/ipalloc.h
+++ b/ctdb/server/ipalloc.h
@@ -56,7 +56,7 @@ void ipalloc_set_node_flags(struct ipalloc_state *ipalloc_state,
 			    uint32_t *tval_noiptakeover,
 			    uint32_t *tval_noiphostonalldisabled);
 
-bool ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
+void ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
 			    struct ctdb_public_ip_list *known_ips,
 			    struct ctdb_public_ip_list *available_ips);
 
diff --git a/ctdb/server/ipalloc_private.h b/ctdb/server/ipalloc_private.h
index 2328687..485f627 100644
--- a/ctdb/server/ipalloc_private.h
+++ b/ctdb/server/ipalloc_private.h
@@ -31,6 +31,7 @@ struct ipalloc_state {
 
 	/* Arrays with data for each node */
 	struct ctdb_public_ip_list *available_public_ips;
+	struct ctdb_public_ip_list *known_public_ips;
 	bool *noiptakeover;
 	bool *noiphost;
 
diff --git a/ctdb/tests/simple/19_ip_takeover_noop.sh b/ctdb/tests/simple/19_ip_takeover_noop.sh
new file mode 100755
index 0000000..4cfedb0
--- /dev/null
+++ b/ctdb/tests/simple/19_ip_takeover_noop.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+test_info()
+{
+    cat <<EOF
+Check that CTDB operates correctly if:
+
+* DisableIPFailover is set; or
+* there are 0 public IPs configured
+
+This test only does anything with local daemons.  On a real cluster it
+has no way of updating configuration.
+EOF
+}
+
+. "${TEST_SCRIPTS_DIR}/integration.bash"
+
+ctdb_test_init "$@"
+
+set -e
+
+cluster_is_healthy
+
+if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+	echo "SKIPPING this test - only runs against local daemons"
+	exit 0
+fi
+
+# Reset configuration
+ctdb_restart_when_done
+
+select_test_node_and_ips
+
+echo "Setting DisableIPFailover=1 on all nodes"
+try_command_on_node all $CTDB setvar DisableIPFailover 1
+
+echo "Getting \"before\" IP allocation..."
+try_command_on_node -v any $CTDB ip all
+before="$out"
+
+echo "Disabling node ${test_node}..."
+try_command_on_node "$test_node" $CTDB disable
+wait_until_node_has_status $test_node disabled
+
+echo "Getting \"after\" IP allocation..."
+try_command_on_node -v any $CTDB ip all
+after="$out"
+
+if [ "$before" == "$after" ] ; then
+	echo "GOOD: IP allocation is unchanged"
+	echo
+else
+	die "BAD: IP allocation changed"
+fi
+
+echo "----------------------------------------"
+
+daemons_stop
+
+echo "Starting CTDB with an empty public addresses configuration..."
+CTDB_PUBLIC_ADDRESSES="/dev/null" daemons_start
+
+wait_until_ready
+
+echo "Trying explicit ipreallocate..."
+try_command_on_node any $CTDB ipreallocate
+
+echo "Good, that seems to work!"
+echo
+
+ps_ctdbd
diff --git a/ctdb/tests/simple/28_zero_eventscripts.sh b/ctdb/tests/simple/28_zero_eventscripts.sh
index 7c03ae4..fc31c4a 100755
--- a/ctdb/tests/simple/28_zero_eventscripts.sh
+++ b/ctdb/tests/simple/28_zero_eventscripts.sh
@@ -35,11 +35,6 @@ CTDB_EVENT_SCRIPT_DIR="$empty_dir" daemons_start
 
 wait_until_ready
 
-# If this fails to find processes then the tests fails, so look at
-# full command-line so this will work with valgrind.  Note that the
-# output could be generated with pgrep's -a option but it doesn't
-# exist in older versions.
-ps -p $(pgrep -f '\<ctdbd\>' | xargs | sed -e 's| |,|g') -o args ww
+ps_ctdbd
 
-echo
 echo "Good, that seems to work!"
diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash
index fb1e7e1..2d6ec56 100644
--- a/ctdb/tests/simple/scripts/local_daemons.bash
+++ b/ctdb/tests/simple/scripts/local_daemons.bash
@@ -173,3 +173,13 @@ _restart_ctdb_all ()
     daemons_stop
     daemons_start
 }
+
+ps_ctdbd ()
+{
+	# If this fails to find processes then the tests fails, so
+	# look at full command-line so this will work with valgrind.
+	# Note that the output could be generated with pgrep's -a
+	# option but it doesn't exist in older versions.
+	ps -p $(pgrep -f '\<ctdbd\>' | xargs | sed -e 's| |,|g') -o args ww
+	echo
+}
diff --git a/ctdb/tests/src/ctdb_takeover_tests.c b/ctdb/tests/src/ctdb_takeover_tests.c
index a8f7841..bbeb241 100644
--- a/ctdb/tests/src/ctdb_takeover_tests.c
+++ b/ctdb/tests/src/ctdb_takeover_tests.c
@@ -300,10 +300,7 @@ static void ctdb_test_init(TALLOC_CTX *mem_ctx,
 				 read_ips_for_multiple_nodes,
 				 &known, &avail);
 
-	if (! ipalloc_set_public_ips(*ipalloc_state, known, avail)) {
-		DEBUG(DEBUG_ERR, ("Failed to set public IPs\n"));
-		exit(1);
-	}
+	ipalloc_set_public_ips(*ipalloc_state, known, avail);
 
 	tval_noiptakeover = get_tunable_values(mem_ctx, nodemap->num,
 					       "CTDB_SET_NoIPTakeover");
diff --git a/ctdb/tests/src/rb_test.c b/ctdb/tests/src/rb_test.c
index e5c3de6..7dc0629 100644
--- a/ctdb/tests/src/rb_test.c
+++ b/ctdb/tests/src/rb_test.c
@@ -143,6 +143,7 @@ int main(int argc, const char *argv[])
 	 */
 	for (i=0; i<num_records; i++) {
 		data = trbt_lookup32(tree, i);
+		assert(data != NULL);
 		if (i < 3) {
 			assert(*data == 1);
 		} else {
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index a8e79ee..9df6b4e 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -4413,6 +4413,7 @@ static int control_dumpdbbackup(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
 			argv[0]);
 		return ret;
 	}
+	db_hdr.name[sizeof(db_hdr.name)-1] = '\0';
 
 	if (db_hdr.version != DB_VERSION) {
 		fprintf(stderr,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 1775316..a01bb81 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5767,7 +5767,8 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 			}
 			if (info_level == SMB_QUERY_FILE_UNIX_BASIC ||
 					info_level == SMB_QUERY_FILE_UNIX_INFO2 ||
-					info_level == SMB_QUERY_FILE_UNIX_LINK) {
+					info_level == SMB_QUERY_FILE_UNIX_LINK ||
+					req->posix_pathnames) {
 				ucf_flags |= UCF_UNIX_NAME_LOOKUP;
 			}
 		}
@@ -5831,7 +5832,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 				return;
 			}
 
-			if (INFO_LEVEL_IS_UNIX(info_level)) {
+			if (INFO_LEVEL_IS_UNIX(info_level) || req->posix_pathnames) {
 				/* Always do lstat for UNIX calls. */
 				if (SMB_VFS_LSTAT(conn, smb_fname_base) != 0) {
 					DEBUG(3,("call_trans2qfilepathinfo: "
@@ -5877,7 +5878,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 			}
 		}
 
-		if (INFO_LEVEL_IS_UNIX(info_level)) {
+		if (INFO_LEVEL_IS_UNIX(info_level) || req->posix_pathnames) {
 			/* Always do lstat for UNIX calls. */
 			if (SMB_VFS_LSTAT(conn, smb_fname)) {
 				DEBUG(3,("call_trans2qfilepathinfo: "


-- 
Samba Shared Repository



More information about the samba-cvs mailing list