The branch, v4-7-stable has been updated
       via  4b1b5b1 VERSION: Disable GIT_SNAPSHOT for the 4.7.4 release.
       via  437395d WHATSNEW: Add release notes for Samba 4.7.4.
       via  237bead s4:kdc: only map SDB_ERR_NOT_FOUND_HERE to 
HDB_ERR_NOT_FOUND_HERE
       via  8be0198 s3:smb2_server: allow logoff, close, unlock, cancel and 
echo on expired sessions
       via  2108b10 s3:smbd: return the correct error for cancelled SMB2 
notifies on expired sessions
       via  b5e8614 s4:torture: add smb2.session.expire2 test
       via  3648ab0 g_lock: fix cleanup of stale entries in g_lock_trylock()
       via  7249bc1 dns_server: Use the indexed "name" attribute in wildcard 
lookup
       via  6c5481b dns_server: Do not look for a wildcard for @
       via  7d60443 dns_server: Do the exact match query first, then do the 
wildcard lookup
       via  2cd8389 ldb: Release 1.2.3
       via  82764c9 ldb: Intersect the index from SCOPE_ONELEVEL with the index 
for the search expression
       via  5f51561 ldb_tdb: Provide struct ltdb_private to index routines
       via  6ddcbfd selftest: Do not use dn= filter string
       via  edc0c99 s4:samba: Fix default to be running samba as a deamon
       via  1eb0844 messaging: Always register the unique id
       via  40ac029 winbindd: idmap_rid: error code for failing id-to-sid 
mapping request
       via  e92edf0 winbindd: idmap_rid: don't rely on the static domain list
       via  5724d65 winbindd: pass domain SID to wbint_UnixIDs2Sids
       via  5ffedec winbindd: add domain SID to idmap mapping domains
       via  dce01ac pthreadpool: Add a test for the race condition fixed in the 
last commit
       via  b418ab3 pthreadpool: Fix starvation after fork
       via  2530053 third_party: Fix a typo in the option name
       via  364f1c5 third_party: Link th aesni-intel library with -z noexecstack
       via  2d1d00b s3: libsmb: Fix reversing of oldname/newname paths when 
creating a reparse point symlink on Windows from smbclient.
       via  3f1f2a8 s3: client: Rename <oldname> to <link_target> in 
cmd_symlink() and cli_posix_symlink().
       via  61140f4 pthreadpool: Fix deadlock
       via  086b453 pthreadpool: Add test for pthread_create failure
       via  a677717 wscript: Add check for --wrap linker flag
       via  fcc8616 pthreadpool: Undo put_job when returning error
       via  c43c888 pthreadpool: Move creating of thread to new function
       via  97a9e81 ctdb-daemon: Send STARTUP control after startup event
       via  6f7215f ctdb-takeover: Send tcp tickles immediately on STARTUP 
control
       via  0fdc82e ctdb-takeover: Refactor code to send tickle lists for all 
public IPs
       via  5bb2b9c vfs_zfsacl: fix compilation error
       via  8a313c8 winbindd: let normalize_name_map() call 
find_domain_from_name_noinit()
       via  ac32a77 s3: libsmb: Fix valgrind read-after-free error in 
cli_smb2_close_fnum_recv().
       via  0fcdf5d testprogs: Test net ads keytab list
       via  aba1e91 s3:libads: net ads keytab list fails with "Key table name 
malformed"
       via  73d3e64 vfs_fruit: proper VFS-stackable conversion of FinderInfo
       via  3f94680 vfs_fruit: add AfpInfo prototypes
       via  2d3e21f s4/torture: fruit: in test_adouble_conversion() also check 
stream list and AFPINFO_STREAM
       via  3d90751 s4/torture: fruit: remove use of localdir from 
test_adouble_conversion test
       via  8946fc8 selftest: add "fruit:veto_appledouble = no" to fruit shares
       via  1143b2f s4/torture: let write_stream() deal with stream=NULL
       via  0b7e170 selftest: run AppleDouble sidecar-file conversion test runs 
against all fruit shares
       via  b9f7dd4 s4/torture: use torture_assert_goto in a vfs.fruit test
       via  e24e345 s4/torture: rework stream names tests usage of local xattr 
call
       via  1a2f564 selftest: add localdir option to fruit subtests
       via  590a4cf selftest: reorder arguments for fruit tests
       via  9990e6e s3/loadparm: don't mark IPC$ as autoloaded
       via  cecbc43 s3/loadparm: ensure default service options are not changed
       via  7dc2782 s3/loadparm: allocate a fresh sDefault object per lp_ctx
       via  e36b1ce Add vfs_zfsacl manpage to the list of manpages if we have 
