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

Stefan Metzmacher metze at samba.org
Wed Aug 24 13:36:06 UTC 2016


The branch, v4-5-test has been updated
       via  eb55718 ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper
       via  c0dba49 ctdb-tests: Remove function daemons_start_1()
       via  2070850 ctdb-tests: Move local daemon configuration creation into setup_ctdb()
       via  e281108 ctdb-tests: Drop attempts to pass arguments to ctdbd on (re)start
       via  f4618fc ctdb-tests: Drop function _ctdb_hack_options()
       via  18334fd ctdb-ipalloc: Fix cumulative takeover timeout
       via  46890c5 ctdb-daemon: When releasing an IP, update PNN in callback
       via  2a9566f ctdb-daemon: Rename takeover_callback_state -> release_ip_callback_state
       via  65445d5 ctdb-daemon: Use release_ip_post() when releasing all IP addresses
       via  5fa6a1d ctdb-daemon: Factor out new function release_ip_post()
       via  c80c2cf ctdb-daemon: Do not copy address for RELEASE_IP message
       via  5e4db43 ctdb-daemon: Do not update the VNN state on RELEASE_IP failure
       via  a275b0c ctdb-daemon: Try to release IP address even if interface is unknown
       via  bddfe9b ctdb-common: Save errno before closing file to keep debug accurate
       via  52813cd ctdb-tools: Consistently use db_name
       via  5159811a ctdb-tools: Fix CID 1125618 String not null terminated (STRING_NULL)
       via  386ba36 ctdb-logging: Fix CID 1272823 Unchecked return value from library
       via  965920b ctdb-daemon: Fix CID 1362723 Unchecked return value from library
       via  c92614b ctdb-tcp: Fix CID 1362724 Unchecked return value from library
       via  d244616 ctdb-client: Print error message before next syscall to avoid losing errno
       via  6933784 ctdb-client: Fix CID 1362725 Unchecked return value from library
       via  03d7c48 ctdb-daemon: Fix CID 1362726 Unchecked return value from library
       via  7b12049 ctdb-tcp: Set file descriptor to -1 after close.
       via  33dd902 ctdb-tcp: Fix CID 1362727 Unchecked return value from library
       via  2f10d65 ctdb-common: Fix CID 1362728 Unchecked return value from library
       via  14c7c6a ctdb-common: Fix CID 1362729 Unchecked return value from library
       via  f2c64a9 ctdb-tests: Update porting test to be more flexible about line numbers
       via  4f6592c ctdb-daemon: Fix CID 1125574 Operands don't affect result
       via  74e2593 ctdb-daemon: Fix CID 1125575 Operands don't affect result
       via  0d74d1d ctdb-daemon: Fix CID 1272855 Operands don't affect result
       via  cf494f8 ctdb-tools: Addition of IPs is deferred until the next takeover run
       via  0083c24 ctdb-tools: Drop "ctdb rebalancenode"
       via  b356446 ctdb-tools: Drop "ctdb rebalanceip"
       via  8754d07 ctdb-pmda: Use 1s timeout for fetching statistics
       via  2b203f1 ctdb-ib: Fix DEBUG log messages
       via  398f904 ctdb-recovery-helper: Fix format-nonliteral warning
       via  720af0a ctdb-daemon: Fix format-nonliteral warning
       via  91bd05f ctdb-daemon: Fix format-nonliteral warning
       via  38f2415 ctdb-daemon: Fix format-nonliteral warning
       via  0d98196 ctdb-common: Fix format-nonliteral warning
       via  ca7fa0c lib/util: Fix format strings and argument data types
       via  6275a94 torture: Fix format-nonliteral warning
       via  3abe405 passdb: Fix format-nonliteral warning
       via  05758f4 wibindd: Fix format-nonliteral warning
       via  14afd99 regedit: Fix format-nonliteral warning
       via  058e7c0 s3-libnet: Fix format-nonliteral warning
       via  acef41a s3-netapi: Fix format-nonliteral warning
       via  aa35339 s3-include: Fix format-nonliteral warning
       via  3f635ce s3-lib: Fix format-nonliteral warning
       via  61423eb ldb: Fix format-nonliteral warning
       via  de35ebd lib/util: Fix format-nonliteral warning
       via  0da9c69 tdb: Fix format-nonliteral warning
       via  685aac2 talloc: Fix format-nonliteral warning
       via  d6ece9c s3-lib: Remove unused function sprintf_append
       via  b216684 s3-libnet: Add missing format element
       via  78460d1 s3-lib: Pass missing argument for format string
       via  f57177f idmap: centrally check that unix IDs returned by the idmap backends are in range
       via  294944f idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()
       via  7ab1f4f libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path.
       via  e217c14 s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss.
       via  d6e8fd9 smbd: allow reading files based on FILE_EXECUTE access right
       via  dca2195 smbd: look only at handle readability for COPYCHUNK dest
       via  5ffcd2b s4-smbtorture: pin copychunk exec right behavior
       via  2d8c18f seltest: allow opening files with arbitrary rights in smb2.ioctl tests
       via  416a362 seltest: implicit FILE_READ_DATA non-reporting
       via  df68a61 s4-selftest: add test for read access check
       via  84d6e5a s4-selftest: add functions which create with desired access
       via  9a29038 s4-smbtorture: use standard macros in smb2.read test
       via  84ffa9a selftest: add tests for dfree with inherit owner enabled
       via  78b96ed selftest: refactor test_dfree_quota.sh - add share parameter
       via  9eb4ce1 smbd: use owner uid for free disk calculation if owner is inherited
       via  55d057d smbd: get a valid file stat to disk_quotas
       via  97863e8 quotas: small cleanup
       via  811fd8b s3: oplock: Fix race condition when closing an oplocked file.
       via  a36549c smbd: oplock: Factor out internals of remove_oplock() into new remove_oplock_under_lock().
       via  5fa05ec smbd: oplock: Fixup debug messages inside remove_oplock().
      from  edc2eb2 WHATSNEW.txt: Added more details about multiple DNS forwarders

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


- Log -----------------------------------------------------------------
commit eb55718e1b4858972abb8583c8db6b433f40d24a
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 23 11:49:54 2016 +1000

    ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper
    
    The current daemons_stop() implementation uses very loose matching to
    decide which processes to kill if "ctdb shutdown" hasn't worked within
    1 second.  This can cause ctdbd processes from other test runs to be
    killed.
    
    Instead, use ctdbd_wrapper, which uses the PID file as a last resort.
    This has the advantage of never killing ctdbd processes from other
    test runs.  However, this also has the obvious consequence that an
    interrupted test run in one directory can not have its daemons cleaned
    up from a new test run in a different directory.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 17dfd8b96bc1750a2f435caa1d208766257346f3)
    
    Autobuild-User(v4-5-test): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(v4-5-test): Wed Aug 24 15:35:51 CEST 2016 on sn-devel-144

