[SCM] Samba Shared Repository - branch v4-11-stable updated

Karolin Seeger kseeger at samba.org
Tue Mar 10 10:05:51 UTC 2020


The branch, v4-11-stable has been updated
       via  664f5488733 VERSION: Disable GIT_SNAPSHOT for the 4.11.7 release.
       via  9e3a577b275 WHATSNEW: Add release notes for Samba 4.11.7.
       via  2a9db8e77b4 selftest: Test behaviour of DNS scavenge with an existing dNSTombstoned value
       via  c130ca2bcc3 dsdb: Correctly handle memory in objectclass_attrs
       via  8cb7818a405 ldb: version 2.0.9
       via  17c43b99622 ldb: Add tests aimed at the SCOPE_ONELEVEL bug in particular
       via  b81fd260ebb ldb: Fix search with scope ONE and small result sets
       via  811d8057973 ldb: Ensure @IDXONE modes is tested in ldb.python (apy.py) tests
       via  e7ed0a80885 ldb: Add tests aimed at the SCOPE_ONELEVEL particular
       via  880c2d747aa ldb: Add tests for one-level indexes in conjunction with other indexes
       via  a95a8c7eaa4 smbd: Separate aio_pthread indicator from normal EINTR
       via  a33656c9df2 lib: Map EINPROGRESS->NT_STATUS_MORE_PROCESSING_REQUIRED
       via  64b2eda07fc test: Show that smbd does not handle EINTR from open() correctly
       via  0232cc46a35 test: Intercept open in vfs_error_inject
       via  ea1e73c2281 wafsamba: Do not use 'rU' as the 'U' is deprecated in Python 3.9
       via  370278fca39 s3: VFS: full_audit. Use system session_info if called from a temporary share definition.
       via  4ee5642bea3 auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
       via  40b7c3c99ae auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)
       via  972d4418ae0 ctdb-tcp: Make error handling for outbound connection consistent
       via  70a36a668ca winbindd: handling missing idmap in getgrgid()
       via  f778dc20b5a s3:auth_sam: map an empty domain or '.' to the local SAM name
       via  c880f3539a1 s3:selftest: test authentication with an empty userdomain and upn names
       via  58d1613609c s3:auth_sam: introduce effective_domain helper variables
       via  f8e11e6ca9a s3:auth_sam: make sure we never handle empty usernames
       via  5f8e3650f06 s3:auth_sam: unify the debug messages of all auth_sam*_auth() functions
       via  2db313bdb57 s3:auth_sam: replace confusing FALL_THROUGH; with break;
       via  5f57256cf52 script/release.sh: Don't use quotations any longer.
       via  0fbf07f0508 s4:torture: Skip the deltest20 as user root
       via  394e414b2dc lib:util: Log mkdir error on correct debug levels
       via  9349e689a86 s3: lib: nmblib. Clean up and harden nmb packet processing.
       via  040e0051e2b VERSION: Bump version up to 4.11.7...
       via  f5fa58a4177 VERSION: Disable GIT_SNAPSHOT for the 4.11.6 release.
       via  9ec0da774e3 WHATSNEW: Add release notes for Samba 4.11.6.
       via  79e7d1328ea smbd: Fix the build with clang
       via  bbacbd5f3f2 script/release.sh: make it possible to run from a git worktree
       via  c5f61b9dd0a VERSION: Bump version up to 4.11.6.
       via  5f735302220 Merge tag 'samba-4.11.5' into v4-11-test
       via  c5dee3fcee6 libsmbclient: If over SMB1 first try to do a posix stat on the file.
       via  e82e78b8747 s3:libsmb: Add a setup_stat_from_stat_ex() function
       via  8936e2d0274 s3:libsmb: Return a 'struct stat' buffer for SMBC_getatr()
       via  2db3606327f s3:libsmb: Add try_posixinfo to SMBSRV struct. Only enable for SMB1 with UNIX for now.
       via  fa22e5b6133 s3:libsmb: Generate the inode only based on the path component
       via  260d66aa0aa s3: libsmb: Move setting all struct stat fields into setup_stat().
       via  4eb710e3298 s3: libsmb: Move setting st->st_ino into setup_stat.
       via  463a2df2de7 s3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.
       via  ee215ff101d ctdb-tests: Skip some tests that don't work with IPv6
       via  103d94566f1 ctdb-scripts: Strip square brackets when gathering connection info
       via  890513b5b3c librpc: Fix string length checking in ndr_pull_charset_to_null()
       via  1d28d27070a source4/utils/oLschema2ldif: include stdint.h before cmocka.h
       via  3889444e008 lib/ldb/tests: include stdint.h before cmocka.h
       via  67e429d86ae vfs_ceph_snapshots: fix root relative path handling
       via  54a028bd32b upgradedns: ensure lmdb lock files linked
       via  75d088aede5 test upgradedns: ensure lmdb lock files linked
       via  276a07d8eff docs-xml/winbindnssinfo: clarify interaction with idmap_ad etc.
       via  3659b26bcb4 s3: VFS: glusterfs: Reset nlinks for symlink entries during readdir
       via  db5c0d6c05b Avoiding bad call flags with python 3.8, using METH_NOARGS instead of zero.
       via  a7505aabbe9 pygpo: use correct method flags
       via  5a75d981409 VERSION: Bump version up to 4.11.5...
      from  01a4dd8ea2b VERSION: Disable GIT_SNAPSHOT for the 4.11.5 release.

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


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       | 140 +++++-
 buildtools/wafsamba/samba_utils.py                 |   2 +-
 ctdb/config/functions                              |   6 +
 ctdb/tcp/tcp_connect.c                             |  36 +-
 ctdb/tests/complex/60_rogueip_releaseip.sh         |  10 +
 ctdb/tests/complex/61_rogueip_takeip.sh            |  14 +
 docs-xml/smbdotconf/winbind/winbindnssinfo.xml     |   9 +-
 lib/ldb/ABI/{ldb-2.0.5.sigs => ldb-2.0.9.sigs}     |   0
 ...yldb-util-1.1.10.sigs => pyldb-util-2.0.9.sigs} |   0
 lib/ldb/ldb_key_value/ldb_kv_index.c               |  21 +-
 lib/ldb/tests/ldb_key_value_sub_txn_test.c         |   1 +
 lib/ldb/tests/ldb_key_value_test.c                 |   1 +
 lib/ldb/tests/ldb_lmdb_size_test.c                 |   1 +
 lib/ldb/tests/ldb_lmdb_test.c                      |   1 +
 lib/ldb/tests/ldb_no_lmdb_test.c                   |   1 +
 lib/ldb/tests/python/api.py                        | 499 ++++++++++++++++++++-
 lib/ldb/tests/test_ldb_dn.c                        |   1 +
 lib/ldb/wscript                                    |   2 +-
 lib/util/util.c                                    |   7 +-
 libgpo/pygpo.c                                     |   2 +-
 librpc/ndr/ndr_string.c                            |  49 +-
 python/samba/provision/sambadns.py                 |  10 +
 python/samba/tests/auth_log_winbind.py             |   4 +-
 python/samba/tests/dns.py                          |  39 ++
 python/samba/tests/samba_upgradedns_lmdb.py        |  75 ++++
 script/release.sh                                  |  37 +-
 selftest/knownfail.d/empty-domain-name             |   7 +
 source3/auth/auth_sam.c                            |  85 +++-
 source3/include/libsmb_internal.h                  |  22 +-
 source3/lib/errmap_unix.c                          |   1 +
 source3/libsmb/libsmb_dir.c                        |  31 +-
 source3/libsmb/libsmb_file.c                       | 122 +++--
 source3/libsmb/libsmb_server.c                     |   9 +
 source3/libsmb/libsmb_stat.c                       | 132 +++---
 source3/libsmb/libsmb_xattr.c                      |  69 ++-
 source3/libsmb/nmblib.c                            |  12 +-
 source3/modules/vfs_aio_pthread.c                  |   2 +-
 source3/modules/vfs_ceph_snapshots.c               |  14 +-
 source3/modules/vfs_error_inject.c                 |  17 +
 source3/modules/vfs_full_audit.c                   |  20 +-
 source3/modules/vfs_glusterfs.c                    |   5 +-
 source3/script/tests/test_open_eintr.sh            |  66 +++
 source3/selftest/tests.py                          |  17 +
 source3/smbd/open.c                                |  38 +-
 source3/smbd/trans2.c                              |   2 +-
 source3/winbindd/winbindd_getgrgid.c               |   4 +
 source4/auth/gensec/pygensec.c                     |   2 +-
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |  17 +-
 source4/selftest/tests.py                          |   2 +
 source4/torture/basic/delete.c                     |   4 +
 source4/utils/oLschema2ldif/test.c                 |   1 +
 52 files changed, 1392 insertions(+), 279 deletions(-)
 copy lib/ldb/ABI/{ldb-2.0.5.sigs => ldb-2.0.9.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util-2.0.9.sigs} (100%)
 create mode 100644 python/samba/tests/samba_upgradedns_lmdb.py
 create mode 100644 selftest/knownfail.d/empty-domain-name
 create mode 100755 source3/script/tests/test_open_eintr.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 27b90031747..1e3ac6be9cf 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=11
