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

Stefan Metzmacher metze at samba.org
Thu Sep 1 11:24:08 UTC 2016


The branch, v4-5-stable has been updated
       via  d7258cb VERSION: Disable git snapshots for the 4.5.0rc3 release.
       via  4422790 WHATSNEW: Release notes for Samba 4.5.0rc3.
       via  6f9876a tests/getnc_exop: Ensure that attribute list sorting is correct
       via  6600a47 getncchanges: Compute the partial attribute set from the remote schema
       via  b1858ad tests/getnc_exop: PartialAttrSetEx test (passes Windows, fails us)
       via  2dde964 tests/getnc_exop: Ensure the remote prefixmap is always used (name attr)
       via  90581ae tests/getnc_exop: Ensure the remote prefixmap is always used (secret attrs)
       via  eff99ba tests/getnc_exop: Ensure that all attids are valid in a given PAS
       via  4c25f82 tests/getnc_exop: Ensure we do the fallback if not given a PAS
       via  a57ec81 drepl_out: Send the prefix map alongside the global catalog partial attribute set
       via  06cd31c drepl_out: Send the prefix map alongside the RODC partial attribute set
       via  d107915 replicated_objects: Add missing newline for debug
       via  7d24cd2 getncchanges: Fix some whitespace
       via  92ada9f tests/schemainfo: run dsdb schema info tests with proper URI
       via  205d5f0 Removed upgrading-samba4.txt
       via  0f63ac0 Added Wiki link to replPropertyMetaData Changes section
       via  6c6fb45 s3-util: Fix asking for username and password in smbget.
       via  372fb30 s3: vfs: Fix compilation error on Solaris.
       via  3157af9 vfs_shadow_copy: handle non-existant files and wildcards
       via  8f535d5 selftest: test listing directories inside snapshots
       via  bbc351a selftest: check file readability in shadow_copy2 test
       via  44616ab selftest: add content to files created during shadow_copy2 test
       via  9bbc84a s2-selftest: run shadow_copy2 test both in NT1 and SMB3 modes
       via  8328861 s3: libsmb: Add the capability to find a @GMT- path in an SMB2 create and transform to a timewarp token.
       via  a22c296 s3: libsmb: Plumb new SMB2 shadow copy call into cli_shadow_copy_data().
       via  4dba637 s3: libsmb: Add cli_smb2_shadow_copy_data() function that gets shadow copy info over SMB2.
       via  8c0b554 s3: libsmb: Add return args to clistr_is_previous_version_path().
       via  b755e66 s3: libsmb: Correctly align create contexts in a create call.
       via  38baf4b s3: smbclient. Ensure we don't crash by freeing uninitialized *snapshots.
       via  b5bb91a s3: smbclient: In order to get shadow copy data over SMB1 we must call cli_shadow_copy_data() twice.
       via  bab467d s3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv().
       via  8d7f69d s3: libsmb: Correctly set max_setup_size in FSCTL_GET_SHADOW_COPY_DATA nttrans ioctl.
       via  1d59274 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_list_trans_send().
       via  8256656 s3: libsmb: Make a comment note that cli_set_ea() needs some internal changes before cli_set_ea_path() can use previous path versions.
       via  48550cc s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ctemp_send().
       via  4200c31 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_chkpath_send().
       via  bff4980 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setatr_send().
       via  4276ffb s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send().
       via  ce5acbf s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().
       via  c98a801 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_nttrans_create_send().
       via  e702d6a s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send().
       via  30c97b3 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rmdir_send()
       via  028f181 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir_send().
       via  a271db6 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_unlink_send().
       via  663c35d s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntrename_internal_send().
       via  fe2f658 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rename_send().
       via  87a1a1a s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_qpathinfo_send()
       via  f570cda s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setpathinfo_send().
       via  6f1ae6a s3: libsmb: Add clistr_is_previous_version_path()
       via  c74aa87 s3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create().
       via  050673d s3: libsmb: Add uint16_t addtional_flags2 to cli_trans_send().
       via  ac64b26 s3: libsmb: Add uint16_t additional_flags2 arg to cli_smb_send().
       via  cccf74e s3: SMB1: Add missing FLAGS2 definitions from MS-SMB.
       via  598327a s3: vfs: snapper: Fix snapper_gmt_strip_snapshot() function to strip @GMT token identically to shadow_copy2.c:shadow_copy2_strip_snapshot()
       via  b4a05b1 s3: vfs: snapper: Add and use len_before_gmt, calculated as (p-name).
       via  e5baf88 s3: vfs: shadow_copy2: Replace all uses of (p-name) with len_before_gmt.
       via  4b26677 s3: vfs: shadow_copy2. Remove any trailing slash when stripping @GMT-YYYY... from the end of a path.
       via  1901c9e s3: vfs: shadow_copy2: Re-use an existing variable already set to the right value (p - name).
       via  ad835cf smbd: Fix snapshot query on shares with DFS enabled
       via  74fa37a KCC: Fix misnamed variable in DSA object
       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().
       via  edc2eb2 WHATSNEW.txt: Added more details about multiple DNS forwarders
       via  ac2b4cb script/autobuild.py: include the branch name in the output
       via  4f41b69 selftest/flapping: add some samba3.blackbox.smbclient_s3 tests
       via  4c452a7 selftest: Move repl_schema test to a distinct OID prefix
       via  fdbefe5 s4:dsdb/repl_meta_data: Add more info on which DN we failed to find an attid on
       via  1b01340 s4:dsdb/repl: let dsdb_replicated_objects_convert() change remote to local attid for linked attributes
       via  bfb5258 s4:dsdb/repl: set working_schema->resolving_in_progress during schema creation
       via  f7cf3c7 s4:dsdb/schema: move messages for unknown attids to higher debug levels during resolving
       via  67b678f s4:dsdb/schema: split out a dsdb_attribute_drsuapi_remote_to_local() function
       via  9f3ff9e s4:dsdb/schema: don't update the in memory schema->prefixmap without reloading the schema!
       via  e895b77 s4:dsdb/schema: avoid an implicit prefix map creation in lookup functions
       via  5902a36 s4:dsdb/objectclass_attrs: call dsdb_attribute_from_ldb() without a prefixmap
       via  6143e5e s4:dsdb/repl: make sure the working_schema prefix map is populated with the remote prefix map
       via  d5fd8de s4:dsdb/schema: make dsdb_schema_pfm_add_entry() public and more useful
       via  2c2a837 s4:dsdb/schema: Remove unused old schema from memory
       via  c84842a s4:dsdb/repl: Improve memory handling in replicated schema code
       via  137a40b s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
       via  118b76c s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
       via  5925277 s4:dsdb/repl: avoid recursion after fetching schema changes.
       via  adf2ca1 s4:dsdb/schema: don't change schema->schema_info on originating schema changes.
       via  252a0ca s4: repl: Ensure all error paths in dreplsrv_op_pull_source_get_changes_trigger() are protected with tevent returns.
       via  8c8588b selftest: Merge alternate error codes into backupkey from backupkey_heimdal
       via  315abf8 torture/backupkey: Allow WERR_INVALID_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA
       via  732b5a7 tests:blackbox: let samba_dnsupdate.py provide more details
       via  f29471f script/autobuild.py: check for AUTOBUILD_SKIP_SAMBA_O3 environment variable
       via  f3e8789 tests:samba_tool: make use of assertCmdFail() in gpo.py
       via  cbc6ba0 tests:samba_tool: pass stdout and stderr to assertCmdSuccess()
       via  76958a6 samba-tool/ldapcmp: ignore differences of whenChanged
       via  3e25b21 VERSION: Bump version up to 4.5.0rc3...
      from  30d823e VERSION: Disable git snapshots for the 4.5.0rc2 release.

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