commit c0dba4948c2f201eceb681c51ac6361e982e474b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 23 11:07:25 2016 +1000

    ctdb-tests: Remove function daemons_start_1()
    
    This function doesn't do anything significant, so just unroll the body
    into the loop in daemons_start().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit bcb33c46dfe3d6c06eb6b3b5e7f8625538772d5e)

commit 207085031f0af210487109c9caa14366c5c5898c
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 23 10:59:25 2016 +1000

    ctdb-tests: Move local daemon configuration creation into setup_ctdb()
    
    These files don't need to be re-generated on every restart.  They can
    be generated once when CTDB is first started.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 3c87868d208de8928e25db1dd34266830f017a07)

commit e281108840a86b8ba3eaead873d75f0f3cda9861
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 23 10:23:56 2016 +1000

    ctdb-tests: Drop attempts to pass arguments to ctdbd on (re)start
    
    This is not used.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit eb38d02eb77dd654c8ed79fe985f738431918c9f)

commit f4618fca5635b592fb3386006e2a2c8ad442c74b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 23 10:20:51 2016 +1000

    ctdb-tests: Drop function _ctdb_hack_options()
    
    It does something special if the --start-as-stopped option is given
    and is not used in any tests.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit fd443b8cce4dedfe9a72f25e955274f66da41290)

commit 18334fd214795ad1e93f5d2dbc1d21c8405c8aaa
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Aug 18 12:57:33 2016 +1000

    ctdb-ipalloc: Fix cumulative takeover timeout
    
    Commit c40fc62642ff5ac49b75e9af49c299e33dbc9073 runs the IP allocation
    algorithm after calculating the timeout offset.  If the algorithm
    takes a long time then there may be no attempt to release or take over
    IPs.
    
    Instead, reset the timeout just before the RELEASE_IP stage if an
    early jump to IPREALLOCATED was not taken.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12161
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Thu Aug 18 12:36:37 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 626dcc9e493e2ac4fd502f75c7cb4d29f686f017)

commit 46890c52e6e3d1e1545439972287e171249523ba
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 19 16:38:50 2016 +1000

    ctdb-daemon: When releasing an IP, update PNN in callback
    
    When an error occurs so an IP address is not released then the PNN in
    the VNN is currently incorrectly updated.
    
    Instead, update the PNN in the callback when the release is
    successful.  Also, explicitly update the PNN on redundant releases.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Sun Aug 21 22:45:33 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 6dc75c7d24325d2070eb7feab5399dbfda50da96)

commit 2a9566f27f21502f93ee6f2615f5f2f0e8cd4d7f
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 19 16:30:46 2016 +1000

    ctdb-daemon: Rename takeover_callback_state -> release_ip_callback_state
    
    Many years ago takeover_callback_state was used for both IP takeover
    and release.  Now it is only used when releasing an IP so rename it to
    improve clarity.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 976a50af6f045765c7bf1961e26efc3cba17f3ba)

commit 65445d55038bb3b6ded667fdad34d4e69bc75fe1
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Aug 11 14:07:44 2016 +1000

    ctdb-daemon: Use release_ip_post() when releasing all IP addresses
    
    This has the advantage of using common code.  Also, if there was
    previously a failed attempt to release the IP address as part of a
    delete, then this will finish processing the delete.
    
    Extra care needs to be taken when a VNN is actually deleted.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit d2a91394f55a2e0152bf470dac2608618db13b1f)

commit 5fa6a1dfb009698c6991d44c73cb98972a26bfe7
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Aug 11 13:57:43 2016 +1000

    ctdb-daemon: Factor out new function release_ip_post()
    
    This contains the cleanup that needs to be done after an IP address is
    released from an interface.
    
    state->vnn is set to the return value from release_ip_post(), which is
    either the original VNN, or NULL if it was deleted.  This allows
    correct handling of the in-flight flag in the destructor for state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 46c5136e4e4bd291cbb96395374c9b133f5d8ad8)

commit c80c2cf16e1f29f1950494174c45ff520cd219b4
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Aug 11 13:41:12 2016 +1000

    ctdb-daemon: Do not copy address for RELEASE_IP message
    
    If there's an allocation failure then the implicit early return in
    CTDB_NO_MEMORY_VOID() means that no reply is sent to the control.
    ctdb_daemon_send_message() makes a copy of the data, so don't copy it
    here and remove an unnecessary chance of failure.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit e653c8bb4a7bd712351a4ead3997c61b22c46f8d)

commit 5e4db43c54f4df24577ef51152dea48f9e7895d1
Author: Martin Schwenke <martin at meltin.net>
Date:   Sat Jul 30 11:12:19 2016 +1000

    ctdb-daemon: Do not update the VNN state on RELEASE_IP failure
    
    If RELEASE_IP fails then updating the VNN makes it inconsistent with
    reality.  Instead, log the failure and move on to the next IP
    address.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit ca22373231918dab4e94cf1bab03253aadd61993)

commit a275b0c3dcb10dd5c293402d4bf083629fa8ddc6
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 8 07:09:38 2016 +1000

    ctdb-daemon: Try to release IP address even if interface is unknown
    
    The "releaseip" event in 10.interface will determine the interface and
    do the right thing.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 509491a868ed01bfc5a970bd36eea4b01130853a)

commit bddfe9b496af38e54a8655503826013484a08a33
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 15 15:22:54 2016 +1000

    ctdb-common: Save errno before closing file to keep debug accurate
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    In the AIX case, also add the close of the file.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 225575e7e7d154ac24fef71e503e0cccd69f7463)

commit 52813cd35056895c88bfe69b664adc58378d991a
Author: Martin Schwenke <martin at meltin.net>
Date:   Sat Aug 13 10:29:24 2016 +1000

    ctdb-tools: Consistently use db_name
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    CID 1364703: Resource leak (RESOURCE_LEAK)
    
    However, this would already be fixed by the fix for CID 1125618, so
    this is probably just a minor bug fix.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 24001891dd3d990bf1096cbdd83df4d7bc823f8d)

commit 5159811a49d367688c117ef98b5a9097c4f5c1e5
Author: Martin Schwenke <martin at meltin.net>
Date:   Sat Aug 13 10:29:15 2016 +1000

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

commit 386ba3614ba8ee13ffec74fac764f25c60f329a6
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:45:35 2016 +1000

    ctdb-logging: Fix CID 1272823 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 254d5545f45f97afc737f00542dff985cd76a08e)

