The branch, master has been updated
       via  31f3bc19d5a quic_ko_wrapper: Fix a typo
       via  6813b344e2c quic_ko_wrapper: Fix a comment
       via  954fe55c013 dsdb: Simplify samdb_cn_to_lDAPDisplayName()
       via  57828884265 dsdb: Simplify drs_ObjectIdentifier_to_debug_string()
       via  228a00b4cf6 dsdb: Simplify samdb_dn_to_dns_domain() with 
talloc_asprintf_addbuf()
       via  537bad67cbb smbd: Avoid a pointless if-statement
       via  2f8501f69cb smbd: Introduce helper vars in SMB_QUERY_POSIX_WHOAMI
       via  eed3d9120cc libcli: Avoid a talloc in ldap_encode_ndr_dom_sid()
       via  8894acb1b0f winbindd: Avoid casts in idmap_ad_unixids_to_sids()
       via  1a620e236ad winbindd: Avoid a few NULL checks in 
idmap_ad_unixids_to_sids()
       via  5f895598853 winbindd: Simplify winbindd_lookuprids_recv()
       via  41c90afc215 winbindd: Simplify wcache_make_sidlist()
       via  49646c14853 winbindd: Align integer types
       via  92e6b7cfe71 winbindd: Add a missing NULL check in 
winbindd_list_trusted_domains()
       via  49cd23a0faf winbindd: Modernize a DEBUG
       via  58a0ddfde56 winbindd: Simplify collect_onlinestatus()
       via  413d992562b winbindd: Simplify append_info3_as_txt()
       via  8227e27f599 winbindd: Simplify winbindd_getuserdomgroups_recv()
       via  beadf68818e winbindd: Call dom_sid_str_buf() only once
       via  356b203bc59 winbindd: dom_sid_str_buf() returns "buf"
       via  4d558193855 winbind: Simplify winbindd_xids_to_sids_recv() with 
talloc_asprintf_addbuf
       via  2778bdb3308 pam_winbind: Simplify 
_pam_compose_pwd_restriction_string
       via  d94ffa0dde7 ctdb-tests: Update README
       via  c39f36335cf ctdb-common: Remove unused function ctdb_set_helper()
       via  80f4f47293f ctdb-daemon: Remove helper variable CTDB_DEBUG_LOCKS
       via  369ba7c270b ctdb-tests: Reorder and group script variables, add 
comments
       via  82eb177e621 ctdb-tests: Remove unused helper variable 
CTDB_SCRIPTS_HELPER_BINDIR
       via  1d7e083e551 ctdb-daemon: Remove helper variable 
CTDB_CLUSTER_MUTEX_HELPER
       via  7a251cf2d62 ctdb-daemon: Remove helper variable CTDB_LOCK_HELPER
       via  6a9d6600ec9 ctdb-daemon: Remove helper variable CTDB_EVENTD
       via  ff9fe88905e ctdb-recoverd: Remove some helper variables
       via  2628f86c659 ctdb-tools: Remove some helper variables
       via  83cd1a37853 ctdb-common: Add path_helperdir() and 
path_helperdir_append()
       via  be430fe8752 ctdb-tests: Drop an unnecessary use of 
CTDB_SCRIPTS_HELPER_BINDIR
       via  b2f5b1f89c6 ctdb-tests: Use CTDB_TEST_HELPER_BINDIR inline
       via  9066b83a9b8 ctdb-tests: Remove redundant PATH adds
       via  6c456491284 ctdb-tests: Add CTDB_TEST_HELPER_BINDIR
       via  88165090a31 ctdb-tests: Silence some shellcheck complaints
       via  48523ec0fe0 ctdb-tests: Reformat with "shfmt -w -i 0 -fn"
       via  ad933b2bd8d ctdb-tests: Add a useful comment
       via  e4aae52c60e ctdb-tests: Remove unused variables
       via  0b810c89c80 ctdb-build: Store generator rules in variables
       via  63c7da3407e ctdb-build: Ensure generated scripts are executable and 
symlinked
       via  5304732649c wafsamba: Add support for chmod of generated items
       via  edc85d0a73a wafsamba: Add support for symlinking generated items
      from  3d4d7f3cb88 third_party:heimdal: import 
lorikeet-heimdal-202602190236

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 31f3bc19d5afdaf782a99d93afda8f9e5346958d
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 14:35:03 2026 +0100

    quic_ko_wrapper: Fix a typo
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Wed Feb 25 13:37:44 UTC 2026 on atb-devel-224

