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

Karolin Seeger kseeger at samba.org
Tue Mar 8 12:51:31 UTC 2016


The branch, v4-4-stable has been updated
       via  331c2a3 VERSION: Disable git snapshots for the Samba 4.4.0rc4 release.
       via  54f95be WHATSNEW: Add release notes for Samba 4.4.0rc4.
       via  38eeb06 CVE-2016-0771: tests/dns: Remove dependencies on env variables
       via  f193cd9 CVE-2016-0771: tests/dns: change samba.tests.dns from being a unittest
       via  ee2bdcc CVE-2016-0771: tests: rename test getopt to get_opt
       via  4402337 CVE-2016-0771: tests/dns: RPC => DNS roundtrip test
       via  08e558c CVE-2016-0771: dnsserver: don't force UTF-8 for TXT
       via  111d035 CVE-2016-0771: tests/dns: modify tests to check via RPC
       via  c4e9392 CVE-2016-0771: tests/dns: Add some more test cases for TXT records
       via  c6dd132 CVE-2016-0771: tests/dns: Correct error code for formerly unrun test
       via  5b19529 CVE-2016-0771: tests/dns: restore formerly segfaulting test
       via  14de523 CVE-2016-0771: tests/dns: Add a comment regarding odd Windows behaviour
       via  3115b40 CVE-2016-0771: tests/dns: FORMERR can simply timeout against Windows
       via  48c3137 CVE-2016-0771: tests/dns: prepare script for further testing
       via  01faa56 CVE-2016-0771: tests/dns: Modify dns tests to match new IDL
       via  3fe2141 CVE-2016-0771: dns.idl: make use of dnsp_hinfo
       via  d3ac9c3 CVE-2016-0771: s4:dns_server: fix idl for dns_txt_record
       via  8e5a639 CVE-2016-0771: librpc: add ndr_dnsp_string_list_copy() helper function
       via  c504551 CVE-2016-0771: librpc: add RPC_NDR_DNSSERVER to dcerpc-samba library
       via  71c64e7 CVE-2016-0771: s4:librpc: python_dns and python_dcerpc_dnsp doesn't require client bindings
       via  1c7096a CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-EA test.
       via  ee4d435 CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-ACL test.
       via  b13711e CVE-2015-7560: s3: libsmb: Add SMB1-only POSIX cli_posix_setacl() functions. Needed for tests.
       via  3d09f82 CVE-2015-7560: s3: libsmb: Rename cli_posix_getfaclXX() functions to cli_posix_getacl() as they operate on pathnames.
       via  863c44a CVE-2015-7560: s3: smbd: Refuse to set EA's on a symlink.
       via  f803247 CVE-2015-7560: s3: smbd: Silently return no EA's available on a symlink.
       via  c1fe124 CVE-2015-7560: s3: smbd: Set return values early, allows removal of code duplication.
       via  3f59769 CVE-2015-7560: s3: smbd: Refuse to get a POSIX ACL on a symlink.
       via  af2e476 CVE-2015-7560: s3: smbd: Refuse to set a POSIX ACL on a symlink.
       via  4be4e40 CVE-2015-7560: s3: smbd: Refuse to set an ACL from a POSIX file handle on a symlink.
       via  e90c33e CVE-2015-7560: s3: smbd: Refuse to get an ACL from a POSIX file handle on a symlink.
       via  468f67b CVE-2015-7560: s3: smbd: Add refuse_symlink() function that can be used to prevent operations on a symlink.
       via  2212643 selftest: Add a blackbox test for smbget
       via  eb40cac selftest: add a helper for the smbget binary
       via  83b29fb selftest: Reduce code duplication
       via  7ebf660 s3:utils/smbget fix option parsing
       via  789c77e WHATSNEW: document removal of -P in smbget
       via  a51b9a4 s3:utils/smbget update manpage with -P option removal
       via  7ea0312 s3:utils/smbget remove -P option
       via  5298c36 s3:utils/smbget improve check of write() result
       via  b24f898 s3:utils/smbget abort recursive download on error
       via  ac81bbc s3:utils/smbget another int -> bool conversion
       via  52033ae samba3.blackbox.smbclient.forceuser_validusers: Add new test for force user option.
       via  e787720 passdb: add linefeed to debug message
       via  1372a32 smbd: ignore SVHDX create context
       via  2335e6f winbindd: return trust parameters when listing trusts
       via  46c1289 winbindd: initialize foreign domain as AD based on trust
       via  f9aef97 winbindd: introduce add_trusted_domain_from_tdc()
       via  9004fa4 access based share enum: handle permission set in configuration files
       via  bf4b42c tevent: version 0.9.28
       via  c5b55c8 lib: tevent: Fix memory leak reported by Pavel Březina <pbrezina at redhat.com> when old signal action restored.
       via  77c1e14 tevent: version 0.9.27
       via  30d815a Fix ETIME handling for Solaris event ports.
       via  30e85f4 ldb: remove outdated comment about type argument in dlist
       via  96e0a11 tevent: remove outdated comment about type argument in dlist
       via  745e81e dlist: remove outdated comment about type argument
       via  f20e5b3 dlist: remove unneeded type argument from DLIST_CONCATENATE()
       via  ac36022 tevent: remove unneeded type argument from DLIST_CONCATENATE()
       via  95d89dd ldb: remove unneeded argument type from DLIST_CONCATENATE()
       via  9d32594 tevent: remove uneeded type argument from DLIST_DEMOTE()
       via  1a7ceca ldb: remove uneeded type argument from DLIST_DEMOTE()
       via  c373524 dlist: remove unneeded argument from DLIST_DEMOTE()
       via  9e06f33 ldb: remove unneeded type arg from DLIST_ADD_END
       via  2081969 tevent: remove unneeded type argument from DLIST_ADD_END
       via  c4536f8 dlist: remove unneeded type argument from DLIST_ADD_END()
       via  c17b1f6 s3:clispnego: fix confusing warning in spnego_gen_krb5_wrap()
       via  6342580 s3:libads: setup the msDS-SupportedEncryptionTypes attribute on ldap_add
       via  57bc152 VERSION: Bump version up to 4.4.0rc4...
      from  ff77a11 VERSION: Disable git snapshots for the Samba 4.4.0rc3 release.

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