- Log -----------------------------------------------------------------
commit d7258cb7c4a7f992e9fcd67525c04684775ae8c7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Aug 29 08:17:12 2016 +0200

    VERSION: Disable git snapshots for the 4.5.0rc3 release.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 4422790140e5959347d7847681e8190f0d777806
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Aug 29 07:34:01 2016 +0200

    WHATSNEW: Release notes for Samba 4.5.0rc3.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 6f9876a7162728e201c9626792f779e8e9f5c7c5
Author: Bob Campbell <bobcampbell at catalyst.net.nz>
Date:   Mon Aug 22 14:43:41 2016 +1200

    tests/getnc_exop: Ensure that attribute list sorting is correct
    
    With a binary search, this can only be tested on 3+ elements.
    
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>
    
    Signed-off-by: Bob Campbell <bobcampbell at catalyst.net.nz>
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Garming Sam <garming at samba.org>
    Autobuild-Date(master): Thu Aug 25 14:22:25 CEST 2016 on sn-devel-144
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit cb243d86d892cb148d01dd87f29f86f3e2c1ebd0)

commit 6600a47dbe6716ec4b57fd8ccc73cf1f05555dc1
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Mon Aug 15 14:10:38 2016 +1200

    getncchanges: Compute the partial attribute set from the remote schema
    
    This doesn't fix the partialAttrSetEx case, so the test is left in the
    knownfail file.
    
    Signed-off-by: Bob Campbell <bobcampbell at catalyst.net.nz>
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 1a96f9329e718acac195e75a5156b1c147ad54ff)