commit 6813b344e2c83e3aba93510477bf083d44b85303
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 13:53:40 2026 +0100

    quic_ko_wrapper: Fix a comment
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 954fe55c013d66ece295ebabffac8bceea593088
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 12:02:51 2026 +0100

    dsdb: Simplify samdb_cn_to_lDAPDisplayName()
    
    Use GUID_buf_string(), dom_sid_str_buf() and talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 5782888426594e38c4d2691c612d4a65053d47ff
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 12:00:39 2026 +0100

    dsdb: Simplify drs_ObjectIdentifier_to_debug_string()
    
    Use GUID_buf_string(), dom_sid_str_buf() and talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 228a00b4cf6c9812e1a89b872cf8f85a5cbf41bb
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 11:54:30 2026 +0100

    dsdb: Simplify samdb_dn_to_dns_domain() with talloc_asprintf_addbuf()
    
    Only check for NULL once
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 537bad67cbbd81301b499fc134d7459ff2e8144c
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 11:19:56 2026 +0100

    smbd: Avoid a pointless if-statement
    
    All you can read in optimizing guides is that branches are
    expensive...
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 2f8501f69cbe8277407f1b89ed3a81f594bd18a0
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 11:18:26 2026 +0100

    smbd: Introduce helper vars in SMB_QUERY_POSIX_WHOAMI
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit eed3d9120cc257475661b69a4be7953e0f88f73e
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 11:00:45 2026 +0100

    libcli: Avoid a talloc in ldap_encode_ndr_dom_sid()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 8894acb1b0f523edb58121099ca9c5e3740a45f4
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:50:28 2026 +0100

    winbindd: Avoid casts in idmap_ad_unixids_to_sids()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 1a620e236ad2399c828eec2a3607373d144b96f9
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:49:17 2026 +0100

    winbindd: Avoid a few NULL checks in idmap_ad_unixids_to_sids()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 5f8955988534caa2edf36dc30610d6416a623dce
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:43:09 2026 +0100

    winbindd: Simplify winbindd_lookuprids_recv()
    
    Only check for NULL once with talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 41c90afc21574d1f31dbf875878f66f87e06d1db
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:41:03 2026 +0100

    winbindd: Simplify wcache_make_sidlist()
    
    Rely on talloc_asprintf_addbuf's NULL checks
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 49646c14853b9946952a28ca8a1592ca7f301eba
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:29:18 2026 +0100

    winbindd: Align integer types
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 92e6b7cfe7126da76bf93c0369cce0aa7007e4cf
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:28:12 2026 +0100

    winbindd: Add a missing NULL check in winbindd_list_trusted_domains()
    
    We did not check the result of talloc_asprintf_append_buffer()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 49cd23a0fafa39975b1fabf7a4988191e532fd48
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:23:21 2026 +0100

    winbindd: Modernize a DEBUG
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 58a0ddfde569b72212e3fd205b5f56e3c1e1d3b6
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:22:20 2026 +0100

    winbindd: Simplify collect_onlinestatus()
    
    Only check for NULL once with talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 413d992562b8588e852eceed0c4081417e3588a6
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:20:02 2026 +0100

    winbindd: Simplify append_info3_as_txt()
    
    Only check for NULL once with talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 8227e27f59937709afd4145f93089436145f70e4
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:16:41 2026 +0100

    winbindd: Simplify winbindd_getuserdomgroups_recv()
    
    Only check for NULL once with talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit beadf68818ec2ebe031aa163b437fef782d79317
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 10:15:27 2026 +0100

    winbindd: Call dom_sid_str_buf() only once
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 356b203bc59076d9eb8ef728c4e1eabc81947281
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 09:56:12 2026 +0100

    winbindd: dom_sid_str_buf() returns "buf"
    
    Save a line
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 4d558193855b6d1a8182ae8c7629a1d0c79ec39c
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 09:55:16 2026 +0100

    winbind: Simplify winbindd_xids_to_sids_recv() with talloc_asprintf_addbuf
    
    Only check for NULL once
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit 2778bdb33080e5ac0b9a0560246280278247db01
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 24 09:44:49 2026 +0100

    pam_winbind: Simplify _pam_compose_pwd_restriction_string
    
    Avoid explicit NULL handling with talloc_asprintf_addbuf()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>

commit d94ffa0dde791bd00c6762cb16ef8bba8d25f054
Author: Martin Schwenke <[email protected]>
Date:   Thu Jan 8 15:21:15 2026 +1100

    ctdb-tests: Update README
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit c39f36335cf50fa8970521854657b0e6bda5e503
Author: Martin Schwenke <[email protected]>
Date:   Sat Nov 8 21:33:34 2025 +1100

    ctdb-common: Remove unused function ctdb_set_helper()
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 80f4f47293f426defb10e029b1364d30d9bb2ffc
Author: Martin Schwenke <[email protected]>
Date:   Fri Oct 31 14:48:23 2025 +1100

    ctdb-daemon: Remove helper variable CTDB_DEBUG_LOCKS
    
    Replace with a lock_debug_script member in ctdb_context.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 369ba7c270b3fce87fd06e55237424395a6378d4