- Log -----------------------------------------------------------------
commit 331c2a334e1ef7c381364b0b83b9b2bab0440d66
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Mar 8 11:58:23 2016 +0100

    VERSION: Disable git snapshots for the Samba 4.4.0rc4 release.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>

commit 54f95be1b18ea95c32cd175d2a432eb10d556156
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Mar 8 11:57:21 2016 +0100

    WHATSNEW: Add release notes for Samba 4.4.0rc4.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>

commit 38eeb06ff0467991bfea5598bd2944da13df8b69
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Fri Jan 29 17:28:54 2016 +1300

    CVE-2016-0771: tests/dns: Remove dependencies on env variables
    
    Now that it is invoked as a normal script, there should be less of them.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit f193cd955f2e412c1113227e907a43d087d78977
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Fri Jan 29 17:03:56 2016 +1300

    CVE-2016-0771: tests/dns: change samba.tests.dns from being a unittest
    
    This makes it easier to invoke, particularly against Windows.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit ee2bdcc5592fc15f9134831e44215a6287170128
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Fri Jan 22 11:35:03 2016 +1300

    CVE-2016-0771: tests: rename test getopt to get_opt
    
    This avoids any conflicts in this directory with the original toplevel
    getopt.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 44023379ab956195a6fede631dcfd017fcb2040f
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 28 12:54:58 2016 +1300

    CVE-2016-0771: tests/dns: RPC => DNS roundtrip test
    
    Make sure that TXT entries stored via RPC come out the same in DNS.
    
    This has one caveat in that adding over RPC in Windows eats slashes,
    and so fails there.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 08e558c96ee4ac6366f9d8c889cc64e42074895f
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 28 12:36:43 2016 +1300

    CVE-2016-0771: dnsserver: don't force UTF-8 for TXT
    
    While using a charset is not entirely logical, it allows testing of non
    UTF-8 data (like inserting 0xFF into the TXT string).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 111d035f54d89a66f8a81c6748d5f314d6b40e26
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Jan 27 17:41:44 2016 +1300

    CVE-2016-0771: tests/dns: modify tests to check via RPC
    
    This checks that TXT records added over DNS, look the same over RPC.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c4e93926d3019003d5cd0aaacbe3104a23e54774
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Mon Jan 18 12:39:46 2016 +1300

    CVE-2016-0771: tests/dns: Add some more test cases for TXT records
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c6dd1324d3afeb5b135d90a187ede145a2fdecab
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 21 10:25:44 2016 +1300

    CVE-2016-0771: tests/dns: Correct error code for formerly unrun test
    
    Both Samba and Windows returned NXRRSET
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 5b19529af4b9f5a30a21053c792e84a81ffcdfb4
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Tue Dec 15 17:22:32 2015 +1300

    CVE-2016-0771: tests/dns: restore formerly segfaulting test
    
    This was on the client side, due the a strlen(NULL) on the previously
    DOS-encoded TXT field. With a new IDL structure, this segfault no longer exists.
    Note that both Samba and Windows return NXRRSET instead of FORMERR.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 14de52376205f531f49e7cae0cf32200d0b8aca4
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 21 17:08:18 2016 +1300

    CVE-2016-0771: tests/dns: Add a comment regarding odd Windows behaviour
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 3115b40b057419fcd59af451d6a39813fb62b1b6
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 21 15:43:55 2016 +1300

    CVE-2016-0771: tests/dns: FORMERR can simply timeout against Windows
    
    Two requests with identical parameters which are poorly formatted, can
    non-deterministically return FORMERR or simply fail to give a response.
    
    Setting the timeout to a number allows Windows to succeed.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 48c3137e66b470df9cc2a6b3b7154b32f23b978b
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Thu Jan 21 16:58:40 2016 +1300

    CVE-2016-0771: tests/dns: prepare script for further testing
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 01faa569537f51dcc1f775063ca7b7ce959cc0d7
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Jan 6 14:12:35 2016 +1300

    CVE-2016-0771: tests/dns: Modify dns tests to match new IDL
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 3fe21418491feab4119a42593e43e4aed46e7ecd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 7 11:36:47 2015 +0200

    CVE-2016-0771: dns.idl: make use of dnsp_hinfo
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit d3ac9c3f884cca2d717d0dcbb78131d19e65a71e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 7 11:36:47 2015 +0200

    CVE-2016-0771: s4:dns_server: fix idl for dns_txt_record
    
    From RFC 1035:
    
        3.3.14. TXT RDATA format
    
            +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
            /                   TXT-DATA                    /
            +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    
        where:
    
        TXT-DATA        One or more <character-string>s.
    
        TXT RRs are used to hold descriptive text.  The semantics of the text
        depends on the domain where it is found.
    
    Each record contains an array of strings instead of just one string.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 8e5a63969a1f30053f30716d401e95aaef1b3040
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 7 11:36:47 2015 +0200

    CVE-2016-0771: librpc: add ndr_dnsp_string_list_copy() helper function
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c5045515bc04081f10a8ef4e5b1c3e9f9a0873a4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 7 11:36:47 2015 +0200

    CVE-2016-0771: librpc: add RPC_NDR_DNSSERVER to dcerpc-samba library
    
    RPC_NDR_DNSSERVER is the client interface NDR_DNSP contains just
    marshalling helpers.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 71c64e75e5ca24ed4f7ee221dc738877d86564dc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 7 11:36:47 2015 +0200

    CVE-2016-0771: s4:librpc: python_dns and python_dcerpc_dnsp doesn't require client bindings
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11686
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11128
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 1c7096a9f212f642dffa7a9357fa40e9a39931e1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 7 14:26:35 2016 -0800

    CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-EA test.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit ee4d4358a25f5f1d30c712c76814d1b60fb36c9c
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 7 12:58:34 2016 -0800

    CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-ACL test.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit b13711e386466ebdbffbbae97367044f8e42a111
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jan 6 17:02:52 2016 -0800

    CVE-2015-7560: s3: libsmb: Add SMB1-only POSIX cli_posix_setacl() functions. Needed for tests.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 3d09f82f7b42b8df8c3e7c708721d16c9dd289ee
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jan 6 17:17:24 2016 -0800

    CVE-2015-7560: s3: libsmb: Rename cli_posix_getfaclXX() functions to cli_posix_getacl() as they operate on pathnames.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 863c44a9dd72dc4eb50a235480d95243470678db
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:33:48 2016 -0800

    CVE-2015-7560: s3: smbd: Refuse to set EA's on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit f803247dbe378f6b30bf2036cec5dbfbb91bae24
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:29:38 2016 -0800

    CVE-2015-7560: s3: smbd: Silently return no EA's available on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit c1fe124813d9c333eb594a1a2bb816253631325f
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:05:48 2016 -0800

    CVE-2015-7560: s3: smbd: Set return values early, allows removal of code duplication.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 3f59769ffe797c5ca7372dbad6d3167aa9436787
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:24:36 2016 -0800

    CVE-2015-7560: s3: smbd: Refuse to get a POSIX ACL on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit af2e4763bfb5dc91900dd036cfdd9fa6d27109b2
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:22:12 2016 -0800

    CVE-2015-7560: s3: smbd: Refuse to set a POSIX ACL on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 4be4e40788bed96383b60b5b24018b0240967728
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 10:52:50 2016 -0800

    CVE-2015-7560: s3: smbd: Refuse to set an ACL from a POSIX file handle on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit e90c33e8528724a58a52988612472561e2582235
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 10:38:28 2016 -0800

    CVE-2015-7560: s3: smbd: Refuse to get an ACL from a POSIX file handle on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 468f67b7ce2ef14bcbada929758ef9d286868272
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 5 11:18:12 2016 -0800

    CVE-2015-7560: s3: smbd: Add refuse_symlink() function that can be used to prevent operations on a symlink.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       |  36 +-
 ctdb/common/ctdb_io.c                              |   2 +-
 ctdb/server/ctdb_call.c                            |   4 +-
 ctdb/server/ctdb_daemon.c                          |   2 +-
 ctdb/server/ctdb_lock.c                            |   8 +-
 ctdb/server/ctdb_logging.c                         |   2 +-
 docs-xml/manpages/smbget.1.xml                     |   6 -
 lib/ldb/common/ldb_match.c                         |   2 +-
 lib/ldb/common/ldb_modules.c                       |   6 +-
 lib/ldb/include/dlinklist.h                        |  15 +-
 .../ABI/{tevent-0.9.26.sigs => tevent-0.9.27.sigs} |   0
 .../ABI/{tevent-0.9.26.sigs => tevent-0.9.28.sigs} |   0
 lib/tevent/tevent_immediate.c                      |   2 +-
 lib/tevent/tevent_poll.c                           |   2 +-
 lib/tevent/tevent_port.c                           |  22 +-
 lib/tevent/tevent_queue.c                          |   2 +-
 lib/tevent/tevent_select.c                         |   2 +-
 lib/tevent/tevent_signal.c                         |   4 +
 lib/tevent/tevent_util.h                           |  15 +-
 lib/tevent/wscript                                 |   2 +-
 lib/torture/torture.c                              |  14 +-
 lib/util/dlinklist.h                               |  15 +-
 lib/util/tests/dlinklist.c                         |   8 +-
 libcli/cldap/cldap.c                               |   2 +-
 libcli/nbt/nbtsocket.c                             |   7 +-
 libcli/smb/smbXcli_base.c                          |   6 +-
 librpc/idl/dns.idl                                 |  18 +-
 librpc/idl/dnsp.idl                                |   4 +-
 librpc/idl/dnsserver.idl                           |   2 +-
 librpc/ndr/ndr_dns.c                               |  27 +
 librpc/ndr/ndr_dnsp.c                              |  24 +
 librpc/ndr/ndr_dnsp.h                              |   4 +
 librpc/wscript_build                               |  20 +-
 python/samba/tests/dns.py                          | 642 +++++++++++++++------
 python/samba/tests/{getopt.py => get_opt.py}       |   0
 selftest/knownfail                                 |   2 +
 selftest/selftesthelpers.py                        |   1 +
 selftest/target/Samba3.pm                          |  66 ++-
 selftest/tests.py                                  |   2 +-
 source3/auth/auth.c                                |   2 +-
 source3/auth/pampass.c                             |   2 +-
 source3/client/client.c                            |   2 +-
 source3/lib/events.c                               |   2 +-
 source3/lib/smbldap.c                              |   2 +-
 source3/lib/unix_msg/unix_msg.c                    |   2 +-
 source3/lib/util_ea.c                              |   2 +-
 source3/libads/ldap.c                              |  26 +
 source3/libnet/libnet_join.c                       |  65 ---
 source3/libsmb/clidfs.c                            |   2 +-
 source3/libsmb/clifile.c                           | 130 ++++-
 source3/libsmb/clireadwrite.c                      |   4 +-
 source3/libsmb/clispnego.c                         |  15 +-
 source3/libsmb/proto.h                             |  17 +-
 source3/modules/vfs_aio_pthread.c                  |   2 +-
 source3/modules/vfs_default.c                      |  16 -
 source3/nmbd/nmbd_browserdb.c                      |   2 +-
 source3/nmbd/nmbd_packets.c                        |   2 +-
 source3/nmbd/nmbd_responserecordsdb.c              |   2 +-
 source3/nmbd/nmbd_serverlistdb.c                   |   2 +-
 source3/param/loadparm.c                           |   2 +-
 source3/passdb/passdb.c                            |   3 +-
 source3/printing/notify.c                          |   2 +-
 source3/registry/regfio.c                          |   2 +-
 source3/rpc_server/fss/srv_fss_agent.c             |   9 +-
 source3/rpc_server/fss/srv_fss_state.c             |  12 +-
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c          |  17 +-
 source3/script/tests/test_forceuser_validusers.sh  |  59 ++
 source3/script/tests/test_smbget.sh                | 236 ++++++++
 source3/selftest/tests.py                          |   4 +-
 source3/smbd/blocking.c                            |   2 +-
 source3/smbd/notify.c                              |   3 +-
 source3/smbd/nttrans.c                             |  13 +
 source3/smbd/posix_acls.c                          |  12 +-
 source3/smbd/process.c                             |   5 +-
 source3/smbd/server.c                              |   2 +-
 source3/smbd/smb2_server.c                         |  10 +-
 source3/smbd/smbXsrv_session.c                     |   2 +-
 source3/smbd/trans2.c                              |  74 ++-
 source3/torture/torture.c                          | 376 ++++++++++++
 source3/utils/smbget.c                             | 119 ++--
 source3/winbindd/winbindd_misc.c                   |  11 +-
 source3/winbindd/winbindd_util.c                   | 155 +++--
 source4/auth/ntlm/auth.c                           |   2 +-
 source4/dns_server/dns_query.c                     |  23 +-
 source4/dns_server/dns_update.c                    |  31 +-
 source4/dns_server/dnsserver_common.c              |   2 +-
 source4/dsdb/common/util_trusts.c                  |   2 +-
 source4/dsdb/kcc/kcc_drs_replica_info.c            |   2 +-
 source4/dsdb/repl/drepl_notify.c                   |   2 +-
 source4/dsdb/repl/drepl_out_pull.c                 |   2 +-
 source4/dsdb/repl/drepl_partitions.c               |   4 +-
 source4/dsdb/repl/replicated_objects.c             |   2 +-
 source4/dsdb/samdb/ldb_modules/descriptor.c        |   4 +-
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   2 +-
 source4/dsdb/samdb/ldb_modules/secrets_tdb_sync.c  |   2 +-
 source4/dsdb/samdb/ldb_modules/update_keytab.c     |   2 +-
 source4/dsdb/schema/schema_query.c                 |   8 +-
 source4/ldap_server/ldap_backend.c                 |   2 +-
 source4/lib/http/http.c                            |   2 +-
 source4/lib/socket/interface.c                     |   2 +-
 source4/lib/stream/packet.c                        |   2 +-
 source4/libcli/dgram/dgramsocket.c                 |   2 +-
 source4/libcli/resolve/resolve.c                   |   2 +-
 source4/librpc/rpc/dcerpc.c                        |   6 +-
 source4/librpc/wscript_build                       |   4 +-
 source4/nbt_server/register.c                      |   2 +-
 source4/nbt_server/wins/winsserver.c               |   2 +-
 source4/ntvfs/ntvfs_base.c                         |   2 +-
 source4/ntvfs/posix/pvfs_notify.c                  |   2 +-
 source4/rpc_server/common/reply.c                  |  10 +-
 source4/rpc_server/dcerpc_server.c                 |  14 +-
 source4/rpc_server/dnsserver/dcerpc_dnsserver.c    |   6 +-
 source4/rpc_server/dnsserver/dnsdb.c               |   6 +-
 source4/selftest/tests.py                          |   3 +-
 source4/smb_server/smb2/receive.c                  |   2 +-
 source4/smb_server/smb_server.h                    |   2 +-
 source4/smbd/service.c                             |   2 +-
 source4/torture/local/fsrvp_state.c                |  20 +-
 source4/torture/nbench/nbio.c                      |   4 +-
 source4/torture/nbt/wins.c                         |   3 +-
 source4/torture/ndr/ndr.c                          |   4 +-
 source4/torture/rpc/spoolss_notify.c               |   2 +-
 source4/torture/smb2/smb2.c                        |   4 +-
 source4/torture/util_smb.c                         |   6 +-
 source4/torture/vfs/vfs.c                          |   2 +-
 source4/wrepl_server/wrepl_server.c                |   4 +-
 127 files changed, 1958 insertions(+), 685 deletions(-)
 copy lib/tevent/ABI/{tevent-0.9.26.sigs => tevent-0.9.27.sigs} (100%)
 copy lib/tevent/ABI/{tevent-0.9.26.sigs => tevent-0.9.28.sigs} (100%)
 rename python/samba/tests/{getopt.py => get_opt.py} (100%)
 create mode 100755 source3/script/tests/test_forceuser_validusers.sh
 create mode 100755 source3/script/tests/test_smbget.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 4cd96cc..9773087 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=3