commit b1858ad77e3d1a973533f8b98486289cc7b4ebb3
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Aug 18 15:20:06 2016 +1200

    tests/getnc_exop: PartialAttrSetEx test (passes Windows, fails us)
    
    This has an odd behaviour where PartialAttrSetEx does not respect the
    incoming mapping. PartialAttrSetEx is not respected in Samba at all.
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 36df826154ed90e92f877e6f36269893c44a2a16)

commit 2dde9644ee7b40e8ec751cb7641fb4c4ec4cfb7a
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Aug 17 16:36:58 2016 +1200

    tests/getnc_exop: Ensure the remote prefixmap is always used (name attr)
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit e495d1b2ed9aca45ce696dd8cc54458002ca0c3a)

commit 90581ae1445dc8e57b81da75ac9c03ee7b720aac
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Aug 17 16:04:49 2016 +1200

    tests/getnc_exop: Ensure the remote prefixmap is always used (secret attrs)
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 1f4ea1686ff1575406b5e8e488feb7b900db12ef)

commit eff99ba7f9d61987580d8c35084ea3e4d9aed503
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Aug 17 14:26:55 2016 +1200

    tests/getnc_exop: Ensure that all attids are valid in a given PAS
    
    On Windows this does not seem to fail, but causes silent errors.
    
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Bob Campbell <bobcampbell at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 7f3ef150751452411db1e0c5b2ca6d8af2769d5c)

commit 4c25f82c7eb36cd06ae3367210859486ae45efdd
Author: Bob Campbell <bobcampbell at catalyst.net.nz>
Date:   Mon Aug 15 16:19:09 2016 +1200

    tests/getnc_exop: Ensure we do the fallback if not given a PAS
    
    This will cause silent errors in the translation, but as far as we know,
    Windows will accept it just fine.
    
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Bob Campbell <bobcampbell at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 1673590e8ec3001c6909a78e004f64433060a624)

commit a57ec81913fdd8aea64fc945c6cb3920519f89ad
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Aug 18 13:18:28 2016 +1200

    drepl_out: Send the prefix map alongside the global catalog partial attribute set
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 0ea126c63c1d5a0081b90a914c9ad7227cf7b748)

commit 06cd31c26676c5d9e84d81a8e1b2f921f78a0d15
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Aug 11 14:28:27 2016 +1200

    drepl_out: Send the prefix map alongside the RODC partial attribute set
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 317bbc4d0528dca03d94d61c38b038d314f8cad8)

commit d107915197c8465b7a5455b5fa0568e696f803e0
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Tue Aug 16 10:53:39 2016 +1200

    replicated_objects: Add missing newline for debug
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 216c0319c744c39848ae5da7d15dccb6769ea20a)