Author: Martin Schwenke <[email protected]>
Date:   Fri Oct 31 14:46:23 2025 +1100

    ctdb-tests: Reorder and group script variables, add comments
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 82eb177e6213c222c1a0458063cabaeeff4d2603
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 20:46:03 2025 +1100

    ctdb-tests: Remove unused helper variable CTDB_SCRIPTS_HELPER_BINDIR
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 1d7e083e55148878bef53698c681d2134862d6f9
Author: Martin Schwenke <[email protected]>
Date:   Thu Oct 30 22:30:27 2025 +1100

    ctdb-daemon: Remove helper variable CTDB_CLUSTER_MUTEX_HELPER
    
    Use path_helperdir() to help construct the path and then cache the
    result in the existing static buffer (with length adjusted because
    POSIX says the +1 is not necessary).  Given the way this is used by
    cluster_mutex_test, there is no (other) sane place to cache it.
    path_helperdir_append() could be used to construct the path, but then
    there would be an unnecessary talloc() result to free.
    
    The flexibility in unit test cluster_mutex_003.sh was never used, so
    remove this test.  If other cluster mutex helpers are added then they
    can be tested by separate tests.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 7a251cf2d623bebd943dd4aac0d0b84aa8175c8b
Author: Martin Schwenke <[email protected]>
Date:   Thu Oct 30 21:55:50 2025 +1100

    ctdb-daemon: Remove helper variable CTDB_LOCK_HELPER
    
    Replace with a lock_helper member in ctdb_context, set using
    path_helperdir_append().
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 6a9d6600ec92cb76d90cb1e52c44d9edaa1e6f0b
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 21:20:55 2025 +1100

    ctdb-daemon: Remove helper variable CTDB_EVENTD
    
    Simplify the initialisation of the path to eventd in eventd_context
    using path_helperdir_append().
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit ff9fe88905e74ff6f9a662436687cf9b7edb16a2
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 21:09:48 2025 +1100

    ctdb-recoverd: Remove some helper variables
    
    Remove CTDB_RECOVERY_HELPER, CTDB_TAKEOVER_HELPER.  Add new struct
    members in ctdb_recoverd to contain the paths, set via
    path_helperdir_append().
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 2628f86c6599472d241f0ccdbe0d151fed0e08aa
Author: Martin Schwenke <[email protected]>
Date:   Mon Oct 27 17:36:27 2025 +1100

    ctdb-tools: Remove some helper variables
    
    Remove CTDB_EVENT_HELPER, CTDB_LVS_HELPER, CTDB_NATGW_HELPER.  Use
    path_helperdir_append() instead.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 83cd1a37853c11ef15886f71722bf537ca4bd641
Author: Martin Schwenke <[email protected]>
Date:   Mon Oct 27 15:47:55 2025 +1100

    ctdb-common: Add path_helperdir() and path_helperdir_append()
    
    These can be used to locate helpers, either during in-tree
    testing (using $CTDB_TEST_HELPER_BINDIR) or in their configured
    installation location.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit be430fe8752f29a4f8a60710d5b85c3351773e68
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 15:29:57 2025 +1100

    ctdb-tests: Drop an unnecessary use of CTDB_SCRIPTS_HELPER_BINDIR
    
    As a helper, ctdb-path is in $CTDB_TEST_HELPER_BINDIR, which is in
    $PATH.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit b2f5b1f89c60c8eb60ddf7494f6f1d914fb4721a
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 15:28:22 2025 +1100

    ctdb-tests: Use CTDB_TEST_HELPER_BINDIR inline
    
    Replace most remaining uses of CTDB_SCRIPTS_TOOLS_HELPER_DIR and
    CTDB_SCRIPTS_HELPER_BINDIR.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 9066b83a9b83f92b6e83214fc4025ef9782ca4f4