+SAMBA_VERSION_RC_RELEASE=4
 
 ########################################################
 # To mark SVN snapshots this should be set to 'yes'    #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 721eb9c..7011c12 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
 Release Announcements
 =====================
 
-This is the third release candidate of Samba 4.4.  This is *not*
+This is the fourth release candidate of Samba 4.4.  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/.
@@ -71,6 +71,7 @@ The -u and -p options for user and password were replaced by the -U option that
 accepts username[%password] as in many other tools of the Samba suite.
 Similary, smbgetrc files do not accept username and password options any more,
 only a single "user" option which also accepts user%password combinations.
+The -P option was removed.
 
 s4-rpc_server
 -------------
@@ -235,6 +236,39 @@ KNOWN ISSUES
 Currently none.
 
 
+CHANGES SINCE 4.4.0rc3
+======================
+
+o  Jeremy Allison <jra at samba.org>
+   * BUG 11648: CVE-2015-7560: Getting and setting Windows ACLs on symlinks can
+     change permissions on link target.
+
+o  Christian Ambach <ambi at samba.org>
+   * BUG 11767: s3:utils/smbget: Fix option parsing.
+
+o  Alberto Maria Fiaschi <alberto.fiaschi at estar.toscana.it>
+   * BUG 8093: Access based share enum: handle permission set in configuration
+     files.
+
+o  Stefan Metzmacher <metze at samba.org>
+   * BUG 11702: s3:clispnego: Fix confusing warning in spnego_gen_krb5_wrap().
+   * BUG 11742: tevent: version 0.9.28: Fix memory leak when old signal action
+     restored.
+   * BUG 11755: s3:libads: setup the msDS-SupportedEncryptionTypes attribute on
+     ldap_add.
+   * BUGs 11128, 11686: CVE-2016-0771: Read of uninitialized memory DNS TXT
+     handling.
+
+o  Garming Sam <garming at catalyst.net.nz>
+   * BUGs 11128, 11686: CVE-2016-0771: Read of uninitialized memory DNS TXT
+     handling.
+
+o  Uri Simchoni <uri at samba.org>
+   * BUG 11691: winbindd: Return trust parameters when listing trusts.
+   * BUG 11753: smbd: Ignore SVHDX create context.
+   * BUG 11763: passdb: Add linefeed to debug message.
+
+
 CHANGES SINCE 4.4.0rc2
 ======================
 
diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c
index 24968b3..894935e 100644
--- a/ctdb/common/ctdb_io.c
+++ b/ctdb/common/ctdb_io.c
@@ -352,7 +352,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
 		TEVENT_FD_WRITEABLE(queue->fde);
 	}
 
-	DLIST_ADD_END(queue->out_queue, pkt, NULL);
+	DLIST_ADD_END(queue->out_queue, pkt);
 
 	queue->out_queue_length++;
 
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index b61754e..2461f95 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -565,7 +565,7 @@ static int dmaster_defer_add(struct ctdb_db_context *ctdb_db,
 	call->ctdb = ctdb_db->ctdb;
 	call->hdr = talloc_steal(call, hdr);
 
-	DLIST_ADD_END(ddq->deferred_calls, call, NULL);
+	DLIST_ADD_END(ddq->deferred_calls, call);
 
 	return 0;
 }
@@ -1876,7 +1876,7 @@ child_finished:
 	set_close_on_exec(rc->fd[0]);
 
 	/* This is an active revokechild child process */
-	DLIST_ADD_END(ctdb_db->revokechild_active, rc, NULL);
+	DLIST_ADD_END(ctdb_db->revokechild_active, rc);
 
 	rc->fde = tevent_add_fd(ctdb->ev, rc, rc->fd[0], TEVENT_FD_READ,
 				revokechild_handler, (void *)rc);
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 36dcfad..9a33691 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -590,7 +590,7 @@ static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_
 	dfc->w->ctdb = ctdb_db->ctdb;
 	dfc->w->client_id = client->client_id;
 