this module enabled.
       via  b21d9f0 Fix typo in the "wide links" description for the getwd 
cache.
       via  39922b5 s4:samba: Allow samba daemon to run in foreground
       via  6182708 s4:samba: Do not segfault if we run into issues
       via  e41925e s4/smbd: set the process group.
       via  00dfe4c repl_meta_data: Fix removing of backlink on deleted objects
       via  f2c4754 repl_meta_data: Allow delete of an object with dangling 
backlinks
       via  fe3ae81 selftest: Add more corruption cases for runtime and dbcheck
       via  09a311c selftest: add dbcheck tests for duplicate links
       via  ece46f7 dbcheck: detect and fix duplicate links
       via  c1860d1 dbcheck: only calculate linked attribute helper variables 
once in check_dn()
       via  7b67da4 dbcheck: remove indentation level
       via  27cdadf dsdb:extended_dn_store: implement 
DSDB_CONTROL_DBCHECK_FIX_DUPLICATE_LINKS control
       via  aafcb73 dsdb:repl_meta_data: implement 
DSDB_CONTROL_DBCHECK_FIX_DUPLICATE_LINKS control
       via  f0920ea s4:dsdb: allocate DSDB_CONTROL_DBCHECK_FIX_DUPLICATE_LINKS 
oid
       via  67270b3 s4:schema_samba4: mark DSDB_CONTROL_INVALID_NOT_IMPLEMENTED 
1.3.6.1.4.1.7165.4.3.32 as allocated
       via  ee05047 selftest: Additional check for a backlink pointing at a 
deleted object
       via  df23dc8 selftest: Split out creation of complex (often invalid) 
links
       via  505936a selftest: Split out dbcheck runs from dangling_multi_valued 
test
       via  74688a2 selftest: add more dbcheck tests
       via  68bf275 dbcheck: Use the GUID as the DN to fix replPropertyMetaData
       via  b7c9edb dbcheck: Clarify error count bumping in deleted/gone DN 
handling
       via  ed4189f selftest: sort dbcheck output to avoid sort order impacting 
results
       via  45911b0 dbcheck: Allow removal of one-way links to missing objects
       via  e90e3d7 systemd: Start processes in forground and without a process 
group
       via  fe6da67 libnet_join: fix "net rpc oldjoin"
       via  72e69f5 s3:selftest: add samba3.blackbox.net_rpc_oldjoin test
       via  3ef93ab vfs_glusterfs: include glusterfs/api/glfs.h without relying 
on -I options
       via  710c2ad ctdb-common: Call missing tevent_wakeup_recv() in 
sock_daemon
       via  e4cce45 ctdb-daemon: Allocate deferred calls off calling context
       via  f398a79 winbind: Remove winbind_messaging_context
       via  bbe5614 winbind: winbind_messaging_context -> 
server_messaging_context
       via  3aaa48c winbind: Remove winbind_event_context
       via  f6a9d34 winbind: Replace winbind_event_context with 
server_event_context
       via  58e728a s3: smbclient: tests: Test "volume" command over SMB1 and 
SMB2+.
       via  ea297d6 s3: smbclient: Implement "volume" command over SMB2.
       via  cb6ec4d VERSION: Bump version up to 4.7.4...
       via  641af30 Merge tag 'samba-4.7.3' into v4-7-test
       via  7b28a97 s3: libsmb: smbc_statvfs is missing the supporting SMB2 
calls.
       via  6f18428 libsmbclient: Allow server (NetApp) to return 