Author: Martin Schwenke <[email protected]>
Date:   Thu Oct 30 14:37:11 2025 +1100

    ctdb-tests: Remove redundant PATH adds
    
    These are covered because CTDB_TEST_HELPER_BINDIR is now added to
    PATH.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 6c4564912847ffb7f4bbaa52cd16883cb80849c4
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 15:22:22 2025 +1100

    ctdb-tests: Add CTDB_TEST_HELPER_BINDIR
    
    Now that generated scripts are linked into bin/, nothing needs to be
    run from the tools/ directory anymore during self-test.  So, introduce
    CTDB_TEST_HELPER_BINDIR to replace both CTDB_SCRIPTS_TOOLS_HELPER_DIR
    and CTDB_SCRIPTS_HELPER_BINDIR.  Add this directory to PATH.
    
    CTDB_TEST_HELPER_BINDIR will also be used in combination with
    CTDB_TEST_MODE to allow helpers to be found via a single mechanism
    that uses this single variable.  This will replace the multiple
    mechanisms and variables currently used.
    
    For simplicity, leave the old variables alone for now.  Replacing them
    in a comprehensible way will take a few steps.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 88165090a3144427e4c45ac47be38c3e8b9c87bc
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 15:48:50 2025 +1100

    ctdb-tests: Silence some shellcheck complaints
    
    Add most of the fixed files to the associated shellcheck unit test.
    Include a couple of formatting fixups.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 48523ec0fe0ad315b0109015cb2b076fe3b97b78
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 15:44:42 2025 +1100

    ctdb-tests: Reformat with "shfmt -w -i 0 -fn"
    
    Best reviewed with "git show -w" or similar.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit ad933b2bd8d83e9ee68868a1f96d58301f35a191
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 13:58:00 2025 +1100

    ctdb-tests: Add a useful comment
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit e4aae52c60e16b5870b7a7f0238175a7353d04ae
Author: Martin Schwenke <[email protected]>
Date:   Wed Oct 29 12:01:27 2025 +1100

    ctdb-tests: Remove unused variables
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 0b810c89c80f8bf2376bcd78c38f5c586c597ae4
Author: Martin Schwenke <[email protected]>
Date:   Mon Feb 23 09:40:58 2026 +1100

    ctdb-build: Store generator rules in variables
    
    This improves readability and maintainability.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 63c7da3407ef7652d2441099861c3b847a5a03dc
Author: Martin Schwenke <[email protected]>
Date:   Mon Oct 27 17:32:47 2025 +1100

    ctdb-build: Ensure generated scripts are executable and symlinked
    
    Ensure that all generated scripts are executable.  All of the
    generated scripts (except test harnesses ctdb_run_tests,
    ctdb_local_daemons) also need to be linked into the bin/ directory so
    they can be more easily run during self-test.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 5304732649c0a9fad619da050ce9a72c7252626c
Author: Martin Schwenke <[email protected]>
Date:   Mon Feb 23 09:22:35 2026 +1100

    wafsamba: Add support for chmod of generated items
    
    CTDB generates scripts that are run during self-test, so add a chmod
    option to SAMBA_GENERATOR().
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit edc85d0a73a52408a564fd35e8df63b8c89049c0
Author: Martin Schwenke <[email protected]>
Date:   Sun Feb 22 14:31:28 2026 +1100

    wafsamba: Add support for symlinking generated items
    
    CTDB generates scripts and these want to be used in self-test.  So,
    update SAMBA_GENERATOR() to allow items to be symlinked into bin/.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Signed-off-by: Anoop C S <[email protected]>

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

Summary of changes:
 buildtools/wafsamba/samba_install.py               |  31 +++-
 buildtools/wafsamba/wafsamba.py                    |  14 +-
 ctdb/common/common.h                               |   4 -
 ctdb/common/ctdb_util.c                            |  63 --------
 ctdb/common/path.c                                 |  31 ++++
 ctdb/common/path.h                                 |   2 +
 ctdb/include/ctdb_private.h                        |   2 +
 ctdb/server/ctdb_cluster_mutex.c                   |  36 ++---
 ctdb/server/ctdb_lock.c                            |  25 +---
 ctdb/server/ctdb_recoverd.c                        |  33 +++--
 ctdb/server/ctdbd.c                                |  20 ++-
 ctdb/server/eventscript.c                          |   9 +-
 .../simple/cluster.016.reclock_move_lock_dir.sh    |   6 +-
 .../cluster.030.node_stall_leader_timeout.sh       |   2 +-
 .../simple/cluster.091.version_check.sh            |  24 +--
 ctdb/tests/README                                  |   8 +-
 ctdb/tests/UNIT/cunit/cluster_mutex_001.sh         |   3 -
 ctdb/tests/UNIT/cunit/cluster_mutex_002.sh         |   9 +-
 ctdb/tests/UNIT/cunit/cluster_mutex_003.sh         |  75 ----------
 ctdb/tests/UNIT/cunit/config_test_001.sh           |  24 ++-
 ctdb/tests/UNIT/cunit/config_test_002.sh           |  12 +-
 ctdb/tests/UNIT/cunit/config_test_003.sh           |   8 +-
 ctdb/tests/UNIT/cunit/config_test_004.sh           |  26 ++--
 ctdb/tests/UNIT/cunit/config_test_005.sh           |   8 +-
 ctdb/tests/UNIT/cunit/config_test_006.sh           |   8 +-
 ctdb/tests/UNIT/cunit/config_test_007.sh           |   6 +-
 ctdb/tests/UNIT/cunit/path_tests_001.sh            |   2 -
 ctdb/tests/UNIT/eventd/scripts/local.sh            |  63 ++++----
 .../UNIT/eventscripts/scripts/statd-callout.sh     |  12 +-
 ctdb/tests/UNIT/eventscripts/stubs/ctdb-config     |   2 +-
 ctdb/tests/UNIT/shellcheck/tests.sh                |  13 +-
 ctdb/tests/UNIT/takeover_helper/scripts/local.sh   |  49 +++---
 ctdb/tests/UNIT/tool/scripts/local.sh              |  90 +++++------
 ctdb/tests/local_daemons.sh                        | 165 ++++++++++-----------
 ctdb/tests/scripts/common.sh                       |   7 +-
 ctdb/tests/scripts/integration_local_daemons.bash  |   3 -
 ctdb/tests/scripts/script_install_paths.sh         |  41 +++--
 ctdb/tools/ctdb.c                                  |  36 +----
 ctdb/wscript                                       |  43 ++++--
 libcli/ldap/ldap_ndr.c                             |   9 +-
 nsswitch/pam_winbind.c                             |  54 +++----
 source3/smbd/msdfs.c                               |   4 +-
 source3/smbd/smb2_trans2.c                         |  65 ++++----
 source3/winbindd/idmap_ad.c                        |  57 +++----
 source3/winbindd/winbindd_cache.c                  |  13 +-
 source3/winbindd/winbindd_dual.c                   |  27 ++--
 source3/winbindd/winbindd_getuserdomgroups.c       |  17 +--
 source3/winbindd/winbindd_lookuprids.c             |  16 +-
 source3/winbindd/winbindd_misc.c                   |  28 ++--
 source3/winbindd/winbindd_pam.c                    |  34 ++---
 source3/winbindd/winbindd_xids_to_sids.c           |  17 +--
 source4/dsdb/common/dsdb_dn.c                      |  23 ++-
 source4/dsdb/common/util.c                         |  30 ++--
 third_party/quic_ko_wrapper/quic_ko_wrapper.h      |   4 +-
 54 files changed, 624 insertions(+), 789 deletions(-)
 delete mode 100755 ctdb/tests/UNIT/cunit/cluster_mutex_003.sh


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_install.py 
b/buildtools/wafsamba/samba_install.py
index a43d10398d3..4c3199c29b5 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -175,7 +175,8 @@ def apply_vscript(self):
 
 
 ##############################