commit 965920b19b5133a48e745afb104cf40d0bd166e3
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:35:22 2016 +1000

    ctdb-daemon: Fix CID 1362723 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 1de8948cb5f4d904dd0d5520c3f13034ed522cb2)

commit c92614bf4e23a1869ebeeee2ae6d0ed938f2a62b
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:31:52 2016 +1000

    ctdb-tcp: Fix CID 1362724 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit bacf57c0658a220c9da6d2dfdf8dd42b9a491556)

commit d244616bced64dec23fa0cc7d34489583c0aba4e
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 15 14:50:09 2016 +1000

    ctdb-client: Print error message before next syscall to avoid losing errno
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 1710b14a3cfac8f6e768c51f7a510b4ed6aac5c7)

commit 693378408ceb6a9fdc665a7a0348b0677d5ae181
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:18:55 2016 +1000

    ctdb-client: Fix CID 1362725 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 94018302fd75c079369fff9492c1e09408e848af)

commit 03d7c480506db21a3cd48d00224678b57c81b944
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:16:34 2016 +1000

    ctdb-daemon: Fix CID 1362726 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 0de52420b8735a50e8681655a49c59d3dab8a61f)

commit 7b1204917b91516a3c81e605c4e0dfeece7f7907
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 15 09:43:46 2016 +1000

    ctdb-tcp: Set file descriptor to -1 after close.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 0e737348227252d2c0d1708be40753775a9b17ad)

commit 33dd9020ef8160fae3e4b2c02fa42bfd1a3c5597
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:12:21 2016 +1000

    ctdb-tcp: Fix CID 1362727 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit ce451c7cc670dad3066ee11c69245d841662844e)

commit 2f10d65e2cd1c1c6c632a7bb5322745b9def40a0
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:04:45 2016 +1000

    ctdb-common: Fix CID 1362728 Unchecked return value from library
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 4bc934f13234ece7fae0d533c23fd879e55b8ad2)

commit 14c7c6a0bfbdee9f4ef443a25ffe6b336b5e7624
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Aug 11 11:15:58 2016 +1000

    ctdb-common: Fix CID 1362729 Unchecked return value from library
    
    Drop setting socket non-blocking and close-on-exec.  The socket is
    closed soon after.  Only a single packet is sent, making it almost
    impossible for it to block.  Also, note that sockets aren't setup this
    way for IPv6.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 6d1099a522de129cee8cdf9183ab3aaabe0592db)

commit f2c64a965abc4f27bbf7aa536e0520c5e7df8e12
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 17:02:22 2016 +1000

    ctdb-tests: Update porting test to be more flexible about line numbers
    
    This way the test doesn't need to be changed every time the code is
    moved around.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 198ca8839175e93988ee52e033195238064aaba5)

commit 4f6592c969c784906fea7d8af8b1cba1d68d928d
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 16:53:54 2016 +1000

    ctdb-daemon: Fix CID 1125574 Operands don't affect result
    
    Interfaces going up or down are always interesting, so log these at
    error level.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 518683abfec163a6186c8502c2f9abae6dccb487)

commit 74e25930f11244e606524c091279c50dd1cc4a4c
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 16:46:51 2016 +1000

    ctdb-daemon: Fix CID 1125575 Operands don't affect result
    
    This is related to an error, so repeatedly log at error level instead
    of trying to avoid repetition.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 1be2cd9dd2fc5093121c12aabf25116a840581f8)

commit 0d74d1d4c122f76eec1cf93c3cbdc8ddbe1b0153
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 10 16:42:13 2016 +1000

    ctdb-daemon: Fix CID 1272855 Operands don't affect result
    
    Failures are already logged at alert/error level above, so just log
    the summary at notice level.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit b92c78a043d20d5d94f5dbb0fed750b820b2f248)

commit cf494f8f9cb51d33f4288083ff51ee7e76bbe8bc
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 15 15:54:51 2016 +1000

    ctdb-tools: Addition of IPs is deferred until the next takeover run
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12152
    
    This makes the behaviour of "ctdb addip" similar to "ctdb delip".
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit f635bd8997e2df1ed61429520e19fedb13cad97e)

commit 0083c2476ec785967ddf1a680644964a1eb5faf6
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 15 15:58:58 2016 +1000

    ctdb-tools: Drop "ctdb rebalancenode"
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
    
    This was already dropped in commit d67868469521341aa92c589a0bb6df90b150d555.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Wed Aug 17 09:22:13 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 47e6c37dca674f54992ffffb1c9895230c4c9e90)

commit b3564463fa73177f048e282db26d00711d0a1110
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 15 15:58:19 2016 +1000

    ctdb-tools: Drop "ctdb rebalanceip"
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
    
    This was already dropped in commit aaa57fbcb392061f8fbb5a12fd0e6a7be934ab66.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit f376f346f25f12b63a11e10d097282c364c1a514)

commit 8754d079750393db5291eb4fdaa8b9d7c12b70df
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 19:06:10 2016 +1000

    ctdb-pmda: Use 1s timeout for fetching statistics
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12138
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 499bfce3e9138e01216170a25b12b404d7430a74)

commit 2b203f19895f76ed84e8d8e8f66291cda5472b11
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:22:13 2016 +1000

    ctdb-ib: Fix DEBUG log messages
    
    https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit c0246b4cc2c351dced44d28021ee4139bdf7b288)

commit 398f904ee370f688d3e1e73aa2637c31c958a97f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 19:04:17 2016 +1000

    ctdb-recovery-helper: Fix format-nonliteral warning
    
    ... and printf format errors.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit f1a8fb11dda578f194063cdcf2c5dca7000b272b)

commit 720af0af21b34889cfb9e86755786a7ddd3dd5ae
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 19:00:54 2016 +1000

    ctdb-daemon: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit 5176354d1279f0e3c216c58ea8637579d9a6a389)

commit 91bd05f549f7dc348a4ce88e57d4d60a3ba1360f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:58:51 2016 +1000

    ctdb-daemon: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit fa0015d9adbd3c98957dc61d04b7ffcaa6703e0f)

commit 38f2415f0c2f145f46c63ab78ecab8f4cc1348ae
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:54:31 2016 +1000

    ctdb-daemon: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit d682ee99810caac489c20d8b673ff4b12a17d75f)

commit 0d981962b6b9f8d82304524b59b9b7eb2fe3ff55
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:31:14 2016 +1000

    ctdb-common: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit b201859372189b6e7d57e078a813861a1533aaf4)

commit ca7fa0c854b4e6687276ce0b62d39405b4e25ade
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 22 02:53:00 2016 +1000

    lib/util: Fix format strings and argument data types
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Aug 24 05:32:15 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 04126d54d5430c5e2fdbbfea58d76b253b81a407)