STATUS_INVALID_PARAMETER from an echo.
      from  d0b59a5 VERSION: Disable GIT_SNAPSHOT for the 4.7.3 release.

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


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

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       | 128 +++++++-
 ctdb/common/sock_daemon.c                          |   8 +
 ctdb/server/ctdb_call.c                            |  14 +-
 ctdb/server/ctdb_daemon.c                          |   6 -
 ctdb/server/ctdb_monitor.c                         |   6 +
 ctdb/server/ctdb_takeover.c                        |  59 ++--
 docs-xml/smbdotconf/tuning/getwdcache.xml          |   2 +-
 docs-xml/wscript_build                             |   3 +
 lib/ldb/ABI/{ldb-1.2.2.sigs => ldb-1.2.3.sigs}     |   0
 ...yldb-util-1.1.10.sigs => pyldb-util-1.2.3.sigs} |   0
 ...-util-1.1.10.sigs => pyldb-util.py3-1.2.3.sigs} |   0
 lib/ldb/ldb_tdb/ldb_index.c                        | 141 ++++++--
 lib/ldb/ldb_tdb/ldb_tdb.c                          |  38 ++-
 lib/ldb/ldb_tdb/ldb_tdb.h                          |  16 +-
 lib/ldb/wscript                                    |   2 +-
 lib/pthreadpool/pthreadpool.c                      | 196 ++++++++---
 lib/pthreadpool/tests.c                            |  82 +++++
 lib/pthreadpool/tests_cmocka.c                     | 179 ++++++++++
 lib/pthreadpool/wscript_build                      |   7 +
 librpc/idl/winbind.idl                             |   1 +
 packaging/systemd/nmb.service                      |   2 +-
 packaging/systemd/samba.service                    |   2 +-
 packaging/systemd/smb.service                      |   2 +-
 packaging/systemd/winbind.service                  |   2 +-
 python/samba/dbchecker.py                          | 305 ++++++++++++-----
 python/samba/tests/samba_tool/sites.py             |   4 +-
 selftest/knownfail                                 |   2 +-
 selftest/knownfail.d/samba3.vfs.fruit              |   1 +
 selftest/target/Samba3.pm                          |   3 +
 selftest/target/Samba4.pm                          |   2 +-
 selftest/tests.py                                  |   5 +
 source3/client/client.c                            |  23 +-
 source3/include/idmap.h                            |   5 +
 source3/lib/g_lock.c                               |   6 +-
 source3/lib/messages_ctdbd.c                       |  13 +
 source3/libads/kerberos_keytab.c                   |   6 +-
 source3/libnet/libnet_join.c                       |  94 ++++--
 source3/libsmb/cli_smb2_fnum.c                     | 235 ++++++++++++-
 source3/libsmb/cli_smb2_fnum.h                     |  11 +
 source3/libsmb/clifile.c                           |  15 +-
 source3/libsmb/clifsinfo.c                         |  17 +
 source3/libsmb/clisymlink.c                        |  14 +-
 source3/libsmb/libsmb_server.c                     |  11 +-
 source3/modules/vfs_fruit.c                        |  93 +++++-
 source3/modules/vfs_glusterfs.c                    |   2 +-
 source3/modules/vfs_zfsacl.c                       |  10 +-
 source3/param/loadparm.c                           |  20 +-
 source3/script/tests/test_net_rpc_oldjoin.sh       |  32 ++
 source3/script/tests/test_smbclient_s3.sh          |  32 ++
 source3/selftest/tests.py                          |  15 +-
 source3/smbd/notify.c                              |  17 +-
 source3/smbd/server.c                              |   2 +-
 source3/smbd/smb2_lock.c                           |  17 +
 source3/smbd/smb2_server.c                         |  19 ++
 source3/torture/torture.c                          |   9 -
 source3/winbindd/idmap.c                           |   4 +-
 source3/winbindd/idmap_ldap.c                      |   2 +-
 source3/winbindd/idmap_proto.h                     |   3 +-
 source3/winbindd/idmap_rfc2307.c                   |   2 +-
 source3/winbindd/idmap_rid.c                       |  10 +-
 source3/winbindd/wb_getpwsid.c                     |   8 +-
 source3/winbindd/wb_xids2sids.c                    | 167 +++++++++-
 source3/winbindd/winbindd.c                        | 110 ++-----
 source3/winbindd/winbindd_cm.c                     |  36 +-
 source3/winbindd/winbindd_cred_cache.c             |  14 +-
 source3/winbindd/winbindd_dual.c                   |  50 +--
 source3/winbindd/winbindd_dual_srv.c               |   9 +-
 source3/winbindd/winbindd_group.c                  |  11 +-
 source3/winbindd/winbindd_irpc.c                   |  10 +-
 source3/winbindd/winbindd_misc.c                   |   2 +-
 source3/winbindd/winbindd_msrpc.c                  |   4 +-
 source3/winbindd/winbindd_pam_auth.c               |   2 +-
 source3/winbindd/winbindd_pam_auth_crap.c          |   2 +-
 source3/winbindd/winbindd_pam_chauthtok.c          |   2 +-
 .../winbindd/winbindd_pam_chng_pswd_auth_crap.c    |   2 +-
 source3/winbindd/winbindd_pam_logoff.c             |   2 +-
 source3/winbindd/winbindd_proto.h                  |   4 +-
 source3/winbindd/winbindd_rpc.c                    |   4 +-
 source3/winbindd/winbindd_util.c                   |  11 +-
 source3/wscript                                    |   4 +-
 source4/dns_server/dnsserver_common.c              |  36 +-
 source4/dsdb/samdb/ldb_modules/extended_dn_store.c |   7 +
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c    |  81 ++++-
 source4/dsdb/samdb/samdb.h                         |   3 +
 source4/kdc/hdb-samba4.c                           |  24 +-
 source4/libcli/smb2/keepalive.c                    |   7 +-
 .../add-dangling-deleted-link.ldif                 |   5 +
 .../add-deleted-backlink-user.ldif                 |   3 +
 ...ing-backlink.ldif => add-deleted-backlink.ldif} |   3 +-
 .../add-deleted-target-backlink-user.ldif          |   3 +
 .../add-deleted-target-backlink.ldif               |   4 +
 ...-one-way-link.ldif => dangling-one-way-dn.ldif} |   0
 .../release-4-5-0-pre1/dangling-one-way-link.ldif  |  22 +-
 .../release-4-5-0-pre1/deleted-one-way-dn.ldif     |  13 +
 .../expected-dbcheck-link-output.txt               |  58 ++--
 ...pected-dbcheck-link-output_duplicate_member.txt |   8 +
 .../expected-dbcheck-link-output_one_way.txt       |   7 +
 .../expected-duplicates-after-link-dbcheck.ldif    |  28 ++
 .../revive-backlink-on-deleted-group.ldif          |   5 +
 .../revive-links-on-deleted-group.ldif             |  20 ++
 source4/setup/schema_samba4.ldif                   |   2 +
 source4/smbd/server.c                              |  39 ++-
 source4/torture/smb2/session.c                     | 362 +++++++++++++++++++++
 source4/torture/vfs/fruit.c                        | 198 ++++++-----
 testprogs/blackbox/common-links.sh                 | 215 ++++++++++++
 testprogs/blackbox/dbcheck-links.sh                | 212 ++++--------
 testprogs/blackbox/runtime-links.sh                |  74 +++++
 testprogs/blackbox/test_net_ads.sh                 |  13 +
 third_party/aesni-intel/wscript                    |   7 +-
 wscript                                            |   4 +
 111 files changed, 3075 insertions(+), 801 deletions(-)
 copy lib/ldb/ABI/{ldb-1.2.2.sigs => ldb-1.2.3.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util-1.2.3.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util.py3-1.2.3.sigs} (100%)
 create mode 100644 lib/pthreadpool/tests_cmocka.c
 create mode 100644 selftest/knownfail.d/samba3.vfs.fruit
 create mode 100755 source3/script/tests/test_net_rpc_oldjoin.sh
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-dangling-deleted-link.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-deleted-backlink-user.ldif
 copy 