-# handle the creation of links for libraries and binaries in the build tree
+# handle the creation of links for libraries, binaries and generated
+# items in the build tree
 
 @feature('symlink_lib')
 @after('apply_link')
@@ -234,3 +235,31 @@ def symlink_bin(self):
             return
         os.unlink(bldpath)
     os.symlink(binpath, bldpath)
+
+
+@feature('symlink_generated')
+def symlink_generated(self):
+    """Symlink a generated file into the build directory."""
+    target = self.target
+    if isinstance(target, list):
+        if len(target) > 1:
+            return
+        target = target[0]
+
+    if target.endswith('.inst'):
+        return
+
+    genpath = os.path.join(self.path.get_bld().abspath(), target)
+    bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, target)
+
+    if os.path.lexists(bldpath):
+        if os.path.islink(bldpath) and os.readlink(bldpath) == genpath:
+            return
+        os.unlink(bldpath)
+
+    def run_symlink_generated(_):
+        os.symlink(genpath, bldpath)
+
+    # This way the symlink is always created after genpath, so is
+    # never dangling.
+    self.bld.add_post_fun(run_symlink_generated)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 8dff3d6bf1b..20e223fd02b 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -916,7 +916,9 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
                     header_path=None,
                     vars=None,
                     dep_vars=None,
-                    always=False):
+                    always=False,
+                    symlink=False,
+                    chmod=None):
     '''A generic source generator target'''
 
     if dep_vars is None:
@@ -938,9 +940,18 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
     if shell:
         rule = "set -e; " + rule
 
+    if symlink:
+        features = 'symlink_generated'
+        use_cache = False
+    else:
+        features = ''
+        use_cache = True
+
     bld.SET_BUILD_GROUP(group)
     t = bld(
         rule=rule,
+        features=features,
+        cache_rule=use_cache,
         source=bld.EXPAND_VARIABLES(source, vars=vars),
         shell=shell,
         target=target,
@@ -949,6 +960,7 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
         ext_out='.c',
         samba_type='GENERATOR',
         dep_vars = dep_vars,
+        chmod=chmod,
         name=name)
 
     if vars is None:
diff --git a/ctdb/common/common.h b/ctdb/common/common.h
index 1f6f937663c..2ceed57a7f1 100644
--- a/ctdb/common/common.h
+++ b/ctdb/common/common.h
@@ -97,10 +97,6 @@ void ctdb_fatal(struct ctdb_context *ctdb, const char *msg) 
_NORETURN_;
 
 void ctdb_die(struct ctdb_context *ctdb, const char *msg) _NORETURN_;
 
-bool ctdb_set_helper(const char *type, char *helper, size_t size,
-                    const char *envvar,
-                    const char *dir, const char *file);
-
 bool ctdb_same_address(ctdb_sock_addr *a1, ctdb_sock_addr *a2);
 
 uint32_t ctdb_hash(const TDB_DATA *key);
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index 0b4876725a0..798fec48669 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -77,69 +77,6 @@ void ctdb_die(struct ctdb_context *ctdb, const char *msg)
        exit(1);
 }
 
