The Samba-Bugzilla – Attachment 15418 Details for
Bug 14059
Backport sambadowngradedatabase for v4.11
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch with new ldb version number for 4.11.0
ldb-2.0.6-and_samba_downgrade_db_for-4.11.patch (text/plain), 49.30 KB, created by
Andrew Bartlett
on 2019-08-23 00:11:23 UTC
(
hide
)
Description:
patch with new ldb version number for 4.11.0
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2019-08-23 00:11:23 UTC
Size:
49.30 KB
patch
obsolete
>From 353a51fffae326732374f37a89d1b84c7d805df6 Mon Sep 17 00:00:00 2001 >From: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Date: Mon, 22 Jul 2019 15:29:03 +1200 >Subject: [PATCH 01/12] downgradedatabase: comply with samba.tests.source > >In next commit we'll install the script, samba.tests.source picked up the >lack of a copyright message and some whitespace errors, so this patch >fixes that stuff first. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit c4aebb15001c830a46d5a6ad8ea11a6f9ea4fd04) >--- > source4/scripting/bin/sambadowngradedatabase | 26 +++++++++++++++++++++++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > >diff --git a/source4/scripting/bin/sambadowngradedatabase b/source4/scripting/bin/sambadowngradedatabase >index 9d1e2b8cc76..87a989bfd6a 100755 >--- a/source4/scripting/bin/sambadowngradedatabase >+++ b/source4/scripting/bin/sambadowngradedatabase >@@ -1,4 +1,24 @@ >-#!/usr/bin/env python3 >+#!/usr/bin/python3 >+# >+# Unix SMB/CIFS implementation. >+# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2019 >+# >+# Downgrade a database from 4.11 format to 4.7 format. 4.7 Format will >+# run on any version of Samba AD, and Samba will repack/reconfigure the >+# database if necessary. >+# >+# This program is free software; you can redistribute it and/or modify >+# it under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# This program is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with this program. If not, see <http://www.gnu.org/licenses/>. > from __future__ import print_function > import optparse > import sys >@@ -38,9 +58,9 @@ samdb = ldb.Ldb(url=url, > options=["modules:"]) > > partitions = samdb.search(base="@PARTITION", >- scope=ldb.SCOPE_BASE, >+ scope=ldb.SCOPE_BASE, > attrs=["backendStore", "partition"]) >- >+ > backend = str(partitions[0].get('backendStore', 'tdb')) > > if backend == "mdb": >-- >2.11.0 > > >From 4647c4c7da19b0700eee10df21a206b1eacf14e1 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Mon, 29 Jul 2019 13:35:08 +1200 >Subject: [PATCH 02/12] tests: Avoid hardcoding relative filepath > >If we move the test file, the test will break. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit a8cdbe0b824f57f73eee09143148f009a9c58582) >--- > python/samba/tests/blackbox/downgradedatabase.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/python/samba/tests/blackbox/downgradedatabase.py b/python/samba/tests/blackbox/downgradedatabase.py >index a5e540c1354..4a8411b1f1a 100644 >--- a/python/samba/tests/blackbox/downgradedatabase.py >+++ b/python/samba/tests/blackbox/downgradedatabase.py >@@ -23,8 +23,8 @@ import shutil > from subprocess import check_output > from samba.samdb import SamDB > >-COMMAND = os.path.join(os.path.dirname(__file__), >- "../../../../../source4/scripting/bin/sambadowngradedatabase") >+COMMAND = os.path.join(os.environ.get("SRCDIR_ABS"), >+ "source4/scripting/bin/sambadowngradedatabase") > > > class DowngradeTestBase(BlackboxTestCase): >-- >2.11.0 > > >From 3f7c0ccb79f10f4c181fc7ecf218cba51d8638ae Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Mon, 29 Jul 2019 13:39:04 +1200 >Subject: [PATCH 03/12] downgradedatabase: rename to samba_downgrade_db > >Just so that it's slightly less of a mouthful for users. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit fdaaee8d3aac77d91642a7d75d4bcd15d4df8657) >--- > python/samba/tests/blackbox/downgradedatabase.py | 2 +- > selftest/knownfail.d/usage | 2 +- > source4/scripting/bin/{sambadowngradedatabase => samba_downgrade_db} | 0 > 3 files changed, 2 insertions(+), 2 deletions(-) > rename source4/scripting/bin/{sambadowngradedatabase => samba_downgrade_db} (100%) > >diff --git a/python/samba/tests/blackbox/downgradedatabase.py b/python/samba/tests/blackbox/downgradedatabase.py >index 4a8411b1f1a..3d230609efc 100644 >--- a/python/samba/tests/blackbox/downgradedatabase.py >+++ b/python/samba/tests/blackbox/downgradedatabase.py >@@ -24,7 +24,7 @@ from subprocess import check_output > from samba.samdb import SamDB > > COMMAND = os.path.join(os.environ.get("SRCDIR_ABS"), >- "source4/scripting/bin/sambadowngradedatabase") >+ "source4/scripting/bin/samba_downgrade_db") > > > class DowngradeTestBase(BlackboxTestCase): >diff --git a/selftest/knownfail.d/usage b/selftest/knownfail.d/usage >index 23d52c0b727..0a495858e8c 100644 >--- a/selftest/knownfail.d/usage >+++ b/selftest/knownfail.d/usage >@@ -25,7 +25,7 @@ samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_rebuildextendedd > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_renamedc.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_repl_cleartext_pwd_py.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_rodcdns.none. >-samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_sambadowngradedatabase.none. >+samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_downgrade_db.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_gpupdate.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_gpupdate_.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_kcc.none. >diff --git a/source4/scripting/bin/sambadowngradedatabase b/source4/scripting/bin/samba_downgrade_db >similarity index 100% >rename from source4/scripting/bin/sambadowngradedatabase >rename to source4/scripting/bin/samba_downgrade_db >-- >2.11.0 > > >From ebd4ddbaf036b6595d80438e0e38a592e70e32d3 Mon Sep 17 00:00:00 2001 >From: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Date: Mon, 22 Jul 2019 13:35:21 +1200 >Subject: [PATCH 04/12] downgradedatabase: Add man-page documentation > >A man-page is needed so that we can install this tool as part of the >Samba package. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit c89df3862b17fad9c4648b5d9c6805120d732df8) >--- > docs-xml/manpages/samba_downgrade_db.8.xml | 95 ++++++++++++++++++++++++++++++ > docs-xml/wscript_build | 1 + > 2 files changed, 96 insertions(+) > create mode 100644 docs-xml/manpages/samba_downgrade_db.8.xml > >diff --git a/docs-xml/manpages/samba_downgrade_db.8.xml b/docs-xml/manpages/samba_downgrade_db.8.xml >new file mode 100644 >index 00000000000..7b0c822cf21 >--- /dev/null >+++ b/docs-xml/manpages/samba_downgrade_db.8.xml >@@ -0,0 +1,95 @@ >+<?xml version="1.0" encoding="iso-8859-1"?> >+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc"> >+<refentry id="samba_downgrade_db.8"> >+ >+<refmeta> >+ <refentrytitle>samba_downgrade_db</refentrytitle> >+ <manvolnum>8</manvolnum> >+ <refmiscinfo class="source">Samba</refmiscinfo> >+ <refmiscinfo class="manual">User Commands</refmiscinfo> >+ <refmiscinfo class="version">&doc.version;</refmiscinfo> >+</refmeta> >+ >+ >+<refnamediv> >+ <refname>samba_downgrade_db</refname> >+ <refpurpose>Samba tool for downgrading AD databases >+ </refpurpose> >+</refnamediv> >+ >+<refsynopsisdiv> >+ <cmdsynopsis> >+ <command>samba_downgrade_db</command> >+ <arg choice="opt">-H</arg> >+ <arg choice="opt">-s</arg> >+ </cmdsynopsis> >+</refsynopsisdiv> >+ >+<refsect1> >+ <title>DESCRIPTION</title> >+ <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle> >+ <manvolnum>8</manvolnum></citerefentry> suite.</para> >+ >+ <para>The format of the Samba Active Directory (AD) database changed in >+ version 4.8 and 4.11. When downgrading a Samba AD Domain Controller (DC) >+ to a release that is older than either of these versions (e.g. 4.11 to >+ 4.10), the AD database must be manually downgraded >+ <emphasis>before</emphasis> the Samba packages can be safely downgraded. >+ </para> >+ >+ <para>This tool downgrades a Samba sam.ldb database from the format >+ used in version &doc.version; to that of version 4.7. The v4.7 database >+ format can safely be read by any version of Samba. If necessary, later >+ versions of Samba will repack and reconfigure a v4.7-format database when >+ the samba executable is first started.</para> >+ >+ <para>Note that all Samba services must be stopped on the DC before running >+ this tool. Once the tool has run, do not restart samba or modify the >+ database before the Samba software package has been downgraded. >+ </para> >+</refsect1> >+ >+<refsect1> >+ <title>OPTIONS</title> >+ >+ <variablelist> >+ >+ <varlistentry> >+ <term>-H [sam.ldb file]</term> >+ <listitem><para> >+ Link directly to a sam.ldb file instead of using path in system >+ smb.conf >+ </para></listitem> >+ </varlistentry> >+ >+ <varlistentry> >+ <term>-s [smb.conf file]</term> >+ <listitem><para> >+ Link directly to smb.conf file instead of system default (usually >+ in /usr/local/samba/etc/smb.conf) >+ </para></listitem> >+ </varlistentry> >+ >+ </variablelist> >+</refsect1> >+ >+<refsect1> >+ <title>VERSION</title> >+ >+ <para>This man page is complete for version &doc.version; of the Samba >+ suite.</para> >+</refsect1> >+ >+<refsect1> >+ <title>AUTHOR</title> >+ >+ <para>The original Samba software and related utilities >+ were created by Andrew Tridgell. Samba is now developed >+ by the Samba Team as an Open Source project similar >+ to the way the Linux kernel is developed.</para> >+ >+ <para>The samba_downgrade_db tool was developed by the Samba team >+ at Catalyst IT Ltd.</para> >+</refsect1> >+ >+</refentry> >diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build >index 575fb702b46..3dad0a21313 100644 >--- a/docs-xml/wscript_build >+++ b/docs-xml/wscript_build >@@ -31,6 +31,7 @@ manpages=''' > manpages/samba-tool.8 > manpages/samba.7 > manpages/samba.8 >+ manpages/samba_downgrade_db.8 > manpages/sharesec.1 > manpages/smbcacls.1 > manpages/smbclient.1 >-- >2.11.0 > > >From 9eb22afd9289f9fb3756eb6e4e1f654f2972a19a Mon Sep 17 00:00:00 2001 >From: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Date: Mon, 22 Jul 2019 13:35:21 +1200 >Subject: [PATCH 05/12] downgradedatabase: installing script > >Installing downgrade script so people don't need the source tree for it. > >Exception added in usage test because running the script without arguments >is valid. (This avoids the need to knownfail it). > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit 6dcf00ba0a470ba25aabae06b409ec95404c246f) >--- > python/samba/tests/usage.py | 2 ++ > selftest/knownfail.d/usage | 1 - > source4/scripting/bin/wscript_build | 3 ++- > source4/scripting/wscript_build | 2 +- > 4 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/python/samba/tests/usage.py b/python/samba/tests/usage.py >index ba18a3e0729..4b7bccde758 100644 >--- a/python/samba/tests/usage.py >+++ b/python/samba/tests/usage.py >@@ -78,6 +78,8 @@ EXCLUDE_USAGE = { > 'selftest/tap2subunit', > 'script/show_test_time', > 'source4/scripting/bin/subunitrun', >+ 'bin/samba_downgrade_db', >+ 'source4/scripting/bin/samba_downgrade_db', > 'source3/selftest/tests.py', > 'selftest/tests.py', > 'python/samba/subunit/run.py', >diff --git a/selftest/knownfail.d/usage b/selftest/knownfail.d/usage >index 0a495858e8c..3e54f80a2de 100644 >--- a/selftest/knownfail.d/usage >+++ b/selftest/knownfail.d/usage >@@ -25,7 +25,6 @@ samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_rebuildextendedd > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_renamedc.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_repl_cleartext_pwd_py.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_rodcdns.none. >-samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_downgrade_db.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_gpupdate.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_gpupdate_.none. > samba.tests.usage.samba.tests.usage.PythonScriptUsageTests.test_samba_kcc.none. >diff --git a/source4/scripting/bin/wscript_build b/source4/scripting/bin/wscript_build >index 42b37faa32a..87d23545487 100644 >--- a/source4/scripting/bin/wscript_build >+++ b/source4/scripting/bin/wscript_build >@@ -7,6 +7,7 @@ if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'): > 'samba_kcc', > 'samba_upgradeprovision', > 'samba_upgradedns', >- 'gen_output.py']: >+ 'gen_output.py', >+ 'samba_downgrade_db']: > bld.SAMBA_SCRIPT(script, pattern=script, installdir='.') > bld.SAMBA_SCRIPT('samba-gpupdate', pattern='samba-gpupdate', installdir='.') >diff --git a/source4/scripting/wscript_build b/source4/scripting/wscript_build >index df24e921cd9..31c395d3e4b 100644 >--- a/source4/scripting/wscript_build >+++ b/source4/scripting/wscript_build >@@ -4,7 +4,7 @@ from samba_utils import MODE_755 > > sbin_files = '' > if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'): >- sbin_files = 'bin/samba_dnsupdate bin/samba_spnupdate bin/samba_upgradedns bin/samba_kcc ' >+ sbin_files = 'bin/samba_downgrade_db bin/samba_dnsupdate bin/samba_spnupdate bin/samba_upgradedns bin/samba_kcc ' > sbin_files += 'bin/samba-gpupdate' > man_files = 'man/samba-gpupdate.8' > >-- >2.11.0 > > >From d52c446e08dad0daf628df75c2a2745b8f039c4f Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Tue, 30 Jul 2019 16:40:55 +1200 >Subject: [PATCH 06/12] ldb: Always log when the database pack format changes > >LDB_DEBUG_WARNING gets logged by Samba as level 2, whereas the default >log level for Samba is 0. It's not really fair to the user to change the >format of their database on disk and potentially not tell them. > >This patch adds a log with level zero (using a alias define, as this >technically isn't a fatal problem). > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit a2b0fc7c00360f37ed6819f21380294b70d4a195) >--- > lib/ldb/include/ldb.h | 3 +++ > lib/ldb/ldb_key_value/ldb_kv_index.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h >index f06d5e95528..3cba0f4d543 100644 >--- a/lib/ldb/include/ldb.h >+++ b/lib/ldb/include/ldb.h >@@ -220,6 +220,9 @@ struct tevent_context; > enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR, > LDB_DEBUG_WARNING, LDB_DEBUG_TRACE}; > >+/* alias for something that's not a fatal error but we really want to log */ >+#define LDB_DEBUG_ALWAYS_LOG LDB_DEBUG_FATAL >+ > /** > the user can optionally supply a debug function. The function > is based on the vfprintf() style of interface, but with the addition >diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c >index ef275b28013..5de316579d7 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv_index.c >+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c >@@ -3571,7 +3571,7 @@ static int re_pack(struct ldb_kv_private *ldb_kv, > * want to spam the log. > */ > if ((!ctx->normal_record_seen) && (!ldb_dn_is_special(msg->dn))) { >- ldb_debug(ldb, LDB_DEBUG_WARNING, >+ ldb_debug(ldb, LDB_DEBUG_ALWAYS_LOG, > "Repacking database with format %#010x", > ldb_kv->pack_format_version); > ctx->normal_record_seen = true; >-- >2.11.0 > > >From bc282485bf7d2811b2700bcca01fe1d464113723 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Tue, 30 Jul 2019 15:02:25 +1200 >Subject: [PATCH 07/12] ldb: Move where we update the pack format version > >Store it on the repack context so that we can log a more informative >message "Repacking from format x to format y". > >While this is not really a big deal currently, it could be worth >recording for potential future scenarios (i.e. supporting three or more >pack versions), where upgrades could potentially skip an intermediary >pack format version. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit d427bd6c775d8117504e76eed42cd2c383512e34) >--- > lib/ldb/ldb_key_value/ldb_kv.c | 2 -- > lib/ldb/ldb_key_value/ldb_kv.h | 1 + > lib/ldb/ldb_key_value/ldb_kv_index.c | 3 +++ > 3 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/lib/ldb/ldb_key_value/ldb_kv.c b/lib/ldb/ldb_key_value/ldb_kv.c >index f768fb5e1e4..4e7b8a116b3 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv.c >+++ b/lib/ldb/ldb_key_value/ldb_kv.c >@@ -315,8 +315,6 @@ static int ldb_kv_maybe_repack(struct ldb_kv_private *ldb_kv) { > ldb_kv->target_pack_format_version) { > int r; > struct ldb_context *ldb = ldb_module_get_ctx(ldb_kv->module); >- ldb_kv->pack_format_version = >- ldb_kv->target_pack_format_version; > r = ldb_kv_repack(ldb_kv->module); > if (r != LDB_SUCCESS) { > ldb_debug(ldb, LDB_DEBUG_ERROR, >diff --git a/lib/ldb/ldb_key_value/ldb_kv.h b/lib/ldb/ldb_key_value/ldb_kv.h >index e627644ba34..f9dffae2dcf 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv.h >+++ b/lib/ldb/ldb_key_value/ldb_kv.h >@@ -175,6 +175,7 @@ struct ldb_kv_repack_context { > int error; > uint32_t count; > bool normal_record_seen; >+ uint32_t old_version; > }; > > >diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c >index 5de316579d7..eb84a790e00 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv_index.c >+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c >@@ -3595,10 +3595,13 @@ int ldb_kv_repack(struct ldb_module *module) > struct ldb_kv_repack_context ctx; > int ret; > >+ ctx.old_version = ldb_kv->pack_format_version; > ctx.count = 0; > ctx.error = LDB_SUCCESS; > ctx.normal_record_seen = false; > >+ ldb_kv->pack_format_version = ldb_kv->target_pack_format_version; >+ > /* Iterate all database records and repack them in the new format */ > ret = ldb_kv->kv_ops->iterate(ldb_kv, re_pack, &ctx); > if (ret < 0) { >-- >2.11.0 > > >From d3c9bbc2656209a45377c3deabd8b821657cd519 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Tue, 30 Jul 2019 15:15:40 +1200 >Subject: [PATCH 08/12] ldb: Change pack format defines to enum > >The main reason is so that any future pack formats will continue >incrementing this number in a sequential fashion. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit 38e3e7cd328edac302e95ac8839e858c4a225485) >--- > lib/ldb/include/ldb_module.h | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h >index ab3d25c5c6e..8c1e5ee7936 100644 >--- a/lib/ldb/include/ldb_module.h >+++ b/lib/ldb/include/ldb_module.h >@@ -559,12 +559,15 @@ int ldb_unpack_get_format(const struct ldb_val *data, > #define LDB_UNPACK_DATA_FLAG_NO_ATTRS 0x0008 > #define LDB_UNPACK_DATA_FLAG_READ_LOCKED 0x0010 > >-/* In-use packing formats */ >-#define LDB_PACKING_FORMAT 0x26011967 >-#define LDB_PACKING_FORMAT_V2 0x26011968 >+enum ldb_pack_format { > >-/* Old packing formats */ >-#define LDB_PACKING_FORMAT_NODN 0x26011966 >+ /* Old packing format (based on a somewhat arbitrary date) */ >+ LDB_PACKING_FORMAT_NODN = 0x26011966, >+ >+ /* In-use packing formats */ >+ LDB_PACKING_FORMAT, >+ LDB_PACKING_FORMAT_V2 >+}; > > /** > Forces a specific ldb handle to use the global event context. >-- >2.11.0 > > >From 4e1ce130539b6da42da09e20d2969db8d298d017 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Tue, 30 Jul 2019 16:40:55 +1200 >Subject: [PATCH 09/12] ldb: Log pack format in user-friendly way > >The "format 0x26011968" log confused me (and I'm a developer). >We can subtract the base offset from the pack format to get a more >user-friendly number, e.g. v0 (not actually used), v1, v2, etc. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit 5fee9388422e259c2a56e4dccbf44d22ba426ca3) >--- > lib/ldb/ldb_key_value/ldb_kv_index.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > >diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c >index eb84a790e00..27454d3f734 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv_index.c >+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c >@@ -3526,6 +3526,18 @@ static int re_index(struct ldb_kv_private *ldb_kv, > return 0; > } > >+/* >+ * Convert the 4-byte pack format version to a number that's slightly >+ * more intelligible to a user e.g. version 0, 1, 2, etc. >+ */ >+static uint32_t displayable_pack_version(uint32_t version) { >+ if (version < LDB_PACKING_FORMAT_NODN) { >+ return version; /* unknown - can't convert */ >+ } >+ >+ return (version - LDB_PACKING_FORMAT_NODN); >+} >+ > static int re_pack(struct ldb_kv_private *ldb_kv, > _UNUSED_ struct ldb_val key, > struct ldb_val val, >@@ -3572,8 +3584,9 @@ static int re_pack(struct ldb_kv_private *ldb_kv, > */ > if ((!ctx->normal_record_seen) && (!ldb_dn_is_special(msg->dn))) { > ldb_debug(ldb, LDB_DEBUG_ALWAYS_LOG, >- "Repacking database with format %#010x", >- ldb_kv->pack_format_version); >+ "Repacking database from v%u to v%u format", >+ displayable_pack_version(ctx->old_version), >+ displayable_pack_version(ldb_kv->pack_format_version)); > ctx->normal_record_seen = true; > } > >-- >2.11.0 > > >From 7f79a2f771e9b4d82fcb50899fcc974f6aca4f25 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Wed, 31 Jul 2019 10:33:49 +1200 >Subject: [PATCH 10/12] ldb: Log the partition we're repacking > >Firstly, with Samba AD this looks a little weird because we log the same >message 5 times (once for every partition). If we log that we're doing >this to records in different partitions, hopefully someone with a little >Samba knowledge can figure out what's going on. > >Secondly, the info about what partitions are actually changing might be >useful. E.g. if we hit a fatal error repacking the 3rd partition, and >the transaction doesn't abort properly, then it would be useful to know >what partitions were repacked and which ones weren't. > >There doesn't appear to be a useful name for the partition >(ldb_kv->kv_ops->name() doesn't seem any more intelligible to a user), >so just log the first record that we update. We can use that to infer >the partition database). > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >(cherry picked from commit ee6537c29e747206ee607493ce15d4532fb670c8) >--- > lib/ldb/ldb_key_value/ldb_kv_index.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c >index 27454d3f734..d955517ea10 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv_index.c >+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c >@@ -3584,9 +3584,11 @@ static int re_pack(struct ldb_kv_private *ldb_kv, > */ > if ((!ctx->normal_record_seen) && (!ldb_dn_is_special(msg->dn))) { > ldb_debug(ldb, LDB_DEBUG_ALWAYS_LOG, >- "Repacking database from v%u to v%u format", >+ "Repacking database from v%u to v%u format " >+ "(first record %s)", > displayable_pack_version(ctx->old_version), >- displayable_pack_version(ldb_kv->pack_format_version)); >+ displayable_pack_version(ldb_kv->pack_format_version), >+ ldb_dn_get_linearized(msg->dn)); > ctx->normal_record_seen = true; > } > >-- >2.11.0 > > >From ef202122b7ba13b65e5e121b68f21feebabb5f22 Mon Sep 17 00:00:00 2001 >From: Tim Beale <timbeale@catalyst.net.nz> >Date: Wed, 31 Jul 2019 10:54:29 +1200 >Subject: [PATCH 11/12] ldb: Free memory when repacking database > >The msg for each database record is allocated on the module context, but >never freed. The module seems like it could be a long-running context (as >the database would normally get repacked by the samba executable). > >Even if it's not a proper leak, it shouldn't hurt to cleanup the memory. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> > >Autobuild-User(master): Garming Sam <garming@samba.org> >Autobuild-Date(master): Tue Aug 20 04:57:10 UTC 2019 on sn-devel-184 > >(cherry picked from commit b6516dbd24df8c78ed909c7ef9058b0844abb917) >--- > lib/ldb/ldb_key_value/ldb_kv_index.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c >index d955517ea10..0853b28fe40 100644 >--- a/lib/ldb/ldb_key_value/ldb_kv_index.c >+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c >@@ -3599,6 +3599,7 @@ static int re_pack(struct ldb_kv_private *ldb_kv, > ctx->count); > } > >+ talloc_free(msg); > return 0; > } > >-- >2.11.0 > > >From 6d1b2b7f2c99c9fa5d1143d62502edf8c27da092 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Fri, 23 Aug 2019 12:02:05 +1200 >Subject: [PATCH 12/12] ldb: Release ldb 2.0.6 > > * log database repack so users know what is happening > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 > >Signed-off-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >--- > lib/ldb/ABI/ldb-2.0.6.sigs | 283 ++++++++++++++++++++++++++++++++++++++ > lib/ldb/ABI/pyldb-util-2.0.6.sigs | 2 + > lib/ldb/wscript | 2 +- > 3 files changed, 286 insertions(+), 1 deletion(-) > create mode 100644 lib/ldb/ABI/ldb-2.0.6.sigs > create mode 100644 lib/ldb/ABI/pyldb-util-2.0.6.sigs > >diff --git a/lib/ldb/ABI/ldb-2.0.6.sigs b/lib/ldb/ABI/ldb-2.0.6.sigs >new file mode 100644 >index 00000000000..5049dc64ce1 >--- /dev/null >+++ b/lib/ldb/ABI/ldb-2.0.6.sigs >@@ -0,0 +1,283 @@ >+ldb_add: int (struct ldb_context *, const struct ldb_message *) >+ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *) >+ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...) >+ldb_attr_casefold: char *(TALLOC_CTX *, const char *) >+ldb_attr_dn: int (const char *) >+ldb_attr_in_list: int (const char * const *, const char *) >+ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *) >+ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *) >+ldb_base64_decode: int (char *) >+ldb_base64_encode: char *(TALLOC_CTX *, const char *, int) >+ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *) >+ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val) >+ldb_binary_encode_string: char *(TALLOC_CTX *, const char *) >+ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) >+ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t) >+ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t) >+ldb_check_critical_controls: int (struct ldb_control **) >+ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) >+ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) >+ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **) >+ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *) >+ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *) >+ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) >+ldb_debug_add: void (struct ldb_context *, const char *, ...) >+ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level) >+ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) >+ldb_delete: int (struct ldb_context *, struct ldb_dn *) >+ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) >+ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) >+ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) >+ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) >+ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val) >+ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *) >+ldb_dn_check_special: bool (struct ldb_dn *, const char *) >+ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *) >+ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *) >+ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val) >+ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *) >+ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *) >+ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *) >+ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *) >+ldb_dn_get_casefold: const char *(struct ldb_dn *) >+ldb_dn_get_comp_num: int (struct ldb_dn *) >+ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int) >+ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int) >+ldb_dn_get_extended_comp_num: int (struct ldb_dn *) >+ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *) >+ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int) >+ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *) >+ldb_dn_get_linearized: const char *(struct ldb_dn *) >+ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) >+ldb_dn_get_rdn_name: const char *(struct ldb_dn *) >+ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *) >+ldb_dn_has_extended: bool (struct ldb_dn *) >+ldb_dn_is_null: bool (struct ldb_dn *) >+ldb_dn_is_special: bool (struct ldb_dn *) >+ldb_dn_is_valid: bool (struct ldb_dn *) >+ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) >+ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) >+ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) >+ldb_dn_minimise: bool (struct ldb_dn *) >+ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *) >+ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...) >+ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int) >+ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int) >+ldb_dn_remove_extended_components: void (struct ldb_dn *) >+ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *) >+ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val) >+ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *) >+ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *) >+ldb_dn_validate: bool (struct ldb_dn *) >+ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *) >+ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int) >+ldb_errstring: const char *(struct ldb_context *) >+ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **) >+ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *) >+ldb_filter_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *) >+ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *) >+ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *) >+ldb_get_create_perms: unsigned int (struct ldb_context *) >+ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *) >+ldb_get_event_context: struct tevent_context *(struct ldb_context *) >+ldb_get_flags: unsigned int (struct ldb_context *) >+ldb_get_opaque: void *(struct ldb_context *, const char *) >+ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *) >+ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *) >+ldb_global_init: int (void) >+ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *) >+ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *) >+ldb_handle_use_global_event_context: void (struct ldb_handle *) >+ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) >+ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) >+ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *) >+ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) >+ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) >+ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **) >+ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *) >+ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *) >+ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *) >+ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *) >+ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **) >+ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *) >+ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *) >+ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) >+ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) >+ldb_load_modules: int (struct ldb_context *, const char **) >+ldb_map_add: int (struct ldb_module *, struct ldb_request *) >+ldb_map_delete: int (struct ldb_module *, struct ldb_request *) >+ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *) >+ldb_map_modify: int (struct ldb_module *, struct ldb_request *) >+ldb_map_rename: int (struct ldb_module *, struct ldb_request *) >+ldb_map_search: int (struct ldb_module *, struct ldb_request *) >+ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *) >+ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope) >+ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *) >+ldb_match_msg_objectclass: int (const struct ldb_message *, const char *) >+ldb_mod_register_control: int (struct ldb_module *, const char *) >+ldb_modify: int (struct ldb_context *, const struct ldb_message *) >+ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *) >+ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *) >+ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **) >+ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int) >+ldb_module_flags: uint32_t (struct ldb_context *) >+ldb_module_get_ctx: struct ldb_context *(struct ldb_module *) >+ldb_module_get_name: const char *(struct ldb_module *) >+ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *) >+ldb_module_get_private: void *(struct ldb_module *) >+ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *) >+ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **) >+ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *) >+ldb_module_next: struct ldb_module *(struct ldb_module *) >+ldb_module_popt_options: struct poptOption **(struct ldb_context *) >+ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **) >+ldb_module_send_referral: int (struct ldb_request *, char *) >+ldb_module_set_next: void (struct ldb_module *, struct ldb_module *) >+ldb_module_set_private: void (struct ldb_module *, void *) >+ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type) >+ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *) >+ldb_modules_load: int (const char *, const char *) >+ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int) >+ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **) >+ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...) >+ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *) >+ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *) >+ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *) >+ldb_msg_add_string: int (struct ldb_message *, const char *, const char *) >+ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **) >+ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *) >+ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *) >+ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) >+ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *) >+ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) >+ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *) >+ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **) >+ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *) >+ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *) >+ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *) >+ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int) >+ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *) >+ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double) >+ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int) >+ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t) >+ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *) >+ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int) >+ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t) >+ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t) >+ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t) >+ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *) >+ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *) >+ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *) >+ldb_msg_new: struct ldb_message *(TALLOC_CTX *) >+ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **) >+ldb_msg_remove_attr: void (struct ldb_message *, const char *) >+ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *) >+ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *) >+ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *) >+ldb_msg_sort_elements: void (struct ldb_message *) >+ldb_next_del_trans: int (struct ldb_module *) >+ldb_next_end_trans: int (struct ldb_module *) >+ldb_next_init: int (struct ldb_module *) >+ldb_next_prepare_commit: int (struct ldb_module *) >+ldb_next_read_lock: int (struct ldb_module *) >+ldb_next_read_unlock: int (struct ldb_module *) >+ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *) >+ldb_next_request: int (struct ldb_module *, struct ldb_request *) >+ldb_next_start_trans: int (struct ldb_module *) >+ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *) >+ldb_options_copy: const char **(TALLOC_CTX *, const char **) >+ldb_options_find: const char *(struct ldb_context *, const char **, const char *) >+ldb_options_get: const char **(struct ldb_context *) >+ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t) >+ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *) >+ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **) >+ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *) >+ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *) >+ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *) >+ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *) >+ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t) >+ldb_register_backend: int (const char *, ldb_connect_fn, bool) >+ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *) >+ldb_register_hook: int (ldb_hook_fn) >+ldb_register_module: int (const struct ldb_module_ops *) >+ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *) >+ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *) >+ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *) >+ldb_req_get_custom_flags: uint32_t (struct ldb_request *) >+ldb_req_is_untrusted: bool (struct ldb_request *) >+ldb_req_location: const char *(struct ldb_request *) >+ldb_req_mark_trusted: void (struct ldb_request *) >+ldb_req_mark_untrusted: void (struct ldb_request *) >+ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t) >+ldb_req_set_location: void (struct ldb_request *, const char *) >+ldb_request: int (struct ldb_context *, struct ldb_request *) >+ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *) >+ldb_request_done: int (struct ldb_request *, int) >+ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *) >+ldb_request_get_status: int (struct ldb_request *) >+ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *) >+ldb_request_set_state: void (struct ldb_request *, int) >+ldb_reset_err_string: void (struct ldb_context *) >+ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***) >+ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *) >+ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *) >+ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *) >+ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *) >+ldb_schema_attribute_remove: void (struct ldb_context *, const char *) >+ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int) >+ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *) >+ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *) >+ldb_schema_set_override_indexlist: void (struct ldb_context *, bool) >+ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...) >+ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *) >+ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *) >+ldb_set_create_perms: void (struct ldb_context *, unsigned int) >+ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *) >+ldb_set_debug_stderr: int (struct ldb_context *) >+ldb_set_default_dns: void (struct ldb_context *) >+ldb_set_errstring: void (struct ldb_context *, const char *) >+ldb_set_event_context: void (struct ldb_context *, struct tevent_context *) >+ldb_set_flags: void (struct ldb_context *, unsigned int) >+ldb_set_modules_dir: void (struct ldb_context *, const char *) >+ldb_set_opaque: int (struct ldb_context *, const char *, void *) >+ldb_set_require_private_event_context: void (struct ldb_context *) >+ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int) >+ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *) >+ldb_set_utf8_default: void (struct ldb_context *) >+ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t)) >+ldb_setup_wellknown_attributes: int (struct ldb_context *) >+ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *) >+ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *) >+ldb_strerror: const char *(int) >+ldb_string_to_time: time_t (const char *) >+ldb_string_utc_to_time: time_t (const char *) >+ldb_timestring: char *(TALLOC_CTX *, time_t) >+ldb_timestring_utc: char *(TALLOC_CTX *, time_t) >+ldb_transaction_cancel: int (struct ldb_context *) >+ldb_transaction_cancel_noerr: int (struct ldb_context *) >+ldb_transaction_commit: int (struct ldb_context *) >+ldb_transaction_prepare_commit: int (struct ldb_context *) >+ldb_transaction_start: int (struct ldb_context *) >+ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *) >+ldb_unpack_data_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int) >+ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *) >+ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *) >+ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *) >+ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) >+ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) >+ldb_val_string_cmp: int (const struct ldb_val *, const char *) >+ldb_val_to_time: int (const struct ldb_val *, time_t *) >+ldb_valid_attr_name: int (const char *) >+ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list) >+ldb_wait: int (struct ldb_handle *, enum ldb_wait_type) >diff --git a/lib/ldb/ABI/pyldb-util-2.0.6.sigs b/lib/ldb/ABI/pyldb-util-2.0.6.sigs >new file mode 100644 >index 00000000000..74d6719d2bc >--- /dev/null >+++ b/lib/ldb/ABI/pyldb-util-2.0.6.sigs >@@ -0,0 +1,2 @@ >+pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) >+pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) >diff --git a/lib/ldb/wscript b/lib/ldb/wscript >index 61f6b664902..a63a6c2171f 100644 >--- a/lib/ldb/wscript >+++ b/lib/ldb/wscript >@@ -1,7 +1,7 @@ > #!/usr/bin/env python > > APPNAME = 'ldb' >-VERSION = '2.0.5' >+VERSION = '2.0.6' > > import sys, os > >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
garming
:
review+
Actions:
View
Attachments on
bug 14059
:
15401
| 15418