commit 6275a94bc776dfad6f2fe7c3de7057239a6447dc
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 17:59:08 2016 +1000

    torture: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b077969a72a8010b7fac37102eb1d0c1a2111fc4)

commit 3abe405fb413d62c28de04427052d82846de195e
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 17:40:51 2016 +1000

    passdb: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit c1a791e17c6e94c7d33351c420f238b06461a044)

commit 05758f4ae8fcc22e718a0d546abff015acca83e2
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 14:22:30 2016 +1000

    wibindd: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 908c068979dc69ae4664a9fa31e2f91ed115b84a)

commit 14afd991c1fd92a76a7580e7f5e722a2090e09a4
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 14:21:14 2016 +1000

    regedit: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 5855b039ddedd39a81eaf419d771b32e02668cd3)

commit 058e7c0769c0ab8c861e0ff8afd96561da05e8fb
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 14:18:31 2016 +1000

    s3-libnet: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 44baf81e8342349a9131acc5d784e65247ac32a6)

commit acef41a1e60805c3f4e3da28c28b27c0afca93d1
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 14:17:18 2016 +1000

    s3-netapi: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 2d47c2b7a15ce228a201dfda63455acbff981680)

commit aa3533973abac530a548c902f4ed40c499ce140e
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Aug 8 14:16:29 2016 +1000

    s3-include: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 4b4d3643555a68f585e38e37604ed4ecae9137f5)

commit 3f635ce444d756cdee35851ef3571c603c6d7b07
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Sun Aug 7 18:14:31 2016 +1000

    s3-lib: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit e9b8751b587c1eabc4c1a7a7d75e3c4498c6ffc4)

commit 61423eb2b0ed2fb3f4012032c436d7fb3cfd8e13
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Aug 3 00:44:24 2016 +1000

    ldb: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit a47e95337e96f3e62cde41680d94268f7ce58c6f)

commit de35ebd24db3e3ea4825f33ad411234575074015
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:11:17 2016 +1000

    lib/util: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 258cf9a170f331992c916569d3b5b52b5d731226)

commit 0da9c693ad2673aacf65f31f8c0666250cc07b97
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:17:34 2016 +1000

    tdb: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b891feaf2b1db064a725e205c861dc6d0c83aca0)

commit 685aac2c0f37bd8734db34a7cfb61eb397e1f5e2
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 2 18:05:14 2016 +1000

    talloc: Fix format-nonliteral warning
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 5fb54d4d814288b796a075e01c054f607d6ce571)

commit d6ece9c5cdacbace6f9b0af0d6d6fcf6f65525ce
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Aug 23 15:05:08 2016 +1000

    s3-lib: Remove unused function sprintf_append
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit d123085f695745cc58f3d6882bfc7ce0893d8b84)

commit b216684df5f03a9a8c865a1ee4ceea4a1501f89f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Aug 19 01:26:38 2016 +1000

    s3-libnet: Add missing format element
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12163
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Thu Aug 18 23:49:42 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 23b4fb681aa7c02450d0ebb06af87943163b959b)

commit 78460d1854e802906482847349e63577e1e668dd
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Sun Aug 7 18:17:19 2016 +1000

    s3-lib: Pass missing argument for format string
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12163
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit a37048f8d49eb72ea89a8708032d4d04dac59f3d)

commit f57177f0fb0cd9a8b3dd4a93467de0e178dc203e
Author: Michael Adam <obnox at samba.org>
Date:   Tue Aug 9 18:25:12 2016 +0200

    idmap: centrally check that unix IDs returned by the idmap backends are in range
    
    Note: in the long run, it might be good to move this kind of
    exit check (before handing the result back to the client)
    to the parent winbindd code.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12155
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Wed Aug 17 01:21:39 CEST 2016 on sn-devel-144
    
    (cherry picked from commit b2bf61307cffd8ff7b6fb9852c107ab763653119)

commit 294944f6a8dbc2f9c2c4f166fd267e9a391c53f0
Author: Michael Adam <obnox at samba.org>
Date:   Mon Aug 15 23:07:33 2016 +0200

    idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()
    
    If the range allows it, then id==0 should not be forbidden.
    This seems to have been taken in from idmap_ldap when the
    function was originally created.
    
    See 634cd2e0451d4388c3e3f78239495cf595368b15 .
    The other backends don't seem to have had that
    extra check for id == 0.
    
    The reasoning for this change is that the range check should
    apply to all cases. If the range includes the 0, then it
    should be possible to get it as result. In particular,
    this way, the function becomes applicable also to the
    passdb backend case, e.g. in a samba4-ad-dc setup where
    the Admin gets uid == 0.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12155
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit c21976d4b1c604699299f2c0f768c1add93b349d)

commit 7ab1f4fcf701ce8e295a0281dc2da4d97119f22f
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Aug 9 11:57:20 2016 -0700

    libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit 2a8ccc0841184c2df9fc19f8452009b92071c115)

commit e217c14f3ca99e8c88d96a69e420157efe936e12
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Aug 8 16:53:21 2016 -0700

    s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit 27ebf64b347a770e0d1ad4f1db645cb1b8dd5861)

commit d6e8fd9dcff834889c23326d41088200a484090e
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Aug 4 14:59:23 2016 +0300

    smbd: allow reading files based on FILE_EXECUTE access right
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Thu Aug 18 18:58:22 CEST 2016 on sn-devel-144
    
    (cherry picked from commit a6073e6130d39dac58f1e6ea9f41ec4ab34c3e29)

commit dca2195ab2d762b1f555064ccff28d9206a28afb
Author: Uri Simchoni <uri at samba.org>
Date:   Sat Aug 13 00:19:33 2016 +0300

    smbd: look only at handle readability for COPYCHUNK dest
    
    This commits sets the stage for a change of behavior
    in a later commit.
    
    When checking FILE_READ_DATA on the COPYCHUNK dest handle,
    only check the handle readability and not the extra right
    that may have been added due to the FILE_EXECUTE right.
    
    The check for FILE_READ_DATA always seemed strange for the
    dest handle, which is not read. It turns out that in Windows,
    this check is not done at the SMB layer, but at a lower layer
    that processes the IOCTL request - the IOCTL code has bits
    that specify what type of access check needs to be done.
    
    Therefore, this lower layer is unaware of the SMB layer's
    practice of granting READ access based on the FILE_EXECUTE
    right, and it only checks the handle's readability.
    
    This subtle difference has observable behavior - the
    COPYCHUNK source handle can have FILE_EXECUTE right instead
    of FILE_READ_DATA, but the dest handle cannot.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Tue Aug 16 15:21:03 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 3e42b69d5e1216b6af570a09d58040d281bbbf17)