-/* Set the path of a helper program from envvar, falling back to
- * dir/file if envvar unset. type is a string to print in log
- * messages.  helper is assumed to point to a statically allocated
- * array of size bytes, initialised to "".  If file is NULL don't fall
- * back if envvar is unset.  If dir is NULL and envvar is unset (but
- * file is not NULL) then this is an error.  Returns true if helper is
- * set, either previously or this time. */
-bool ctdb_set_helper(const char *type, char *helper, size_t size,
-                    const char *envvar,
-                    const char *dir, const char *file)
-{
-       const char *t;
-       struct stat st;
-
-       if (helper[0] != '\0') {
-               /* Already set */
-               return true;
-       }
-
-       t = getenv(envvar);
-       if (t != NULL) {
-               if (strlen(t) >= size) {
-                       DEBUG(DEBUG_ERR,
-                             ("Unable to set %s - path too long\n", type));
-                       return false;
-               }
-
-               strncpy(helper, t, size);
-       } else if (file == NULL) {
-               return false;
-       } else if (dir == NULL) {
-                       DEBUG(DEBUG_ERR,
-                             ("Unable to set %s - dir is NULL\n", type));
-               return false;
-       } else {
-               int ret;
-
-               ret = snprintf(helper, size, "%s/%s", dir, file);
-               if (ret < 0 || (size_t)ret >= size) {
-                       DEBUG(DEBUG_ERR,
-                             ("Unable to set %s - path too long\n", type));
-                       return false;
-               }
-       }
-
-       if (stat(helper, &st) != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Unable to set %s \"%s\" - %s\n",
-                      type, helper, strerror(errno)));
-               return false;
-       }
-       if (!(st.st_mode & S_IXUSR)) {
-               DEBUG(DEBUG_ERR,
-                     ("Unable to set %s \"%s\" - not executable\n",
-                      type, helper));
-               return false;
-       }
-
-       DEBUG(DEBUG_NOTICE,
-             ("Set %s to \"%s\"\n", type, helper));
-       return true;
-}
-
 /*
   check if two addresses are the same
 */
diff --git a/ctdb/common/path.c b/ctdb/common/path.c
index 0d935429460..60bbd50ddc9 100644
--- a/ctdb/common/path.c
+++ b/ctdb/common/path.c
@@ -30,17 +30,20 @@ struct {
        char *basedir;
        char datadir[PATH_MAX];
        char etcdir[PATH_MAX];
+       const char* helperdir;
        char rundir[PATH_MAX];
        char vardir[PATH_MAX];
        bool test_mode;
        bool basedir_set;
        bool datadir_set;
        bool etcdir_set;
+       bool helperdir_set;
        bool rundir_set;
        bool vardir_set;
 } ctdb_paths = {
        .datadir = CTDB_DATADIR,
        .etcdir = CTDB_ETCDIR,
+       .helperdir = CTDB_HELPER_BINDIR,
        .rundir = CTDB_RUNDIR,
        .vardir = CTDB_VARDIR,
 };
@@ -143,6 +146,29 @@ const char *path_etcdir(void)
        return ctdb_paths.etcdir;
 }
 
+const char *path_helperdir(void)
+{
+       path_set_test_mode();
+       if (!ctdb_paths.test_mode) {
+               goto done;
+       }
+
+       if (ctdb_paths.helperdir_set) {
+               goto done;
+       }
+
+       ctdb_paths.helperdir = getenv("CTDB_TEST_HELPER_BINDIR");
+       if (ctdb_paths.helperdir == NULL) {
+               D_ERR("Broken CTDB setup, "
+                     "CTDB_TEST_HELPER_BINDIR not set in test mode\n");
+               abort();
+       }
+
+done:
+       ctdb_paths.helperdir_set = true;
+       return ctdb_paths.helperdir;
+}
+
 const char *path_rundir(void)
 {
        bool ok;
@@ -185,6 +211,11 @@ char *path_etcdir_append(TALLOC_CTX *mem_ctx, const char 
*path)
        return talloc_asprintf(mem_ctx, "%s/%s", path_etcdir(), path);
 }
 