-SAMBA_VERSION_RELEASE=5
+SAMBA_VERSION_RELEASE=7
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 99272550643..89e730b605e 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,139 @@
+                   ==============================
+                   Release Notes for Samba 4.11.7
+                           March 10, 2020
+		   ==============================
+
+
+This is the latest stable release of the Samba 4.11 release series.
+
+
+Changes since 4.11.6:
+---------------------
+
+o  Jeremy Allison <jra at samba.org>
+   * BUG 14239: s3: lib: nmblib. Clean up and harden nmb packet processing.
+   * BUG 14283: s3: VFS: full_audit. Use system session_info if called from a
+     temporary share definition.
+
+o  Andrew Bartlett <abartlet at samba.org>
+   * BUG 14258: dsdb: Correctly handle memory in objectclass_attrs.
+   * BUG 14270: ldb: version 2.0.9, Samba 4.11 and later give incorrect results
+     for SCOPE_ONE searches.
+
+o  Volker Lendecke <vl at samba.org>
+   * BUG 14247: auth: Fix CIDs 1458418 and 1458420 Null pointer dereferences.
+   * BUG 14285: smbd: Handle EINTR from open(2) properly.
+
+o  Stefan Metzmacher <metze at samba.org>
+   * BUG 14247: winbind member (source3) fails local SAM auth with empty domain
+     name.
+   * BUG 14265: winbindd: Handling missing idmap in getgrgid().
+
+o  Andreas Schneider <asn at samba.org>
+   * BUG 14253: lib:util: Log mkdir error on correct debug levels.
+   * BUG 14266: wafsamba: Do not use 'rU' as the 'U' is deprecated in
+     Python 3.9.
+
+o  Martin Schwenke <martin at meltin.net>
+   * BUG 14274: ctdb-tcp: Make error handling for outbound connection
+     consistent.
+
+
+#######################################
+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.11.6
+                          January 28, 2020
+		   ==============================
+
+
+This is the latest stable release of the Samba 4.11 release series.
+
+
+Changes since 4.11.5:
+---------------------
+
+o  Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
+   * BUG 14209: pygpo: Use correct method flags.
+
+o  David Disseldorp <ddiss at samba.org>
+   * BUG 14216: vfs_ceph_snapshots: Fix root relative path handling.
+
+o  Torsten Fohrer <torsten.fohrer at sbe.de>
+   * BUG 14209: Avoiding bad call flags with python 3.8, using METH_NOARGS
+     instead of zero.
+
+o  Fabrice Fontaine <fontaine.fabrice at gmail.com>
+   * BUG 14218: source4/utils/oLschema2ldif: Include stdint.h before cmocka.h.
+
+o  Björn Jacke <bjacke at samba.org>
+   * BUG 14122: docs-xml/winbindnssinfo: Clarify interaction with idmap_ad etc.
+
+o  Volker Lendecke <vl at samba.org>
+   * BUG 14251: smbd: Fix the build with clang.
+
+o  Gary Lockyer <gary at catalyst.net.nz>
+   * BUG 14199: upgradedns: Ensure lmdb lock files linked.
+
+o  Anoop C S <anoopcs at redhat.com>
+   * BUG 14182: s3: VFS: glusterfs: Reset nlinks for symlink entries during
+     readdir.
+
+o  Andreas Schneider <asn at samba.org>
+   * BUG 14101: smbc_stat() doesn't return the correct st_mode and also the
+     uid/gid is not filled (SMBv1) file.
+   * BUG 14219: librpc: Fix string length checking in
+     ndr_pull_charset_to_null().
+
+o  Martin Schwenke <martin at meltin.net>
+   * BUG 14227: ctdb-scripts: Strip square brackets when gathering connection
+     info.
+
+
+#######################################
+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 Samba 4.11.5
                           January 21, 2020