commit 5ffcd2b306b73617c8bdb01496e60202a4b31292
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Aug 4 13:12:58 2016 +0300

    s4-smbtorture: pin copychunk exec right behavior
    
    Add tests that show copychunk behavior when the
    source and dest handles have execute right instead
    of read-data right.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 5bf11f6f5b4dab4cba4b00674bcb76138fb55974)

commit 2d8c18f645d79765c5938da9a7cf2f6be6b285bb
Author: Uri Simchoni <uri at samba.org>
Date:   Mon Aug 15 23:39:50 2016 +0300

    seltest: allow opening files with arbitrary rights in smb2.ioctl tests
    
    Separate file creation (which requires write access) from the
    opening of the file for the test (which might be without write
    access).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 6ce0304eda4b464972defcecd591fab03428bd03)

commit 416a362d5c42d6dcc5212aa3ba4b483805b56d94
Author: Uri Simchoni <uri at samba.org>
Date:   Sat Aug 13 21:23:34 2016 +0300

    seltest: implicit FILE_READ_DATA non-reporting
    
    This test (passes against Windows Server 2012R2) shows
    that the implicit FILE_READ_DATA that is added whenever
    FILE_EXECUTE is granted, is not reported back when querying
    the handle.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 7dc9f582066d500bf57000891560610e8d2e208c)

commit df68a61323ce07ef18b21ee0adf1f87958788ce8
Author: Uri Simchoni <uri at samba.org>
Date:   Sun Jul 31 14:29:37 2016 +0300

    s4-selftest: add test for read access check
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 55a9d35cabaea6e98211fc058b788cedf9b7b22a)

commit 84d6e5a017748c9bfb7d37f53129fcb58f27d23e
Author: Uri Simchoni <uri at samba.org>
Date:   Sun Jul 31 14:26:24 2016 +0300

    s4-selftest: add functions which create with desired access
    
    Add functions which create a file or a directory with
    specific desired access.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 1b06acafa4e9ea91a50e5ed85da881187057da6e)

commit 9a29038e34f99a2c215b59b966b7099c49bd190c
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Aug 4 12:59:38 2016 +0300

    s4-smbtorture: use standard macros in smb2.read test
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 20b9a5bd74fafbca4b7cc7952c27033edcf0eeb8)

commit 84ffa9a68900909b195265784f40220434077a17
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Aug 11 23:54:22 2016 +0300

    selftest: add tests for dfree with inherit owner enabled
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b6931d5edc381d64ba0fbcd85538cd65e90a2560)

commit 78b96ed473a36a65bcefbb66ade628f6d2a54c5d
Author: Uri Simchoni <uri at samba.org>
Date:   Wed Jan 20 21:54:24 2016 +0200

    selftest: refactor test_dfree_quota.sh - add share parameter
    
    Add a share parameter to individual disk-free tests. This will
    allow running tests on shares other than dfq share.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit f20d57eceacccb365892dec816cbe57e2ddda8b9)

commit 9eb4ce1d4864f7c1e25d8226c6bca9278f687854
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Aug 11 23:37:42 2016 +0300

    smbd: use owner uid for free disk calculation if owner is inherited
    
    If "inherit owner" is enabled, then new files created under a
    directory shall consume the quota of the directory's owner, so
    the free disk calculation should take that quota into account,
    not the quota of the user creating the file.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (backported from commit ea73bcd87b6113f77ccda683d15b5a39003b8eaa)

commit 55d057deecdd82800f63a9948c04ead3ad515600
Author: Uri Simchoni <uri at samba.org>
Date:   Thu Jan 14 00:09:36 2016 +0200

    smbd: get a valid file stat to disk_quotas
    
    Most calls to disk_quotas originate at a state with an
    open file descriptor. Pass the file's stat info down to
    disk_quota, so that we can avoid extra stat's and the related
    error handling.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit bd2ec88dca692c239397891bd35c9fa6b8e7b51a)

commit 97863e807871721120cdbdf55b1ad8a81b6c05b4
Author: Uri Simchoni <uri at samba.org>
Date:   Wed Jan 27 08:12:20 2016 +0200

    quotas: small cleanup
    
    Remove an internal function from proto.h
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 3e6ea02d4258a782482eee9f9124c6a39b74a965)

commit 811fd8bbdb4ae424c3b43d8498946312434ce3b2
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Aug 10 14:42:07 2016 -0700

    s3: oplock: Fix race condition when closing an oplocked file.
    
    We must send the 'oplock released' message whilst the lock
    is held in the close path. Otherwise the messaged smbd can
    race with the share mode delete.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit df83b17c60a08a27a7ddd1d88dc125e15b3ee06d)

commit a36549c88dbf566c07a71ce23e0cbaafa1661248
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Aug 10 14:39:52 2016 -0700

    smbd: oplock: Factor out internals of remove_oplock() into new remove_oplock_under_lock().
    
    Allows this to be called elsewhere.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit cb394abe5206dd8ad8a68f157427991b259129a7)

commit 5fa05ec5991d91f63d779d2c186ddbab68efa15f
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Aug 10 14:35:42 2016 -0700

    smbd: oplock: Fixup debug messages inside remove_oplock().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit de7180151fc99893c4763882fecd9d2a623cd061)

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