+char *path_helperdir_append(TALLOC_CTX *mem_ctx, const char *path)
+{
+       return talloc_asprintf(mem_ctx, "%s/%s", path_helperdir(), path);
+}
+
 char *path_rundir_append(TALLOC_CTX *mem_ctx, const char *path)
 {
        return talloc_asprintf(mem_ctx, "%s/%s", path_rundir(), path);
diff --git a/ctdb/common/path.h b/ctdb/common/path.h
index dcc6c20638d..e3c7880ffc7 100644
--- a/ctdb/common/path.h
+++ b/ctdb/common/path.h
@@ -24,11 +24,13 @@
 
 const char *path_datadir(void);
 const char *path_etcdir(void);
+const char *path_helperdir(void);
 const char *path_rundir(void);
 const char *path_vardir(void);
 
 char *path_datadir_append(TALLOC_CTX *mem_ctx, const char *path);
 char *path_etcdir_append(TALLOC_CTX *mem_ctx, const char *path);
+char *path_helperdir_append(TALLOC_CTX *mem_ctx, const char *path);
 char *path_rundir_append(TALLOC_CTX *mem_ctx, const char *path);
 char *path_vardir_append(TALLOC_CTX *mem_ctx, const char *path);
 
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 6bf8141be6d..a79c466c177 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -333,6 +333,8 @@ struct ctdb_context {
        struct trbt_tree *child_processes; 
 
        /* Used for locking record/db/alldb */
+       const char *lock_helper;
+       const char *lock_debug_script;
        struct lock_context *lock_current;
        struct lock_context *lock_pending;
 };
diff --git a/ctdb/server/ctdb_cluster_mutex.c b/ctdb/server/ctdb_cluster_mutex.c
index 2fbe301420e..d8d089bdb28 100644
--- a/ctdb/server/ctdb_cluster_mutex.c
+++ b/ctdb/server/ctdb_cluster_mutex.c
@@ -34,6 +34,8 @@
 
 #include "ctdb_private.h"
 
+#include "common/path.h"
+
 #include "ctdb_cluster_mutex.h"
 
 struct ctdb_cluster_mutex_handle {
@@ -115,7 +117,7 @@ static void cluster_mutex_handler(struct tevent_context *ev,
        }
 }
 
-static char cluster_mutex_helper[PATH_MAX+1] = "";
+static char cluster_mutex_helper[PATH_MAX] = "";
 
 static bool cluster_mutex_helper_args_file(TALLOC_CTX *mem_ctx,
                                           const char *argstring,
@@ -131,26 +133,20 @@ static bool cluster_mutex_helper_args_file(TALLOC_CTX 
*mem_ctx,
                goto helper_done;
        }
 
-       t = getenv("CTDB_CLUSTER_MUTEX_HELPER");
-       if (t != NULL) {
-               size_t len;
+       t = path_helperdir();
+       if (t == NULL) {
+               DBG_ERR("Failed get helper directory\n");
+               exit(1);
+       }
 
-               len = strlcpy(cluster_mutex_helper, t, size);
-               if (len >= size) {
-                       DBG_ERR("error: CTDB_CLUSTER_MUTEX_HELPER too long\n");
-                       exit(1);
-               }
-       } else {
-               ret = snprintf(cluster_mutex_helper,
-                              size,
-                              "%s/%s",
-                              CTDB_HELPER_BINDIR,
-                              "ctdb_mutex_fcntl_helper");
-               if (ret < 0 || (size_t)ret >= size) {
-                       D_ERR("Unable to set cluster mutex helper - "
-                             "path too long\n");
-                       exit(1);
-               }
+       ret = snprintf(cluster_mutex_helper,
+                      size,
+                      "%s/%s",
+                      t,
+                      "ctdb_mutex_fcntl_helper");
+       if (ret < 0 || (size_t)ret >= size) {
+               D_ERR("Unable to set cluster mutex helper - path too long\n");
+               exit(1);
        }
 
        ret = stat(cluster_mutex_helper, &st);
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 4231313b654..b0fe75e8eea 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -524,7 +524,6 @@ static void ctdb_lock_timeout_handler(struct tevent_context 
*ev,
                                    struct timeval current_time,
                                    void *private_data)
 {
-       static char debug_locks[PATH_MAX+1] = "";
        struct lock_context *lock_ctx;
        struct ctdb_context *ctdb;
        pid_t pid;
@@ -532,7 +531,6 @@ static void ctdb_lock_timeout_handler(struct tevent_context 
*ev,
        bool skip;
        char *keystr;
        char **args;
-       bool ok;
 
        lock_ctx = talloc_get_type_abort(private_data, struct lock_context);
        ctdb = lock_ctx->ctdb;
@@ -570,15 +568,7 @@ static void ctdb_lock_timeout_handler(struct 
tevent_context *ev,
        }
 
 lock_debug:
-
-       ok = ctdb_set_helper("lock debugging helper",
-                            debug_locks,
-                            sizeof(debug_locks),
-                            "CTDB_DEBUG_LOCKS",
-                            getenv("CTDB_BASE"),
-                            "debug_locks.sh");
-       if (!ok) {
-               DBG_WARNING("Unable to setup lock debugging\n");
+       if (ctdb->lock_debug_script == NULL) {
                goto skip_lock_debug;
        }
 
@@ -586,7 +576,7 @@ lock_debug:
        if (args != NULL) {
                pid = vfork();
                if (pid == 0) {
-                       execvp(debug_locks, args);
+                       execvp(ctdb->lock_debug_script, args);
                        _exit(0);
                }
                talloc_free(args);
@@ -706,17 +696,8 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
        struct lock_context *lock_ctx;
        int ret;
        TALLOC_CTX *tmp_ctx;
-       static char prog[PATH_MAX+1] = "";
        char **args = NULL;
 
-       if (!ctdb_set_helper("lock helper",
-                            prog, sizeof(prog),
-                            "CTDB_LOCK_HELPER",
-                            CTDB_HELPER_BINDIR, "ctdb_lock_helper")) {
-               ctdb_die(ctdb, __location__
-                        " Unable to set lock helper\n");
-       }
-
        /* Find a lock context with requests */
        lock_ctx = ctdb_find_lock_context(ctdb);
        if (lock_ctx == NULL) {
@@ -761,7 +742,7 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
 
        lock_ctx->child = ctdb_vfork_exec(lock_ctx,
                                          ctdb,
-                                         prog,
+                                         ctdb->lock_helper,
                                          talloc_array_length(args),
                                          (const char *const *)args);
        if (lock_ctx->child == -1) {
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index edc89754c2c..22ff3b85fef 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -43,6 +43,7 @@
 #include "common/system_socket.h"
 #include "common/common.h"
 #include "common/logging.h"
+#include "common/path.h"
 
 #include "conf/ctdb_config.h"
 
@@ -264,7 +265,9 @@ struct ctdb_recoverd {
        bool election_in_progress;
        struct tevent_timer *election_timeout;
        struct srvid_requests *reallocate_requests;
+       const char *takeover_helper;
        struct ctdb_op_state *takeover_run;
+       const char *recovery_helper;
        struct ctdb_op_state *recovery;
        struct ctdb_iface_list_old *ifaces;
        uint32_t *force_rebalance_nodes;
@@ -1154,17 +1157,10 @@ fail:
 static int ctdb_takeover(struct ctdb_recoverd *rec,
                         uint32_t *force_rebalance_nodes)
 {
-       static char prog[PATH_MAX+1] = "";
        char *arg;
        unsigned int i;
        int ret;
 
-       if (!ctdb_set_helper("takeover_helper", prog, sizeof(prog),
-                            "CTDB_TAKEOVER_HELPER", CTDB_HELPER_BINDIR,
-                            "ctdb_takeover_helper")) {
-               ctdb_die(rec->ctdb, "Unable to set takeover helper\n");
-       }
-
        arg = NULL;
        for (i = 0; i < talloc_array_length(force_rebalance_nodes); i++) {
                uint32_t pnn = force_rebalance_nodes[i];
@@ -1187,7 +1183,7 @@ static int ctdb_takeover(struct ctdb_recoverd *rec,
                }
        }
 
-       return helper_run(rec, rec, prog, arg, "takeover");
+       return helper_run(rec, rec, rec->takeover_helper, arg, "takeover");
 }
 
 static bool do_takeover_run(struct ctdb_recoverd *rec,
@@ -1280,15 +1276,8 @@ done:
 
 static int db_recovery_parallel(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx)
 {
-       static char prog[PATH_MAX+1] = "";
        const char *arg;
 
-       if (!ctdb_set_helper("recovery_helper", prog, sizeof(prog),
-                            "CTDB_RECOVERY_HELPER", CTDB_HELPER_BINDIR,
-                            "ctdb_recovery_helper")) {
-               ctdb_die(rec->ctdb, "Unable to set recovery helper\n");
-       }
-
        arg = talloc_asprintf(mem_ctx, "%u", new_generation());
        if (arg == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " memory error\n"));
@@ -1297,7 +1286,7 @@ static int db_recovery_parallel(struct ctdb_recoverd 
*rec, TALLOC_CTX *mem_ctx)
 
        setenv("CTDB_DBDIR_STATE", rec->ctdb->db_directory_state, 1);
 
-       return helper_run(rec, mem_ctx, prog, arg, "recovery");
+       return helper_run(rec, mem_ctx, rec->recovery_helper, arg, "recovery");
 }
 
 /*
@@ -3063,9 +3052,21 @@ static void monitor_cluster(struct ctdb_context *ctdb)
        rec->cluster_lock_handle = NULL;
        rec->helper_pid = -1;
 
+       rec->takeover_helper = path_helperdir_append(rec,
+                                                    "ctdb_takeover_helper");
+       if (rec->takeover_helper == NULL) {
+               DBG_ERR("Memory allocation error setting takeover helper\n");
+               exit(1);
+       }
        rec->takeover_run = ctdb_op_init(rec, "takeover runs");
        CTDB_NO_MEMORY_FATAL(ctdb, rec->takeover_run);
 
+       rec->recovery_helper = path_helperdir_append(rec,
+                                                    "ctdb_recovery_helper");
+       if (rec->recovery_helper == NULL) {


-- 
Samba Shared Repository


Reply via email to