source4/selftest/provisions/release-4-5-0-pre1/{add-dangling-backlink.ldif => 
add-deleted-backlink.ldif} (67%)
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-deleted-target-backlink-user.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-deleted-target-backlink.ldif
 copy 
source4/selftest/provisions/release-4-5-0-pre1/{dangling-one-way-link.ldif => 
dangling-one-way-dn.ldif} (100%)
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/deleted-one-way-dn.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-dbcheck-link-output_duplicate_member.txt
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-dbcheck-link-output_one_way.txt
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-duplicates-after-link-dbcheck.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/revive-backlink-on-deleted-group.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/revive-links-on-deleted-group.ldif
 create mode 100644 testprogs/blackbox/common-links.sh
 create mode 100755 testprogs/blackbox/runtime-links.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 7a17821..f24f545 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=7
-SAMBA_VERSION_RELEASE=3
+SAMBA_VERSION_RELEASE=4
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 4e403ae..22ad049 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,128 @@
                    =============================
+                   Release Notes for Samba 4.7.4
+                          December 22, 2017
+                   =============================
+
+
+This is the latest stable release of the Samba 4.7 release series.
+
+
+smbclient reparse point symlink parameters reversed
+===================================================
+
+A bug in smbclient caused the 'symlink' command to reverse the
+meaning of the new name and link target parameters when creating a
+reparse point symlink against a Windows server.
+
+This only affects using the smbclient 'symlink' command against
+a Windows server, not a Samba server using the UNIX extensions
+(the parameter order is correct in that case) so no existing
+user scripts that depend on creating symlinks on Samba servers
+need to change.
+
+As this is a little used feature the ordering of these parameters
+has been reversed to match the parameter ordering of the UNIX
+extensions 'symlink' command. This means running 'symlink' against
+both Windows and Samba now uses the same paramter ordering in both
+cases.
+
+The usage message for this command has also been improved to remove confusion.
+
+
+Changes since 4.7.3:
+--------------------
+
+o  Jeremy Allison <[email protected]>
+   * BUG 13140: s3: smbclient: Implement 'volume' command over SMB2.
+   * BUG 13171: s3: libsmb: Fix valgrind read-after-free error in
+     cli_smb2_close_fnum_recv().
+   * BUG 13172: s3: libsmb: Fix reversing of oldname/newname paths when 
creating
+     a reparse point symlink on Windows from smbclient.
+
+o  Timur I. Bakeyev <[email protected]>
+   * BUG 12934: Build man page for vfs_zfsacl.8 with Samba.
+
+o  Andrew Bartlett <[email protected]>
+   * BUG 13095: repl_meta_data: Allow delete of an object with dangling
+     backlinks.
+   * BUG 13129: s4:samba: Fix default to be running samba as a deamon.
+   * BUG 13191: Performance regression in DNS server with introduction of
+     DNS wildcard, ldb: Release 1.2.3
+
+o  Ralph Boehme <[email protected]>
+   * BUG 6133: vfs_zfsacl: Fix compilation error.
+   * BUG 13051: "smb encrypt" setting changes are not fully applied until full
+     smbd restart.
+   * BUG 13052: winbindd: Fix idmap_rid dependency on trusted domain list.
+   * BUG 13155: vfs_fruit: Proper VFS-stackable conversion of FinderInfo.
+   * BUG 13173: winbindd: Dependency on trusted-domain list in winbindd in
+     critical auth codepath.
+
+o  Andrej Gessel <[email protected]>
+   * BUG 13120: repl_meta_data: Fix removing of backlink on deleted objects.
+
+o  Amitay Isaacs <[email protected]>
+   "* BUG 13153: ctdb: sock_daemon leaks memory.
+   * BUG 13154: TCP tickles not getting synchronised on CTDB restart.
+
+o  Volker Lendecke <[email protected]>
+   * BUG 13150: winbindd: winbind parent and child share a ctdb connection.
+   * BUG 13170: pthreadpool: Fix deadlock.
+   * BUG 13179: pthreadpool: Fix starvation after fork.
+   * BUG 13180: messaging: Always register the unique id.
+
+o  Gary Lockyer <[email protected]>
+   * 13129: s4/smbd: set the process group.
+
+o  Stefan Metzmacher <[email protected]>
+   * BUG 13095: Fix broken linked attribute handling.
+   * BUG 13132: The KDC on an RWDC doesn't send error replies in some
+     situations.
+   * BUG 13149: libnet_join: Fix 'net rpc oldjoin'.
+   * BUG 13195: g_lock conflict detection broken when processing stale entries.
+   * BUG 13197: s3:smb2_server: allow logoff, close, unlock, cancel and echo
+     on expired sessions.
+
+o  Noel Power <[email protected]>
+   * BUG 13166: s3:libads: net ads keytab list fails with "Key table name
+     malformed".
+
+o  Christof Schmitt <[email protected]>
+   * BUG 13170: Fix crash in pthreadpool thread after failure from 
pthread_create.
+
+o  Andreas Schneider <[email protected]>
+   * BUG 13129: s4:samba: Allow samba daemon to run in foreground.
+   * BUG 13174: third_party: Link the aesni-intel library with "-z 
noexecstack".
+
+o  Niels de Vos <[email protected]>
+   * BUG 13125: vfs_glusterfs: include glusterfs/api/glfs.h without relying on
+     "-I" options.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+                   =============================
                    Release Notes for Samba 4.7.3
                          November 21, 2017
                    =============================