Summary of changes:
 ctdb/client/ctdb_client.c                    |  18 ++-
 ctdb/common/common.h                         |   3 +-
 ctdb/common/system_aix.c                     |  13 ++-
 ctdb/common/system_freebsd.c                 |  12 +-
 ctdb/common/system_gnu.c                     |  18 +--
 ctdb/common/system_kfreebsd.c                |  18 +--
 ctdb/common/system_linux.c                   |  25 +++--
 ctdb/doc/ctdb.1.xml                          |  13 ++-
 ctdb/ib/ibwrapper.c                          |  20 ++--
 ctdb/include/ctdb_private.h                  |   5 +-
 ctdb/server/ctdb_daemon.c                    |  23 +++-
 ctdb/server/ctdb_logging_syslog.c            |   8 +-
 ctdb/server/ctdb_ltdb_server.c               |   2 +-
 ctdb/server/ctdb_monitor.c                   |   2 +-
 ctdb/server/ctdb_recovery_helper.c           |   6 +-
 ctdb/server/ctdb_takeover.c                  | 160 ++++++++++++++++-----------
 ctdb/server/eventscript.c                    |   8 ++
 ctdb/tcp/tcp_connect.c                       |  29 ++++-
 ctdb/tests/cunit/porting_tests_001.sh        |   9 +-
 ctdb/tests/scripts/integration.bash          |  18 +--
 ctdb/tests/simple/16_ctdb_config_add_ip.sh   |   1 +
 ctdb/tests/simple/60_recoverd_missing_ip.sh  |   1 +
 ctdb/tests/simple/scripts/local_daemons.bash | 104 +++++++----------
 ctdb/tools/ctdb.c                            |  79 +------------
 ctdb/utils/pmda/pmda_ctdb.c                  |   3 +-
 lib/ldb/tools/ldbdump.c                      |   3 +
 lib/ldb/tools/ldbutil.h                      |   2 +-
 lib/talloc/talloc.c                          |   8 +-
 lib/tdb/tools/tdbdump.c                      |   3 +
 lib/util/dprintf.c                           |   3 +
 lib/util/talloc_report.c                     |  14 ++-
 libgpo/gpo_fetch.c                           |   2 +-
 selftest/knownfail                           |   4 +
 selftest/target/Samba3.pm                    |  21 +++-
 source3/include/proto.h                      |  11 +-
 source3/include/smb_macros.h                 |   8 ++
 source3/include/tldap_util.h                 |   7 +-
 source3/lib/cbuf.h                           |   2 +-
 source3/lib/netapi/netapi_private.h          |   4 +-
 source3/lib/util_str.c                       |  59 ----------
 source3/lib/util_tdb.c                       |   5 +-
 source3/libnet/libnet_join.c                 |  14 ++-
 source3/libnet/libnet_samsync_ldif.c         |   3 +
 source3/libsmb/cliconnect.c                  |   6 +-
 source3/modules/vfs_ceph.c                   |   5 +-
 source3/modules/vfs_default.c                |   5 +-
 source3/passdb/pdb_samba_dsdb.c              |  27 ++++-
 source3/script/tests/test_dfree_quota.sh     |  84 +++++++++-----
 source3/selftest/tests.py                    |   3 +-
 source3/smbd/close.c                         |  10 +-
 source3/smbd/dfree.c                         |  16 ++-
 source3/smbd/oplock.c                        |  54 +++++----
 source3/smbd/proto.h                         |  17 ++-
 source3/smbd/quotas.c                        |  55 ++++++---
 source3/smbd/reply.c                         |  13 ++-
 source3/smbd/smb2_glue.c                     |  16 +++
 source3/smbd/smb2_ioctl_network_fs.c         |   4 +-
 source3/smbd/trans2.c                        |  12 +-
 source3/smbd/vfs.c                           |   4 +-
 source3/torture/t_strappend.c                |  49 --------
 source3/torture/torture.c                    |   1 -
 source3/utils/regedit.c                      |   2 +-
 source3/utils/regedit_dialog.c               |   6 +
 source3/utils/regedit_dialog.h               |  18 ++-
 source3/winbindd/idmap_tdb2.c                |   4 +
 source3/winbindd/idmap_util.c                |   5 -
 source3/winbindd/winbindd_dual_srv.c         |   4 +
 source3/wscript_build                        |   1 -
 source4/torture/dns/dlz_bind9.c              |   3 +
 source4/torture/smb2/getinfo.c               |  45 ++++++++
 source4/torture/smb2/ioctl.c                 | 116 ++++++++++++++-----
 source4/torture/smb2/read.c                  |  96 +++++++++++++---
 source4/torture/smb2/util.c                  |  63 +++++++++--
 73 files changed, 925 insertions(+), 590 deletions(-)
 delete mode 100644 source3/torture/t_strappend.c


Changeset truncated at 500 lines:

diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index bad38b6..1661d2a 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -276,6 +276,7 @@ done:
 int ctdb_socket_connect(struct ctdb_context *ctdb)
 {
 	struct sockaddr_un addr;
+	int ret;
 
 	memset(&addr, 0, sizeof(addr));
 	addr.sun_family = AF_UNIX;
@@ -288,13 +289,26 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
 	}
 
 	if (connect(ctdb->daemon.sd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
+		DEBUG(DEBUG_ERR,
+		      (__location__
+		       "Failed to connect client socket to daemon (%s)\n",
+		       strerror(errno)));
+		close(ctdb->daemon.sd);
+		ctdb->daemon.sd = -1;
+		return -1;
+	}
+
+	ret = set_blocking(ctdb->daemon.sd, false);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,
+		      (__location__
+		       " failed to set socket non-blocking (%s)\n",
+		       strerror(errno)));
 		close(ctdb->daemon.sd);
 		ctdb->daemon.sd = -1;
-		DEBUG(DEBUG_ERR,(__location__ " Failed to connect client socket to daemon. Errno:%s(%d)\n", strerror(errno), errno));
 		return -1;
 	}
 
-	set_blocking(ctdb->daemon.sd, false);
 	set_close_on_exec(ctdb->daemon.sd);
 
 	ctdb->daemon.queue = ctdb_queue_setup(ctdb, ctdb, ctdb->daemon.sd, 
diff --git a/ctdb/common/common.h b/ctdb/common/common.h
index b89a84c..113816d 100644
--- a/ctdb/common/common.h
+++ b/ctdb/common/common.h
@@ -76,7 +76,8 @@ int ctdb_fetch_with_header_func(struct ctdb_call_info *call);
 
 const char *ctdb_errstr(struct ctdb_context *ctdb);
 
-void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...);
+void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...)
+		    PRINTF_ATTRIBUTE(2,3);
 
 void ctdb_fatal(struct ctdb_context *ctdb, const char *msg);
 
diff --git a/ctdb/common/system_aix.c b/ctdb/common/system_aix.c
index 48cd781..e44d1d6 100644
--- a/ctdb/common/system_aix.c
+++ b/ctdb/common/system_aix.c
@@ -118,7 +118,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		struct ip ip;
 		struct tcphdr tcp;
 	} ip4pkt;
-
+	int saved_errno;
 
 	/* for now, we only handle AF_INET addresses */
 	if (src->ip.sin_family != AF_INET || dest->ip.sin_family != AF_INET) {
@@ -143,9 +143,6 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		return -1;
 	}
 
-	set_blocking(s, false);
-	set_close_on_exec(s);
-
 	memset(&ip4pkt, 0, sizeof(ip4pkt));
 	ip4pkt.ip.ip_v     = 4;
 	ip4pkt.ip.ip_hl    = sizeof(ip4pkt.ip)/4;
@@ -168,9 +165,13 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 	ip4pkt.tcp.th_win   = htons(1234);
 	ip4pkt.tcp.th_sum    = tcp_checksum((uint16_t *)&ip4pkt.tcp, sizeof(ip4pkt.tcp), &ip4pkt.ip);
 
-	ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0, (struct sockaddr *)dest, sizeof(*dest));
+	ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
+		     (struct sockaddr *)dest, sizeof(*dest));
+	saved_errno = errno;
+	close(s);
 	if (ret != sizeof(ip4pkt)) {
-		DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+		DEBUG(DEBUG_ERR,
+		      ("Failed sendto (%s)\n", strerror(saved_errno)));
 		return -1;
 	}
 