-	DLIST_ADD_END(dfq->deferred_calls, dfc, NULL);
+	DLIST_ADD_END(dfq->deferred_calls, dfc);
 
 	return 0;
 }
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 78ba35c..7962e94 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -902,10 +902,10 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
 	/* Move the context from pending to current */
 	if (lock_ctx->type == LOCK_RECORD) {
 		DLIST_REMOVE(lock_ctx->ctdb_db->lock_pending, lock_ctx);
-		DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx, NULL);
+		DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx);
 	} else {
 		DLIST_REMOVE(ctdb->lock_pending, lock_ctx);
-		DLIST_ADD_END(ctdb->lock_current, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb->lock_current, lock_ctx);
 	}
 	CTDB_DECREMENT_STAT(lock_ctx->ctdb, locks.num_pending);
 	CTDB_INCREMENT_STAT(lock_ctx->ctdb, locks.num_current);
@@ -975,9 +975,9 @@ static struct lock_request *ctdb_lock_internal(TALLOC_CTX *mem_ctx,
 	 * immediately, so keep them at the head of the pending queue.
 	 */
 	if (lock_ctx->type == LOCK_RECORD) {
-		DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx);
 	} else {
-		DLIST_ADD_END(ctdb->lock_pending, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb->lock_pending, lock_ctx);
 	}
 	CTDB_INCREMENT_STAT(ctdb, locks.num_pending);
 	if (ctdb_db) {
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c
index 29b1982..1819ab7 100644
--- a/ctdb/server/ctdb_logging.c
+++ b/ctdb/server/ctdb_logging.c
@@ -71,7 +71,7 @@ void ctdb_log_register_backend(const char *prefix, ctdb_log_setup_fn_t setup)
 	b->prefix = prefix;
 	b->setup = setup;
 
-	DLIST_ADD_END(log_state->backends, b, NULL);
+	DLIST_ADD_END(log_state->backends, b);
 }
 
 