@@ -66,8 +190,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
 
                    =============================
                    Release Notes for Samba 4.7.2
diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c
index b53b4d8..1fe5ff5 100644
--- a/ctdb/common/sock_daemon.c
+++ b/ctdb/common/sock_daemon.c
@@ -628,6 +628,14 @@ static void sock_daemon_run_started(struct tevent_req 
*subreq)
        struct sock_daemon_run_state *state = tevent_req_data(
                req, struct sock_daemon_run_state);
        struct sock_daemon_context *sockd = state->sockd;
+       bool status;
+
+       status = tevent_wakeup_recv(subreq);
+       TALLOC_FREE(subreq);
+       if (! status) {
+               tevent_req_error(req, EIO);
+               return;
+       }
 
        D_NOTICE("daemon started, pid=%u\n", getpid());
 
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index 5b2e2f5..17d6f98 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1549,6 +1549,7 @@ struct revokechild_deferred_call {
        struct ctdb_req_header *hdr;
        deferred_requeue_fn fn;
        void *ctx;
+       struct revokechild_handle *rc;
 };
 
 struct revokechild_handle {
@@ -1573,12 +1574,20 @@ static void deferred_call_requeue(struct tevent_context 
*ev,
        while (dlist != NULL) {
                struct revokechild_deferred_call *dcall = dlist;
 
+               talloc_set_destructor(dcall, NULL);
                DLIST_REMOVE(dlist, dcall);
                dcall->fn(dcall->ctx, dcall->hdr);
                talloc_free(dcall);
        }
 }
 
+static int deferred_call_destructor(struct revokechild_deferred_call *dcall)
+{
+       struct revokechild_handle *rc = dcall->rc;
+
+       DLIST_REMOVE(rc->deferred_call_list, dcall);
+       return 0;
+}
 
 static int revokechild_destructor(struct revokechild_handle *rc)
 {
@@ -1917,7 +1926,7 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context 
*ctdb, struct ctdb_db_cont
                return -1;
        }
 
-       deferred_call = talloc(ctdb_db, struct revokechild_deferred_call);
+       deferred_call = talloc(call_context, struct revokechild_deferred_call);
        if (deferred_call == NULL) {
                DEBUG(DEBUG_ERR,("Failed to allocate deferred call structure 
for revoking record\n"));
                return -1;
@@ -1927,6 +1936,9 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context 
*ctdb, struct ctdb_db_cont
        deferred_call->hdr  = talloc_steal(deferred_call, hdr);
        deferred_call->fn   = fn;
        deferred_call->ctx  = call_context;
+       deferred_call->rc   = rc;
+
+       talloc_set_destructor(deferred_call, deferred_call_destructor);
 
        DLIST_ADD(rc->deferred_call_list, deferred_call);
 
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index de38542..3abbee4 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1081,12 +1081,6 @@ static void ctdb_setup_event_callback(struct 
ctdb_context *ctdb, int status,
        }
        ctdb_run_notification_script(ctdb, "setup");
 
-       /* tell all other nodes we've just started up */
-       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL,
-                                0, CTDB_CONTROL_STARTUP, 0,
-                                CTDB_CTRL_FLAG_NOREPLY,
-                                tdb_null, NULL, NULL);
-
        /* Start the recovery daemon */
        if (ctdb_start_recoverd(ctdb) != 0) {
                DEBUG(DEBUG_ALERT,("Failed to start recovery daemon\n"));
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 738acb1..1864887 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -243,6 +243,12 @@ static void ctdb_startup_callback(struct ctdb_context 
*ctdb, int status, void *p
 
        ctdb->monitor->monitoring_mode = CTDB_MONITORING_ENABLED;
 
+       /* tell all other nodes we've just started up */
+       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED,
+                                0, CTDB_CONTROL_STARTUP, 0,
+                                CTDB_CTRL_FLAG_NOREPLY,
+                                tdb_null, NULL, NULL);
+
        tevent_add_timer(ctdb->ev, ctdb->monitor->monitor_context,
                         timeval_current_ofs(ctdb->monitor->next_interval, 0),
                         ctdb_check_health, ctdb);
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index c359d66..a7aa8db 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1495,24 +1495,23 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context 
*ctdb, TDB_DATA indata)
 }
 
 
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+                                             bool force);
+
 /*
   Called when another daemon starts - causes all tickles for all
   public addresses we are serving to be sent to the new node on the
-  next check.  This actually causes the next scheduled call to
-  tdb_update_tcp_tickles() to update all nodes.  This is simple and
+  next check.  This actually causes the tickles to be sent to the
+  other node immediately.  In case there is an error, the periodic
+  timer will send the updates on timer event.  This is simple and
   doesn't require careful error handling.
  */
 int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t pnn)
 {
-       struct ctdb_vnn *vnn;
-
        DEBUG(DEBUG_INFO, ("Received startup control from node %lu\n",
                           (unsigned long) pnn));
 
-       for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
-               vnn->tcp_update_needed = true;
-       }
-
+       ctdb_send_set_tcp_tickles_for_all(ctdb, true);
        return 0;
 }
 