diff --git a/ctdb/common/system_freebsd.c b/ctdb/common/system_freebsd.c
index a03b97a..e72fbbd 100644
--- a/ctdb/common/system_freebsd.c
+++ b/ctdb/common/system_freebsd.c
@@ -137,6 +137,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		struct ip6_hdr ip6;
 		struct tcphdr tcp;
 	} ip6pkt;
+	int saved_errno;
 
 	switch (src->ip.sin_family) {
 	case AF_INET:
@@ -180,15 +181,14 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 			return -1;
 		}
 
-		set_blocking(s, false);
-		set_close_on_exec(s);
-
 		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
 			     (const struct sockaddr *)&dest->ip,
 			     sizeof(dest->ip));
+		saved_errno = errno;
 		close(s);
 		if (ret != sizeof(ip4pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
@@ -231,11 +231,13 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
 			     (const struct sockaddr *)&dest->ip6,
 			     sizeof(dest->ip6));
+		saved_errno = errno;
 		tmpdest->ip6.sin6_port = tmpport;
 		close(s);
 
 		if (ret != sizeof(ip6pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
diff --git a/ctdb/common/system_gnu.c b/ctdb/common/system_gnu.c
index 09c4ffe..603345d 100644
--- a/ctdb/common/system_gnu.c
+++ b/ctdb/common/system_gnu.c
@@ -136,6 +136,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		struct ip6_hdr ip6;
 		struct tcphdr tcp;
 	} ip6pkt;
+	int saved_errno;
 
 	switch (src->ip.sin_family) {
 	case AF_INET:
@@ -178,13 +179,13 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 			return -1;
 		}
 
-		set_blocking(s, false);
-		set_close_on_exec(s);
-
-		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0, &dest->ip, sizeof(dest->ip));
+		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
+			     &dest->ip, sizeof(dest->ip));
+		saved_errno = errno;
 		close(s);
 		if (ret != sizeof(ip4pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
@@ -223,12 +224,15 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		tmpport = tmpdest->ip6.sin6_port;
 
 		tmpdest->ip6.sin6_port = 0;
-		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0, &dest->ip6, sizeof(dest->ip6));
+		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
+			     &dest->ip6, sizeof(dest->ip6));
+		saved_errno = errno;
 		tmpdest->ip6.sin6_port = tmpport;
 		close(s);
 
 		if (ret != sizeof(ip6pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
diff --git a/ctdb/common/system_kfreebsd.c b/ctdb/common/system_kfreebsd.c
index 56f7c1c..7e33990 100644
--- a/ctdb/common/system_kfreebsd.c
+++ b/ctdb/common/system_kfreebsd.c
@@ -136,6 +136,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		struct ip6_hdr ip6;
 		struct tcphdr tcp;
 	} ip6pkt;
+	int saved_errno;
 
 	switch (src->ip.sin_family) {
 	case AF_INET:
@@ -178,13 +179,13 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 			return -1;
 		}
 
-		set_blocking(s, false);
-		set_close_on_exec(s);
-
-		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0, &dest->ip, sizeof(dest->ip));
+		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
+			     &dest->ip, sizeof(dest->ip));
+		saved_errno = errno;
 		close(s);
 		if (ret != sizeof(ip4pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
@@ -223,12 +224,15 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		tmpport = tmpdest->ip6.sin6_port;
 
 		tmpdest->ip6.sin6_port = 0;
-		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0, &dest->ip6, sizeof(dest->ip6));
+		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
+			     &dest->ip6, sizeof(dest->ip6));
+		saved_errno = errno;
 		tmpdest->ip6.sin6_port = tmpport;
 		close(s);
 
 		if (ret != sizeof(ip6pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c
index b66ce67..3647de9 100644
--- a/ctdb/common/system_linux.c
+++ b/ctdb/common/system_linux.c
@@ -344,6 +344,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		struct ip6_hdr ip6;
 		struct tcphdr tcp;
 	} ip6pkt;
+	int saved_errno;
 
 	switch (src->ip.sin_family) {
 	case AF_INET:
@@ -386,15 +387,14 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 			return -1;
 		}
 
-		set_blocking(s, false);
-		set_close_on_exec(s);
-
 		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
 			     (const struct sockaddr *)&dest->ip,
 			     sizeof(dest->ip));
+		saved_errno = errno;
 		close(s);
 		if (ret != sizeof(ip4pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
@@ -436,11 +436,13 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
 			     (const struct sockaddr *)&dest->ip6,
 			     sizeof(dest->ip6));
+		saved_errno = errno;
 		tmpdest->ip6.sin6_port = tmpport;
 		close(s);
 
 		if (ret != sizeof(ip6pkt)) {
-			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
+			DEBUG(DEBUG_ERR,
+			      ("Failed sendto (%s)\n", strerror(saved_errno)));
 			return -1;
 		}
 		break;
@@ -458,7 +460,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
  */
 int ctdb_sys_open_capture_socket(const char *iface, void **private_data)
 {
-	int s;
+	int s, ret;
 
 	/* Open a socket to capture all traffic */
 	s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
@@ -469,7 +471,16 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data)
 
 	DEBUG(DEBUG_DEBUG, (__location__ " Created RAW SOCKET FD:%d for tcp tickle\n", s));
 
-	set_blocking(s, false);
+	ret = set_blocking(s, false);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,
+		      (__location__
+		       " failed to set socket non-blocking (%s)\n",
+		       strerror(errno)));
+		close(s);
+		return -1;
+	}
+
 	set_close_on_exec(s);
 
 	return s;
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 9324813..d295213 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -1031,13 +1031,16 @@ DB Statistics: locking.tdb
     <refsect2>
       <title>addip <parameter>IPADDR</parameter>/<parameter>mask</parameter> <parameter>IFACE</parameter></title>
       <para>
-	This command is used to add a new public ip to a node during runtime.
-	This allows public addresses to be added to a cluster without having
-	to restart the ctdb daemons.
+	This command is used to add a new public ip to a node
+	during runtime.  It should be followed by a <command>ctdb
+	ipreallocate</command>.  This allows public addresses to be
+	added to a cluster without having to restart the ctdb daemons.
       </para>
       <para>
-	Note that this only updates the runtime instance of ctdb. Any changes will be lost next time ctdb is restarted and the public addresses file is re-read.
-	If you want this change to be permanent you must also update the public addresses file manually.
+	Note that this only updates the runtime instance of ctdb. Any
+	changes will be lost next time ctdb is restarted and the public
+	addresses file is re-read.  If you want this change to be
+	permanent you must also update the public addresses file manually.
       </para>
     </refsect2>
 