@@ -67,8 +203,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
 
                    ==============================
                    Release Notes for Samba 4.11.4
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index ad97de1859b..be022adc8f5 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -700,7 +700,7 @@ def PROCESS_SEPARATE_RULE(self, rule):
             cache[node] = True
             self.pre_recurse(node)
             try:
-                function_code = node.read('rU', None)
+                function_code = node.read('r', None)
                 exec(compile(function_code, node.abspath(), 'exec'), self.exec_dict)
             finally:
                 self.post_recurse(node)
diff --git a/ctdb/config/functions b/ctdb/config/functions
index 1dc16532890..2e9c3ef6bf0 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -977,10 +977,16 @@ update_tickles ()
 	_my_connections="${tickledir}/${_port}.connections.$$"
 	# Parentheses are needed around the filters for precedence but
 	# the parentheses can't be empty!
+	#
+	# Recent versions of ss print square brackets around IPv6
+	# addresses.  While it is desirable to update CTDB's address
+	# parsing and printing code, something needs to be done here
+	# for backward compatibility, so just delete the brackets.
 	ss -tn state established \
 	   "${_ip_filter:+( ${_ip_filter} )}" \
 	   "${_port_filter:+( ${_port_filter} )}" |
 	awk 'NR > 1 {print $4, $3}' |