@@ -1995,43 +1994,53 @@ static int ctdb_send_set_tcp_tickles_for_ip(struct 
ctdb_context *ctdb,
        return ret;
 }
 
-
-/*
-  perform tickle updates if required
- */
-static void ctdb_update_tcp_tickles(struct tevent_context *ev,
-                                   struct tevent_timer *te,
-                                   struct timeval t, void *private_data)
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+                                             bool force)
 {
-       struct ctdb_context *ctdb = talloc_get_type(private_data, struct 
ctdb_context);
-       int ret;
        struct ctdb_vnn *vnn;
+       int ret;
 
-       for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
-               /* we only send out updates for public addresses that 
+       for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
+               /* we only send out updates for public addresses that
                   we have taken over
                 */
                if (ctdb->pnn != vnn->pnn) {
                        continue;
                }
+
                /* We only send out the updates if we need to */
-               if (!vnn->tcp_update_needed) {
+               if (!force && !vnn->tcp_update_needed) {
                        continue;
                }
+
                ret = ctdb_send_set_tcp_tickles_for_ip(ctdb,
                                                       &vnn->public_address,
                                                       vnn->tcp_array);
                if (ret != 0) {
-                       DEBUG(DEBUG_ERR,("Failed to send the tickle update for 
public address %s\n",
-                               ctdb_addr_to_str(&vnn->public_address)));
+                       D_ERR("Failed to send the tickle update for ip %s\n",
+                             ctdb_addr_to_str(&vnn->public_address));
+                       vnn->tcp_update_needed = true;
                } else {
-                       DEBUG(DEBUG_INFO,
-                             ("Sent tickle update for public address %s\n",
-                              ctdb_addr_to_str(&vnn->public_address)));
+                       D_INFO("Sent tickle update for ip %s\n",
+                              ctdb_addr_to_str(&vnn->public_address));
                        vnn->tcp_update_needed = false;
                }
        }
 
+}
+
+/*
+  perform tickle updates if required
+ */
+static void ctdb_update_tcp_tickles(struct tevent_context *ev,
+                                   struct tevent_timer *te,
+                                   struct timeval t, void *private_data)
+{
+       struct ctdb_context *ctdb = talloc_get_type(
+               private_data, struct ctdb_context);
+
+       ctdb_send_set_tcp_tickles_for_all(ctdb, false);
+
        tevent_add_timer(ctdb->ev, ctdb->tickle_update_context,
                         
timeval_current_ofs(ctdb->tunable.tickle_update_interval, 0),
                         ctdb_update_tcp_tickles, ctdb);
diff --git a/docs-xml/smbdotconf/tuning/getwdcache.xml 
b/docs-xml/smbdotconf/tuning/getwdcache.xml
index 93f7a90..ec4d9ed 100644
--- a/docs-xml/smbdotconf/tuning/getwdcache.xml
+++ b/docs-xml/smbdotconf/tuning/getwdcache.xml
@@ -6,7 +6,7 @@
     <para>This is a tuning option. When this is enabled a 
     caching algorithm will be used to reduce the time taken for getwd() 
     calls. This can have a significant impact on performance, especially 
-    when the <smbconfoption name="wide smbconfoptions"/> parameter is set to 
<constant>no</constant>.</para>
+    when the <smbconfoption name="wide links"/> parameter is set to 
<constant>no</constant>.</para>
 </description>
 
 <value type="default">yes</value>
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index eb25aa0..3ff1ade 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -158,3 +158,6 @@ if ('XSLTPROC_MANPAGES' in bld.env and 
bld.env['XSLTPROC_MANPAGES']):
 
     if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
         bld.SAMBAMANPAGES(krb5_locator_manpages)
+
+    if bld.SAMBA3_IS_ENABLED_MODULE('vfs_zfsacl'):
+        bld.SAMBAMANPAGES('manpages/vfs_zfsacl.8')
diff --git a/lib/ldb/ABI/ldb-1.2.2.sigs b/lib/ldb/ABI/ldb-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/ldb-1.2.2.sigs
copy to lib/ldb/ABI/ldb-1.2.3.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs 
b/lib/ldb/ABI/pyldb-util-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util-1.2.3.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs 
b/lib/ldb/ABI/pyldb-util.py3-1.2.3.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util.py3-1.2.3.sigs
diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c
index 3510dd9..56ecf93 100644
--- a/lib/ldb/ldb_tdb/ldb_index.c
+++ b/lib/ldb/ldb_tdb/ldb_index.c
@@ -79,7 +79,9 @@ static int dn_list_cmp(const struct ldb_val *v1, const struct 
ldb_val *v2)
   find a entry in a dn_list, using a ldb_val. Uses a case sensitive
   comparison with the dn returns -1 if not found
  */
-static int ltdb_dn_list_find_val(const struct dn_list *list, const struct 
ldb_val *v)
+static int ltdb_dn_list_find_val(struct ltdb_private *ltdb,
+                                const struct dn_list *list,
+                                const struct ldb_val *v)
 {
        unsigned int i;
        for (i=0; i<list->count; i++) {
@@ -94,12 +96,14 @@ static int ltdb_dn_list_find_val(const struct dn_list 
*list, const struct ldb_va
   find a entry in a dn_list. Uses a case sensitive comparison with the dn
   returns -1 if not found
  */
-static int ltdb_dn_list_find_str(struct dn_list *list, const char *dn)
+static int ltdb_dn_list_find_str(struct ltdb_private *ltdb,
+                                struct dn_list *list,
+                                const char *dn)
 {
        struct ldb_val v;
        v.data = discard_const_p(unsigned char, dn);
        v.length = strlen(dn);
-       return ltdb_dn_list_find_val(list, &v);
+       return ltdb_dn_list_find_val(ltdb, list, &v);
 }
 
 /*
@@ -219,7 +223,9 @@ normal_index:
 /*
   save a dn_list into a full @IDX style record
  */
-static int ltdb_dn_list_store_full(struct ldb_module *module, struct ldb_dn 
*dn,
+static int ltdb_dn_list_store_full(struct ldb_module *module,
+                                  struct ltdb_private *ltdb,
+                                  struct ldb_dn *dn,
                                   struct dn_list *list)
 {
        struct ldb_message *msg;
@@ -274,7 +280,8 @@ static int ltdb_dn_list_store(struct ldb_module *module, 
struct ldb_dn *dn,
        struct dn_list *list2;
 
        if (ltdb->idxptr == NULL) {
-               return ltdb_dn_list_store_full(module, dn, list);
+               return ltdb_dn_list_store_full(module, ltdb,
+                                              dn, list);
        }
 
        if (ltdb->idxptr->itdb == NULL) {
@@ -345,7 +352,8 @@ static int ltdb_index_traverse_store(struct tdb_context 
*tdb, TDB_DATA key, TDB_
                return -1;
        }
 
-       ltdb->idxptr->error = ltdb_dn_list_store_full(module, dn, list);
+       ltdb->idxptr->error = ltdb_dn_list_store_full(module, ltdb,
+                                                     dn, list);
        talloc_free(dn);
        if (ltdb->idxptr->error != 0) {
                return -1;
@@ -575,6 +583,7 @@ static int ltdb_index_dn_leaf(struct ldb_module *module,
   list = list & list2
 */
 static bool list_intersect(struct ldb_context *ldb,
+                          struct ltdb_private *ltdb,
                           struct dn_list *list, const struct dn_list *list2)
 {
        struct dn_list *list3;
@@ -622,7 +631,8 @@ static bool list_intersect(struct ldb_context *ldb,
        list3->count = 0;
 
        for (i=0;i<list->count;i++) {
-               if (ltdb_dn_list_find_val(list2, &list->dn[i]) != -1) {
+               if (ltdb_dn_list_find_val(ltdb, list2,
+                                         &list->dn[i]) != -1) {
                        list3->dn[list3->count] = list->dn[i];
                        list3->count++;
                }
@@ -846,7 +856,8 @@ static int ltdb_index_dn_and(struct ldb_module *module,
                        list->dn = list2->dn;
                        list->count = list2->count;
                        found = true;
-               } else if (!list_intersect(ldb, list, list2)) {
+               } else if (!list_intersect(ldb, ltdb,
+                                          list, list2)) {
                        talloc_free(list2);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
@@ -952,7 +963,8 @@ static int ltdb_index_dn(struct ldb_module *module,
   filter a candidate dn_list from an indexed search into a set of results
   extracting just the given attributes
 */


-- 
Samba Shared Repository

Reply via email to