commit 7d24cd2d215c3ed2c14ae017d37d8133cc1017ff
Author: Bob Campbell <bobcampbell at catalyst.net.nz>
Date:   Mon Aug 15 16:19:20 2016 +1200

    getncchanges: Fix some whitespace
    
    Pair-programmed-with: Garming Sam <garming at catalyst.net.nz>
    
    Signed-off-by: Bob Campbell <bobcampbell at catalyst.net.nz>
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit 9563dab562cb2dfe4c226f03156bec0bf6eef847)

commit 92ada9f3c359a1c93cf3c80f567ca9660d384f7c
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Aug 25 11:33:16 2016 +1200

    tests/schemainfo: run dsdb schema info tests with proper URI
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187
    
    (cherry picked from commit fd49b44e0296348c835168f336297fd969e63c50)

commit 205d5f0c66348ffee3a0db7b463e82c891ef1891
Author: Marc Muehlfeld <mmuehlfeld at samba.org>
Date:   Fri Aug 26 13:42:15 2016 +0200

    Removed upgrading-samba4.txt
    
    This file was about updating early Samba AD alpha versions.
    
    We describe all important things related to the update process in the Wiki:
    https://wiki.samba.org/index.php/Updating_Samba
    
    Signed-off-by: Marc Muehlfeld <mmuehlfeld at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Mon Aug 29 03:28:11 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 38696630552d449ec3c8e1fbdf6fb8212a96d2c9)