+	tr -d '][' |
 	sort >"$_my_connections"
 
 	# Record our current tickles in a temporary file
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index a75f35a809e..04897f44249 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -183,16 +183,14 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
 	tnode->out_fd = socket(sock_out.sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
 	if (tnode->out_fd == -1) {
 		DBG_ERR("Failed to create socket\n");
-		return;
+		goto failed;
 	}
 
 	ret = set_blocking(tnode->out_fd, false);
 	if (ret != 0) {
 		DBG_ERR("Failed to set socket non-blocking (%s)\n",
 			strerror(errno));
-		close(tnode->out_fd);
-		tnode->out_fd = -1;
-		return;
+		goto failed;
 	}
 
 	set_close_on_exec(tnode->out_fd);
@@ -224,32 +222,22 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
 		sockout_size = sizeof(sock_out.ip6);
 		break;
 	default:
-		DEBUG(DEBUG_ERR, (__location__ " unknown family %u\n",
-			sock_in.sa.sa_family));
-		close(tnode->out_fd);
-		tnode->out_fd = -1;
-		return;
+		DBG_ERR("Unknown address family %u\n", sock_in.sa.sa_family);
+		/* Can't happen to due to address parsing restrictions */
+		goto failed;
 	}
 
 	ret = bind(tnode->out_fd, (struct sockaddr *)&sock_in, sockin_size);
 	if (ret == -1) {
 		DBG_ERR("Failed to bind socket (%s)\n", strerror(errno));
-		close(tnode->out_fd);
-		tnode->out_fd = -1;
-		return;
+		goto failed;
 	}
 
 	ret = connect(tnode->out_fd,
 		      (struct sockaddr *)&sock_out,
 		      sockout_size);
 	if (ret != 0 && errno != EINPROGRESS) {
-		ctdb_tcp_stop_connection(node);
-		tnode->connect_te = tevent_add_timer(ctdb->ev,
-						     tnode,
-						     timeval_current_ofs(1, 0),
-						     ctdb_tcp_node_connect,
-						     node);
-		return;
+		goto failed;
 	}
 
 	/* non-blocking connect - wait for write event */
@@ -268,6 +256,16 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
 					     timeval_current_ofs(1, 0),
 					     ctdb_tcp_node_connect,
 					     node);