diff --git a/ctdb/ib/ibwrapper.c b/ctdb/ib/ibwrapper.c
index b10aaf5..f7334b5 100644
--- a/ctdb/ib/ibwrapper.c
+++ b/ctdb/ib/ibwrapper.c
@@ -340,7 +340,7 @@ static int ibw_refill_cq_recv(struct ibw_conn *conn)
 	rc = ibv_post_recv(pconn->cm_id->qp, &wr, &bad_wr);
 	if (rc) {
 		sprintf(ibw_lasterr, "refill/ibv_post_recv failed with %d\n", rc);
-		DEBUG(DEBUG_ERR, (ibw_lasterr));
+		DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 		return -2;
 	}
 
@@ -374,7 +374,7 @@ static int ibw_fill_cq(struct ibw_conn *conn)
 		rc = ibv_post_recv(pconn->cm_id->qp, &wr, &bad_wr);
 		if (rc) {
 			sprintf(ibw_lasterr, "fill/ibv_post_recv failed with %d\n", rc);
-			DEBUG(DEBUG_ERR, (ibw_lasterr));
+			DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 			return -2;
 		}
 	}
@@ -651,7 +651,7 @@ static void ibw_event_handler_verbs(struct tevent_context *ev,
 error:
 	ibv_ack_cq_events(pconn->cq, 1);
 
-	DEBUG(DEBUG_ERR, (ibw_lasterr));
+	DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 	
 	if (conn->state!=IBWC_ERROR) {
 		conn->state = IBWC_ERROR;
@@ -991,7 +991,7 @@ struct ibw_ctx *ibw_init(struct ibw_initattr *attr, int nattr,
 	return ctx;
 	/* don't put code here */
 cleanup:
-	DEBUG(DEBUG_ERR, (ibw_lasterr));
+	DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 
 	if (ctx)
 		talloc_free(ctx);
@@ -1029,7 +1029,7 @@ int ibw_bind(struct ibw_ctx *ctx, struct sockaddr_in *my_addr)
 	rc = rdma_bind_addr(pctx->cm_id, (struct sockaddr *) my_addr);
 	if (rc) {
 		sprintf(ibw_lasterr, "rdma_bind_addr error %d\n", rc);
-		DEBUG(DEBUG_ERR, (ibw_lasterr));
+		DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 		return rc;
 	}
 	DEBUG(DEBUG_DEBUG, ("rdma_bind_addr successful\n"));
@@ -1046,7 +1046,7 @@ int ibw_listen(struct ibw_ctx *ctx, int backlog)
 	rc = rdma_listen(pctx->cm_id, backlog);
 	if (rc) {
 		sprintf(ibw_lasterr, "rdma_listen failed: %d\n", rc);
-		DEBUG(DEBUG_ERR, (ibw_lasterr));
+		DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 		return rc;
 	}
 
@@ -1068,7 +1068,7 @@ int ibw_accept(struct ibw_ctx *ctx, struct ibw_conn *conn, void *conn_userdata)
 	rc = rdma_accept(pconn->cm_id, &conn_param);
 	if (rc) {
 		sprintf(ibw_lasterr, "rdma_accept failed %d\n", rc);
-		DEBUG(DEBUG_ERR, (ibw_lasterr));
+		DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 		return -1;;
 	}
 
@@ -1115,7 +1115,7 @@ int ibw_connect(struct ibw_conn *conn, struct sockaddr_in *serv_addr, void *conn
 	rc = rdma_resolve_addr(pconn->cm_id, NULL, (struct sockaddr *) serv_addr, 2000);
 	if (rc) {
 		sprintf(ibw_lasterr, "rdma_resolve_addr error %d\n", rc);
-		DEBUG(DEBUG_ERR, (ibw_lasterr));
+		DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 		talloc_free(conn);
 		return -1;
 	}
@@ -1142,7 +1142,7 @@ int ibw_disconnect(struct ibw_conn *conn)
 		rc = rdma_disconnect(pconn->cm_id);
 		if (rc) {
 			sprintf(ibw_lasterr, "ibw_disconnect failed with %d\n", rc);
-			DEBUG(DEBUG_ERR, (ibw_lasterr));
+			DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 			return rc;
 		}
 		break;
@@ -1280,7 +1280,7 @@ static int ibw_send_packet(struct ibw_conn *conn, void *buf, struct ibw_wr *p, u
 
 	return 0;
 error:
-	DEBUG(DEBUG_ERR, (ibw_lasterr));
+	DEBUG(DEBUG_ERR, ("%s", ibw_lasterr));
 	return -1;
 }
 
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index cf30efd..532ae0a 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -601,11 +601,12 @@ int ctdb_control_getnodesfile(struct ctdb_context *ctdb, uint32_t opcode,
 void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code);
 
 int switch_from_server_to_client(struct ctdb_context *ctdb,
-				 const char *fmt, ...);
+				 const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 /* From server/ctdb_fork.c */
 
-void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
+void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt,
+			 ...) PRINTF_ATTRIBUTE(2,3);
 
 void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
 
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 267d899..47e49df 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -930,6 +930,7 @@ static void ctdb_accept_client(struct tevent_context *ev,
 	struct ctdb_client *client;
 	struct ctdb_client_pid_list *client_pid;
 	pid_t peer_pid = 0;
+	int ret;
 
 	memset(&addr, 0, sizeof(addr));
 	len = sizeof(addr);
@@ -938,7 +939,16 @@ static void ctdb_accept_client(struct tevent_context *ev,
 		return;
 	}
 
-	set_blocking(fd, false);
+	ret = set_blocking(fd, false);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,
+		      (__location__
+		       " failed to set socket non-blocking (%s)\n",
+		       strerror(errno)));
+		close(fd);
+		return;
+	}
+
 	set_close_on_exec(fd);
 
 	DEBUG(DEBUG_DEBUG,(__location__ " Created SOCKET FD:%d to connected child\n", fd));
@@ -984,6 +994,7 @@ static void ctdb_accept_client(struct tevent_context *ev,
 static int ux_socket_bind(struct ctdb_context *ctdb)
 {
 	struct sockaddr_un addr;
+	int ret;
 
 	ctdb->daemon.sd = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (ctdb->daemon.sd == -1) {
@@ -1007,7 +1018,15 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
 	unlink(ctdb->daemon.name);
 
 	set_close_on_exec(ctdb->daemon.sd);
-	set_blocking(ctdb->daemon.sd, false);
+
+	ret = set_blocking(ctdb->daemon.sd, false);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,
+		      (__location__
+		       " failed to set socket non-blocking (%s)\n",
+		       strerror(errno)));


-- 
Samba Shared Repository



More information about the samba-cvs mailing list