commit 0f63ac06bac965d396a9b485cd7798e5f01748e8
Author: Marc Muehlfeld <mmuehlfeld at samba.org>
Date:   Fri Aug 26 14:16:37 2016 +0200

    Added Wiki link to replPropertyMetaData Changes section
    
    In the Wiki we give more details and describe what the user needs to
    do to fix the attributes.
    
    Signed-off-by: Marc Muehlfeld <mmuehlfeld at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

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

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       |  85 ++++-
 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 +-
 libcli/smb/smb2cli_create.c                        |   1 +
 libcli/smb/smb_constants.h                         |   2 +
 libgpo/gpo_fetch.c                                 |   2 +-
 python/samba/kcc/kcc_utils.py                      |   2 +-
 python/samba/netcmd/ldapcmp.py                     |   2 +-
 python/samba/tests/blackbox/samba_dnsupdate.py     |   8 +-
 python/samba/tests/samba_tool/base.py              |   5 +-
 python/samba/tests/samba_tool/fsmo.py              |   2 +-
 python/samba/tests/samba_tool/gpo.py               |  16 +-
 python/samba/tests/samba_tool/group.py             |  10 +-
 python/samba/tests/samba_tool/ntacl.py             |  24 +-
 python/samba/tests/samba_tool/processes.py         |   4 +-
 python/samba/tests/samba_tool/rodc.py              |  14 +-
 python/samba/tests/samba_tool/sites.py             |   4 +-
 python/samba/tests/samba_tool/timecmd.py           |   2 +-
 python/samba/tests/samba_tool/user.py              |  32 +-
 .../tests/samba_tool/user_check_password_script.py |   8 +-
 script/autobuild.py                                |  13 +-
 selftest/flapping                                  |   2 +
 selftest/knownfail                                 |   5 +
 selftest/target/Samba3.pm                          |  21 +-
 source3/client/client.c                            |  16 +-
 source3/include/async_smb.h                        |   5 +-
 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/async_smb.c                         |   4 +-
 source3/libsmb/cli_smb2_fnum.c                     | 274 +++++++++++++++-
 source3/libsmb/cli_smb2_fnum.h                     |   6 +
 source3/libsmb/cliconnect.c                        |  26 +-
 source3/libsmb/clientgen.c                         |   2 +-
 source3/libsmb/clifile.c                           | 194 +++++++++--
 source3/libsmb/clifsinfo.c                         |   7 +-
 source3/libsmb/clilist.c                           |  21 +-
 source3/libsmb/climessage.c                        |   6 +-
 source3/libsmb/clioplock.c                         |   2 +-
 source3/libsmb/clireadwrite.c                      |   4 +-
 source3/libsmb/clistr.c                            |  43 +++
 source3/libsmb/clisymlink.c                        |   4 +-
 source3/libsmb/clitrans.c                          |   3 +-
 source3/libsmb/proto.h                             |   6 +-
 source3/modules/vfs_ceph.c                         |   5 +-
 source3/modules/vfs_default.c                      |   5 +-
 source3/modules/vfs_shadow_copy2.c                 |  47 ++-
 source3/modules/vfs_snapper.c                      |  30 +-
 source3/modules/vfs_solarisacl.c                   |   2 +-
 source3/passdb/pdb_samba_dsdb.c                    |  27 +-
 source3/script/tests/test_dfree_quota.sh           |  84 +++--
 source3/script/tests/test_shadow_copy.sh           | 102 ++++--
 source3/selftest/tests.py                          |   6 +-
 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_create.c                         |   6 +-
 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/utils/smbget.c                             |  26 +-
 source3/winbindd/idmap_tdb2.c                      |   4 +
 source3/winbindd/idmap_util.c                      |   5 -
 source3/winbindd/winbindd_dual_srv.c               |   4 +
 source3/wscript_build                              |   1 -
 source4/dsdb/repl/drepl_out_helpers.c              |  68 +++-
 source4/dsdb/repl/drepl_service.h                  |   7 -
 source4/dsdb/repl/replicated_objects.c             | 118 ++++++-
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |  16 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c    |   6 +-
 source4/dsdb/samdb/ldb_modules/schema_util.c       |  38 ++-
 source4/dsdb/samdb/samdb.h                         |   2 +-
 source4/dsdb/schema/schema.h                       |  10 +-
 source4/dsdb/schema/schema_info_attr.c             |  36 +-
 source4/dsdb/schema/schema_init.c                  |  54 +--
 source4/dsdb/schema/schema_prefixmap.c             |  54 ++-
 source4/dsdb/schema/schema_set.c                   |  12 +
 source4/dsdb/schema/schema_syntax.c                |  97 ++++--
 source4/dsdb/tests/python/dsdb_schema_info.py      |   2 +-
 source4/libnet/libnet_vampire.c                    |   7 +-
 source4/rpc_server/drsuapi/getncchanges.c          | 197 +++++++++--
 source4/setup/schema_samba4.ldif                   |   2 +
 source4/torture/dns/dlz_bind9.c                    |   3 +
 source4/torture/drs/python/fsmo.py                 |   2 +-
 source4/torture/drs/python/getnc_exop.py           | 363 ++++++++++++++++++++-
 source4/torture/drs/python/repl_schema.py          |  26 +-
 source4/torture/drs/unit/prefixmap_tests.c         | 106 +++---
 source4/torture/drs/unit/schemainfo_tests.c        |  83 ++++-
 source4/torture/rpc/backupkey.c                    |  10 +-
 source4/torture/rpc/backupkey_heimdal.c            |   5 +-
 source4/torture/smb2/getinfo.c                     |  45 +++
 source4/torture/smb2/ioctl.c                       | 116 +++++--
 source4/torture/smb2/read.c                        |  96 +++++-
 source4/torture/smb2/util.c                        |  63 +++-
 upgrading-samba4.txt                               |  28 --
 140 files changed, 2890 insertions(+), 1046 deletions(-)
 delete mode 100644 source3/torture/t_strappend.c
 delete mode 100644 upgrading-samba4.txt


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index d2dedc2..85ce530 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1                      #
 #  ->  "3.0.0rc1"                                      #
 ########################################################
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=3
 
 ########################################################
 # To mark SVN snapshots this should be set to 'yes'    #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index f5b693a..91422af 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
 Release Announcements
 =====================
 
-This is the second release candidate of Samba 4.5.  This is *not*
+This is the third release candidate of Samba 4.5.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.
@@ -84,10 +84,13 @@ replPropertyMetaData Changes
 ----------------------------
 
 During the development of the DRS replication, tests showed that Samba
-stores the replPropertyMetaData object incorrectly.  To address this,
+stores the replPropertyMetaData object incorrectly. To address this,
 be aware that 'dbcheck' will now detect and offer to fix all objects in
 the domain for this error.
 
+For further information and instructions how to fix the problem, see
+https://wiki.samba.org/index.php/Updating_Samba#Fixing_replPropertyMetaData_Attributes
+
 Linked attributes on deleted objects
 ------------------------------------
 