+
+	return;
+
+failed:
+	ctdb_tcp_stop_connection(node);
+	tnode->connect_te = tevent_add_timer(ctdb->ev,
+					     tnode,
+					     timeval_current_ofs(1, 0),
+					     ctdb_tcp_node_connect,
+					     node);
 }
 
 /*
diff --git a/ctdb/tests/complex/60_rogueip_releaseip.sh b/ctdb/tests/complex/60_rogueip_releaseip.sh
index 88e4e554c34..99d0d406e6f 100755
--- a/ctdb/tests/complex/60_rogueip_releaseip.sh
+++ b/ctdb/tests/complex/60_rogueip_releaseip.sh
@@ -21,6 +21,16 @@ select_test_node_and_ips
 
 echo "Using $test_ip, which is onnode $test_node"
 
+# This test depends on being able to assign a duplicate address on a
+# 2nd node.  However, IPv6 guards against this and causes the test to
+# fail.
+case "$test_ip" in
+*:*)
+	echo "SKIPPING TEST: not supported for IPv6 addresses"
+	exit 0
+	;;
+esac
+
 get_test_ip_mask_and_iface
 
 echo "Finding another node that knows about $test_ip"
diff --git a/ctdb/tests/complex/61_rogueip_takeip.sh b/ctdb/tests/complex/61_rogueip_takeip.sh
index 2c5f7c5c999..e1981eba572 100755
--- a/ctdb/tests/complex/61_rogueip_takeip.sh
+++ b/ctdb/tests/complex/61_rogueip_takeip.sh
@@ -21,6 +21,20 @@ select_test_node_and_ips
 
 echo "Running test against node $test_node and IP $test_ip"
 
+# This test puts an address on an interface and then needs to quickly
+# configure that address and cause an IP takeover.  However, an IPv6
+# address will be tentative for a while so "quickly" is not possible".
+# When ctdb_control_takeover_ip() calls ctdb_sys_have_ip() it will
+# decide that the address is not present.  It then attempts a takeip,
+# which can fail if the address is suddenly present because it is no
+# longer tentative.
+case "$test_ip" in
+*:*)
+	echo "SKIPPING TEST: not supported for IPv6 addresses"
+	exit 0
+	;;
+esac
+
 get_test_ip_mask_and_iface
 
 echo "Deleting IP $test_ip from all nodes"
diff --git a/docs-xml/smbdotconf/winbind/winbindnssinfo.xml b/docs-xml/smbdotconf/winbind/winbindnssinfo.xml
index d8347442a8d..e6d17c256a1 100644
--- a/docs-xml/smbdotconf/winbind/winbindnssinfo.xml
+++ b/docs-xml/smbdotconf/winbind/winbindnssinfo.xml
@@ -22,11 +22,10 @@
 			Domain Controller does support the Microsoft "Services for Unix" (SFU)
 			LDAP schema, winbind can retrieve the login shell and the home
 			directory attributes directly from your Directory Server. For SFU 3.0 or 3.5 simply choose
-			"sfu", if you use SFU 2.0 please choose "sfu20". Note that
-			retrieving UID and GID from your ADS-Server requires to
-			use <parameter moreinfo="none">idmap config DOMAIN:backend</parameter> = ad
-			as well. The primary group membership is currently
-			always calculated via the "primaryGroupID" LDAP attribute.
+			"sfu", if you use SFU 2.0 please choose "sfu20".</para>
+			<para>Note that for the idmap backend <refentrytitle>idmap_ad</refentrytitle>
+			you need to configure those settings in the idmap configuration section.
+			Make sure to consult the documentation of the idmap backend that you are using.
 			</para>
 		</listitem>
 	</itemizedlist>
diff --git a/lib/ldb/ABI/ldb-2.0.5.sigs b/lib/ldb/ABI/ldb-2.0.9.sigs
similarity index 100%
copy from lib/ldb/ABI/ldb-2.0.5.sigs
copy to lib/ldb/ABI/ldb-2.0.9.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util-2.0.9.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util-2.0.9.sigs
diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c
index 0853b28fe40..8e756c1a8e5 100644
--- a/lib/ldb/ldb_key_value/ldb_kv_index.c
+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c
@@ -2113,16 +2113,19 @@ static int ldb_kv_index_dn_one(struct ldb_module *module,
 			       struct dn_list *list,
 			       enum key_truncation *truncation)
 {
-	/*
-	 * Ensure we do not shortcut on intersection for this list.
-	 * We must never be lazy and return an entry not in this
-	 * list.  This allows the index for
-	 * SCOPE_ONELEVEL to be trusted.
-	 */
-
-	list->strict = true;
-	return ldb_kv_index_dn_attr(
+	int ret = ldb_kv_index_dn_attr(
 	    module, ldb_kv, LDB_KV_IDXONE, parent_dn, list, truncation);
+	if (ret == LDB_SUCCESS) {
+		/*
+		 * Ensure we do not shortcut on intersection for this
+		 * list.  We must never be lazy and return an entry
+		 * not in this list.  This allows the index for
+		 * SCOPE_ONELEVEL to be trusted.
+		 */
+
+		list->strict = true;
+	}
+	return ret;
 }
 
 /*
diff --git a/lib/ldb/tests/ldb_key_value_sub_txn_test.c b/lib/ldb/tests/ldb_key_value_sub_txn_test.c
index e71f81b866e..1eafd2d79e9 100644
--- a/lib/ldb/tests/ldb_key_value_sub_txn_test.c
+++ b/lib/ldb/tests/ldb_key_value_sub_txn_test.c
@@ -37,6 +37,7 @@
  */
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <setjmp.h>
 #include <cmocka.h>
 