diff --git a/docs-xml/manpages/smbget.1.xml b/docs-xml/manpages/smbget.1.xml
index 59e2ffe..d77cb8e 100644
--- a/docs-xml/manpages/smbget.1.xml
+++ b/docs-xml/manpages/smbget.1.xml
@@ -27,7 +27,6 @@
 		<arg choice="opt">-n, --nonprompt</arg>
 		<arg choice="opt">-d, --debuglevel=INT</arg>
 		<arg choice="opt">-D, --dots</arg>
-		<arg choice="opt">-P, --keep-permissions</arg>
 		<arg choice="opt">-o, --outputfile</arg>
 		<arg choice="opt">-f, --rcfile</arg>
 		<arg choice="opt">-q, --quiet</arg>
@@ -102,11 +101,6 @@
 	</varlistentry>
 
 	<varlistentry>
-		<term>-P, --keep-permissions</term>
-		<listitem><para>Set same permissions on local file as are set on remote file.</para></listitem>
-	</varlistentry>
-
-	<varlistentry>
 		<term>-o, --outputfile</term>
 		<listitem><para>Write the file that is being downloaded to the specified file. Can not be used together with -R.</para></listitem>
 	</varlistentry>
diff --git a/lib/ldb/common/ldb_match.c b/lib/ldb/common/ldb_match.c
index c4f5580..e83ad63 100644
--- a/lib/ldb/common/ldb_match.c
+++ b/lib/ldb/common/ldb_match.c
@@ -713,7 +713,7 @@ int ldb_register_extended_match_rule(struct ldb_context *ldb,
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	entry->rule = rule;
-	DLIST_ADD_END(ldb->extended_match_rules, entry, struct ldb_extended_match_entry);
+	DLIST_ADD_END(ldb->extended_match_rules, entry);
 
 	return LDB_SUCCESS;
 }
diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c
index 91412a6..2105966 100644
--- a/lib/ldb/common/ldb_modules.c
+++ b/lib/ldb/common/ldb_modules.c
@@ -162,7 +162,7 @@ int ldb_register_backend(const char *url_prefix, ldb_connect_fn connectfn, bool
 			talloc_free(be);
 			return LDB_ERR_OPERATIONS_ERROR;
 		}
-		DLIST_ADD_END(ldb_backends, be, struct backends_list_entry);
+		DLIST_ADD_END(ldb_backends, be);
 	}
 
 	be->ops->name = url_prefix;
@@ -240,7 +240,7 @@ int ldb_register_hook(ldb_hook_fn hook_fn)
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	lc->hook_fn = hook_fn;
-	DLIST_ADD_END(ldb_hooks, lc, struct ldb_hooks);
+	DLIST_ADD_END(ldb_hooks, lc);
 	return LDB_SUCCESS;
 }
 
@@ -926,7 +926,7 @@ static int ldb_modules_load_path(const char *path, const char *version)
 	le->st_ino = st.st_ino;
 	le->st_dev = st.st_dev;
 
-	DLIST_ADD_END(loaded, le, struct loaded);
+	DLIST_ADD_END(loaded, le);
 
 	/* if it is a directory, recurse */
 	if (S_ISDIR(st.st_mode)) {
diff --git a/lib/ldb/include/dlinklist.h b/lib/ldb/include/dlinklist.h
index f640b0f..ef01aec 100644
--- a/lib/ldb/include/dlinklist.h
+++ b/lib/ldb/include/dlinklist.h
@@ -57,10 +57,6 @@
   This allows us to find the tail of the list by using
   list_head->prev, which means we can add to the end of the list in
   O(1) time
-
-
-  Note that the 'type' arguments below are no longer needed, but
-  are kept for now to prevent an incompatible argument change
  */
 
 
@@ -135,9 +131,8 @@ do { \
 
 /*
    add to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_ADD_END(list, p, type)			\
+#define DLIST_ADD_END(list, p) \
 do { \
 	if (!(list)) { \
 		DLIST_ADD(list, p); \
@@ -155,20 +150,18 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)			\
+#define DLIST_DEMOTE(list, p) \
 do { \
 	DLIST_REMOVE(list, p); \
-	DLIST_ADD_END(list, p, NULL);		\
+	DLIST_ADD_END(list, p); \
 } while (0)
 
 /*
    concatenate two lists - putting all elements of the 2nd list at the
    end of the first list.
-   Note that 'type' is ignored
 */
-#define DLIST_CONCATENATE(list1, list2, type)	\
+#define DLIST_CONCATENATE(list1, list2) \
 do { \
 	if (!(list1)) { \
 		(list1) = (list2); \
diff --git a/lib/tevent/ABI/tevent-0.9.26.sigs b/lib/tevent/ABI/tevent-0.9.27.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.26.sigs
copy to lib/tevent/ABI/tevent-0.9.27.sigs
diff --git a/lib/tevent/ABI/tevent-0.9.26.sigs b/lib/tevent/ABI/tevent-0.9.28.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.26.sigs
copy to lib/tevent/ABI/tevent-0.9.28.sigs
diff --git a/lib/tevent/tevent_immediate.c b/lib/tevent/tevent_immediate.c
index 1ac293e..9ff5322 100644
--- a/lib/tevent/tevent_immediate.c
+++ b/lib/tevent/tevent_immediate.c
@@ -88,7 +88,7 @@ void tevent_common_schedule_immediate(struct tevent_immediate *im,
 	im->cancel_fn		= NULL;
 	im->additional_data	= NULL;
 
-	DLIST_ADD_END(ev->immediate_events, im, struct tevent_immediate *);
+	DLIST_ADD_END(ev->immediate_events, im);
 	talloc_set_destructor(im, tevent_common_immediate_destructor);
 
 	tevent_debug(ev, TEVENT_DEBUG_TRACE,
diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index 9b1781f..e1c305d 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -601,7 +601,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
 		 */
 		flags &= fde->flags;
 		if (flags != 0) {
-			DLIST_DEMOTE(ev->fd_events, fde, struct tevent_fd);
+			DLIST_DEMOTE(ev->fd_events, fde);
 			fde->handler(ev, fde, flags, fde->private_data);
 			return 0;
 		}
diff --git a/lib/tevent/tevent_port.c b/lib/tevent/tevent_port.c
index 5b487d7..4b524df 100644
--- a/lib/tevent/tevent_port.c
+++ b/lib/tevent/tevent_port.c
@@ -496,10 +496,24 @@ static int port_event_loop(struct port_event_context *port_ev, struct timeval *t
 		return 0;
 	}
 
-	if (ret == -1 && port_errno == ETIME && tvalp) {
-		/* we don't care about a possible delay here */
-		tevent_common_loop_timer_delay(ev);
-		return 0;
+	if (ret == -1 && port_errno == ETIME) {
+		/*
+		 * If errno is set to ETIME it is possible that we still got an event.
+		 * In that case we need to go through the processing loop so that we
+		 * reassociate the received event with the port or the association will
+		 * be lost so check the value of nget is 0 before returning.
+		 */
+		if (nget == 0) {
+			/* we don't care about a possible delay here */
+			tevent_common_loop_timer_delay(ev);
+			return 0;
+		}
+		/*
+		 * Set the return value to 0 since we do not actually have an error and we
+		 * do have events that need to be processed.  This keeps us from getting
+		 * caught in the generic error test.
+		 */
+		ret = 0;
 	}
 
 	if (ret == -1) {
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 35742e5..cefe91a 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -195,7 +195,7 @@ static struct tevent_queue_entry *tevent_queue_add_internal(
 		allow_direct = false;
 	}
 
-	DLIST_ADD_END(queue->list, e, struct tevent_queue_entry *);
+	DLIST_ADD_END(queue->list, e);
 	queue->length++;
 	talloc_set_destructor(e, tevent_queue_entry_destructor);
 
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c
index 40a4dc0..ec7565d 100644
--- a/lib/tevent/tevent_select.c
+++ b/lib/tevent/tevent_select.c
@@ -219,7 +219,7 @@ static int select_event_loop_select(struct select_event_context *select_ev, stru
 				flags |= TEVENT_FD_WRITE;
 			}
 			if (flags) {
-				DLIST_DEMOTE(select_ev->ev->fd_events, fde, struct tevent_fd);
+				DLIST_DEMOTE(select_ev->ev->fd_events, fde);
 				fde->handler(select_ev->ev, fde, flags, fde->private_data);
 				break;
 			}
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 924dc05..9bc11ed 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -212,6 +212,7 @@ static int tevent_signal_destructor(struct tevent_signal *se)
 		/* restore old handler, if any */
 		if (sig_state->oldact[se->signum]) {
 			sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+			talloc_free(sig_state->oldact[se->signum]);
 			sig_state->oldact[se->signum] = NULL;
 		}
 #ifdef SA_SIGINFO
@@ -342,6 +343,8 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
 			return NULL;
 		}
 		if (sigaction(signum, &act, sig_state->oldact[signum]) == -1) {
+			talloc_free(sig_state->oldact[signum]);
+			sig_state->oldact[signum] = NULL;
 			talloc_free(se);
 			return NULL;
 		}
@@ -505,6 +508,7 @@ void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se)
 	if (sig_state->sig_handlers[se->signum] == NULL) {
 		if (sig_state->oldact[se->signum]) {
 			sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+			talloc_free(sig_state->oldact[se->signum]);
 			sig_state->oldact[se->signum] = NULL;
 		}
 	}
diff --git a/lib/tevent/tevent_util.h b/lib/tevent/tevent_util.h
index 6f91983..e2cdbb8 100644
--- a/lib/tevent/tevent_util.h
+++ b/lib/tevent/tevent_util.h
@@ -53,10 +53,6 @@
   This allows us to find the tail of the list by using
   list_head->prev, which means we can add to the end of the list in
   O(1) time
-
-
-  Note that the 'type' arguments below are no longer needed, but
-  are kept for now to prevent an incompatible argument change
  */
 
 
@@ -131,9 +127,8 @@ do { \
 
 /*
    add to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_ADD_END(list, p, type)			\
+#define DLIST_ADD_END(list, p) \
 do { \
 	if (!(list)) { \
 		DLIST_ADD(list, p); \
@@ -151,20 +146,18 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)			\
+#define DLIST_DEMOTE(list, p) \
 do { \
 	DLIST_REMOVE(list, p); \
-	DLIST_ADD_END(list, p, NULL);		\
+	DLIST_ADD_END(list, p); \
 } while (0)
 
 /*
    concatenate two lists - putting all elements of the 2nd list at the
    end of the first list.
-   Note that 'type' is ignored
 */
-#define DLIST_CONCATENATE(list1, list2, type)	\
+#define DLIST_CONCATENATE(list1, list2) \
 do { \
 	if (!(list1)) { \
 		(list1) = (list2); \
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 103cc06..2bdb5ac 100755
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tevent'
-VERSION = '0.9.26'
+VERSION = '0.9.28'
 
 blddir = 'bin'
 
diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 78d8261..40807d9 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -277,7 +277,7 @@ struct torture_test *torture_tcase_add_test_const(struct torture_tcase *tcase,
 	test->dangerous = false;
 	test->data = data;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return test;
 }
@@ -296,7 +296,7 @@ bool torture_suite_init_tcase(struct torture_suite *suite,
 	tcase->fixture_persistent = true;
 	tcase->tests = NULL;
 
-	DLIST_ADD_END(suite->testcases, tcase, struct torture_tcase *);
+	DLIST_ADD_END(suite->testcases, tcase);
 
 	return true;
 }
@@ -617,7 +617,7 @@ struct torture_tcase *torture_suite_add_simple_tcase_const(
 	test->data = data;
 	test->dangerous = false;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return tcase;
 }
@@ -651,7 +651,7 @@ struct torture_tcase *torture_suite_add_simple_test(
 	test->fn = run;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list