@@ -122,8 +125,11 @@ restored with the original SID and GUID still in place.
 Multiple DNS Forwarders on the AD DC
 ------------------------------------
 
-Multiple DNS forwarders are now supported on the AD DC, allowing
-Samba to fall back between two different DNS servers for forwarded queries.
+Previously, the Samba internal DNS server supported only one DNS forwarder.
+The "dns forwarder" option has been enhanced and now supports a space-separated
+list of multiple DNS server IP addresses. As a result, Samba is now able to
+fall back to alternative DNS servers. In case that a DNS query to the first
+server timed out, it is sent to the next DNS server listed in the option.
 
 Password quality plugin support in the AD DC
 --------------------------------------------
@@ -340,6 +346,77 @@ KNOWN ISSUES
 https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.5#All_bugs
 
 
+CHANGES SINCE 4.5.0rc2
+======================
+
+o   Michael Adam <obnox at samba.org>
+    * BUG 12155: Some idmap backends don't perform range checks for the result
+      of sids_to_xids.
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 12115: Endless loop on drsuapi pull replication after schema changes.
+    * BUG 12135: net ads gpo refresh can crash with null pointer deref..
+    * BUG 12139: Race between break oplock and check for share_mode.
+    * BUG 12150: SMB2 snapshot query fails on DFS shares..
+    * BUG 12165: smbclient allinfo doesn't correctly return 'previous version'
+      info over SMB1.
+    * BUG 12166: smbclient allinfo doesn't correctly return 'previous version'
+      info over SMB2.
+    * BUG 12174: error: 'conn' undeclared.
+
+o   Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
+    * BUG 12143: misnamed attribute in samba_kcc causes exception in unusual
+      circumstances.
+    * BUG 12187: Backport changes for partial attribute set calculation
+      for 4.5.
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 12107: backport backupkey tests.
+    * BUG 12115: Endless loop on drsuapi pull replication after schema changes.
+    * BUG 12128: Correctly resolve replicated schema changes regarding linked
+      attributes.
+
+o   Amitay Isaacs <amitay at gmail.com>
+    * BUG 12137: Fix printf format non-liternal warnings and printf
+      format errors.
+    * BUG 12138: Fix uninitialized timeout in ctdb_pmda.
+    * BUG 12151: Drop resurrected ctdb commands in new ctdb tool.
+    * BUG 12152: Fix ctdb addip; implementation to match ctdb delip.
+    * BUG 12163: Fix missing arguments and format elements in format strings.
+    * BUG 12168: Fix format-nonliteral warnings.
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 12108: Backport selftest/autobuild fixes to v4-5-test.
+    * BUG 12114: In memory schema updated on non schema master.
+    * BUG 12115: Endless loop on drsuapi pull replication after schema changes.
+    * BUG 12128: Correctly resolve replicated schema changes regarding
+      linked attributes.
+    * BUG 12129: let samba-tool ldapcmp ignore whenChanged.
+
+o   Garming Sam <garming at catalyst.net.nz>
+    * BUG 12187: Backport changes for partial attribute set calculation
+      for 4.5.
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 12175: smbget always prompts for a username.
+
+o   Christof Schmitt <cs at samba.org>
+    * BUG 12150: SMB2 snapshot query fails on DFS shares..
+
+o   Martin Schwenke <martin at meltin.net>
+    * BUG 12157: Coverity and related fixes.
+    * BUG 12158: CTDB release IP fixes.
+    * BUG 12161: Fix CTDB cumulative takeover timeout.
+    * BUG 12170: CTDB test runs can kill each other's ctdbd daemons.
+
+o   Uri Simchoni <uri at samba.org>
+    * BUG 12145: smbd: if inherit owner is enabled, the free disk on a folder
+      should take the owner's quota into account.
+    * BUG 12149: smbd: cannot load a Windows device driver from a Samba share
+      via SMB2.
+    * BUG 12172: a snapshot folder cannot be accessed via SMB1.
+
+
 CHANGES SINCE 4.5.0rc1
 ======================
 
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) {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list