diff --git a/lib/ldb/tests/ldb_key_value_test.c b/lib/ldb/tests/ldb_key_value_test.c
index 3f31bb98350..458452e5dc4 100644
--- a/lib/ldb/tests/ldb_key_value_test.c
+++ b/lib/ldb/tests/ldb_key_value_test.c
@@ -39,6 +39,7 @@
  */
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <setjmp.h>
 #include <cmocka.h>
 
diff --git a/lib/ldb/tests/ldb_lmdb_size_test.c b/lib/ldb/tests/ldb_lmdb_size_test.c
index af015fa72b5..cd7ab03a1f0 100644
--- a/lib/ldb/tests/ldb_lmdb_size_test.c
+++ b/lib/ldb/tests/ldb_lmdb_size_test.c
@@ -43,6 +43,7 @@
  */
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <setjmp.h>
 #include <cmocka.h>
 
diff --git a/lib/ldb/tests/ldb_lmdb_test.c b/lib/ldb/tests/ldb_lmdb_test.c
index 78758bbbe16..798a1916281 100644
--- a/lib/ldb/tests/ldb_lmdb_test.c
+++ b/lib/ldb/tests/ldb_lmdb_test.c
@@ -40,6 +40,7 @@
  */
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <setjmp.h>
 #include <cmocka.h>
 
diff --git a/lib/ldb/tests/ldb_no_lmdb_test.c b/lib/ldb/tests/ldb_no_lmdb_test.c
index 8e5a6eee8d2..be23d744004 100644
--- a/lib/ldb/tests/ldb_no_lmdb_test.c
+++ b/lib/ldb/tests/ldb_no_lmdb_test.c
@@ -40,6 +40,7 @@
  */
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <setjmp.h>
 #include <cmocka.h>
 
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 4d55566a4ac..1d3d765e607 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -774,6 +774,60 @@ class SearchTests(LdbBaseTest):
         # instead use just the 16 bytes raw, which we just keep
         # to printable chars here for ease of handling.
 
+        self.l.add({"dn": "DC=ORG",
+                    "name": b"org",
+                    "objectUUID": b"0000000000abcdef"})
+        self.l.add({"dn": "DC=EXAMPLE,DC=ORG",
+                    "name": b"org",
+                    "objectUUID": b"0000000001abcdef"})
+        self.l.add({"dn": "OU=OU1,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #1",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcde3"})
+        self.l.add({"dn": "OU=OU2,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #2",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcde4"})
+        self.l.add({"dn": "OU=OU3,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #3",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcde5"})
+        self.l.add({"dn": "OU=OU4,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #4",
+                    "x": "z", "y": "b",
+                    "objectUUID": b"0023456789abcde6"})
+        self.l.add({"dn": "OU=OU5,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #5",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcde7"})
+        self.l.add({"dn": "OU=OU6,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #6",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcde8"})
+        self.l.add({"dn": "OU=OU7,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #7",
+                    "x": "y", "y": "c",
+                    "objectUUID": b"0023456789abcde9"})
+        self.l.add({"dn": "OU=OU8,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #8",
+                    "x": "y", "y": "b",
+                    "objectUUID": b"0023456789abcde0"})
+        self.l.add({"dn": "OU=OU9,DC=EXAMPLE,DC=ORG",
+                    "name": b"OU #9",
+                    "x": "y", "y": "a",
+                    "objectUUID": b"0023456789abcdea"})
+
+        self.l.add({"dn": "DC=EXAMPLE,DC=COM",
+                    "name": b"org",


-- 
Samba Shared Repository



More information about the samba-cvs mailing list