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

Karolin Seeger kseeger at samba.org
Thu Apr 3 06:38:05 MDT 2014


The branch, v4-1-test has been updated
       via  34fcb4e lsa.idl: define lsa.ForestTrustCollisionInfo and ForestTrustCollisionRecord as public structs
       via  3687ab1 s3-rpc_server: Fix handling of fragmented rpc requests.
       via  f2592b6 s3:rpc_server: minor refactoring of process_request_pdu()
       via  f3f0f62 pidl-waf: Only install Yapp::Driver if it is not available.
       via  c7a35ab pidl-waf: Check for system perl(Parse::Yapp::Driver).
       via  7d66a2c pidl-waf: Add a function to check for a system perl module.
       via  fadd326 pidl-waf: Do not glob to install pidl modules.
       via  3957564 pidl-waf: Install pidl modules to the perl vendorlib directory.
       via  7876b4b pidl-waf: Remove unused variable pidl_src.
       via  fe7d930 autobuild: Set perl vendorlib direcotry.
       via  b1d86ee buildtools: Add perl vendorlib configure option.
       via  4ba0f7a buildtools: Rename perl vendorarch configure option.
       via  b53c122 dns: Extend tests for records with another type
       via  5e62b6e bug #10471: Don't respond with NXDOMAIN to records that exist with another type
       via  8745204 s3: smbd: Fileserving share access checks.
       via  032ab0b smbreadline: switch to new-style readline typedef
       via  d60f58d s4:lib/socket: simplify iface_list_wildcard() and its callers
       via  0644125 s4:lib/socket: use the same logic in iface_list_wildcard() as in smbd
       via  8d256c8 s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
       via  3ada2b3 s3:smbd: fix the maxentries calculation depending on the max_send.
       via  f5f5e5b s3:smbd: simplify maxentries calculation in reply_search()
       via  57f6afc s3:smbd: fix the read numtoread calculation depending on the max_send.
       via  6deb0f2 s3:smbd: fix the lockread numtoread calculation depending on the max_send.
       via  434e211 s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
       via  49197c1 s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
       via  9404bd6 s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
       via  39af4a7 s3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request
       via  8724f6c s3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX
       via  047f881 s3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()
       via  08aa53b s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
       via  ba91a66 libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines
       via  3a36bf7 s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
       via  2092577 s3:client: only limit the buffer by the given length 'n'
       via  3528b52 s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
       via  8733ce1 s3:utils/smbfilter: use a local variable for the packet buffer
       via  3b6d207 s4: smbtorture: Add a proper change_notify going async followed by tdis test.
       via  4df79f0 s4: smbtorture: Update the torture_smb2_notify_ulogoff test to demonstrate the problem.
       via  91dea25 s3:smb2_tcon: cancel and wait for pending requests on tdis
       via  e039346 s3:smb2_sesssetup: cancel and wait for pending requests on logoff
       via  3f4af7f s3:smb2_tcon: split smbd_smb2_tdis into an async *_send/recv pair.
       via  0ca9ce8 s3:smb2_sesssetup: split smbd_smb2_logoff into an async *_send/recv pair.
       via  ad5d9c3 s3:smb2_lock: return RANGE_NOT_LOCKED instead of CANCELLED for logoff and tdis
       via  2ded846 s3:smb2_lock: fix whitespaces/tabs in smbd_smb2_lock_cancel()
       via  1a4e5cf s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdis
       via  a9703c9 s3: lib: Back-port tevent_queue_wait_send/recv -> smbd_tevent_queue_wait_send/recv
       via  c77fbd2 tevent: fix crash bug in tevent_queue_immediate_trigger()
      from  71eade3 Merge tag 'samba-4.1.6' into v4-1-test

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test


- Log -----------------------------------------------------------------
commit 34fcb4e542ec61154a14c546a98fa096ab747eeb
Author: Alexander Bokovoy <ab at samba.org>
Date:   Tue Mar 18 19:41:38 2014 +0200

    lsa.idl: define lsa.ForestTrustCollisionInfo and ForestTrustCollisionRecord as public structs
    
    For Python bindings PIDL wants the struct to be defined as public if we
    want to use __ndr_print/pack/unpack.
    
    Define the [public] attribute to ForestTrustCollisionInfo/Record to
    allow easier debugging when there is collision in establishing a trust.
    
    This change does not affect C code as NDR functions are always
    generated, only not exposed in Python bindings.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10504
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    
    Autobuild-User(master): Alexander Bokovoy <ab at samba.org>
    Autobuild-Date(master): Mon Mar 24 12:44:50 CET 2014 on sn-devel-104
    
    (cherry picked from commit 59767911bded48388c27d5f9cd2ff1346a1c01a6)
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Thu Apr  3 14:37:06 CEST 2014 on sn-devel-104

commit 3687ab1f9445e06751592487f5f3b5feb20987b1
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Mar 20 14:45:01 2014 +0100

    s3-rpc_server: Fix handling of fragmented rpc requests.
    
    We need to call pipe_init_outgoing_data() as the first thing in
    process_complete_pdu(). Otherwise the caller may use uninitialized
    memory and tries to write a response into the socket.
    
    The problem happens only if a real socket is used, which means
    in all cases for master and only with external rpc daemons in v4-0
    and v4-1.
    
    The problem looks like this in the logs.
    
        [2014/03/20 14:49:35.531663, 10, pid=7309, effective(0, 0), real(0, 0), class=rpc_srv] ../source3/rpc_server/srv_pipe.c:1627(process_complete_pdu)
          Processing packet type 0
        [2014/03/20 14:49:35.531695, 10, pid=7309, effective(0, 0), real(0, 0), class=rpc_srv] ../source3/rpc_server/srv_pipe.c:1472(dcesrv_auth_request)
          Checking request auth.
        [2014/03/20 14:49:35.531738, 10, pid=7309, effective(0, 0), real(0, 0)] ../source3/rpc_server/rpc_server.c:521(named_pipe_packet_process)
          Sending 1 fragments in a total of 0 bytes
        [2014/03/20 14:49:35.531769, 10, pid=7309, effective(0, 0), real(0, 0)] ../source3/rpc_server/rpc_server.c:526(named_pipe_packet_process)
          Sending PDU number: 0, PDU Length: 4294967228
        [2014/03/20 14:49:35.531801,  2, pid=7309, effective(0, 0), real(0, 0)] ../source3/rpc_server/rpc_server.c:565(named_pipe_packet_done)
          Writev failed!
        [2014/03/20 14:49:35.531845,  2, pid=7309, effective(0, 0), real(0, 0)] ../source3/rpc_server/rpc_server.c:595(named_pipe_packet_done)
          Fatal error(Message too long). Terminating client(127.0.0.1) connection!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10481
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
    Reviewed-by: Guenther Deschner <gd at samba.org
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Thu Mar 20 18:30:17 CET 2014 on sn-devel-104
    
    (cherry picked from commit 5277fc4d0393ffe2e415ad26610b36d2986c62d7)

commit f2592b6843d9b377121c2c9c6f0bc58ceaf08f52
Author: Gregor Beck <gbeck at sernet.de>
Date:   Thu Jan 9 10:15:31 2014 +0100

    s3:rpc_server: minor refactoring of process_request_pdu()
    
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    (cherry picked from commit b5f30205931a4b9d0b3b257d5855869e606f8b63)

commit f3f0f6280c145cd47a281ee61fbdf1e4bb3288fc
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 16:00:54 2014 +0100

    pidl-waf: Only install Yapp::Driver if it is not available.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Thu Mar  6 23:30:47 CET 2014 on sn-devel-104
    
    The last 9 patches address bug #10472 - pidl: waf should have an option for the
    dir to install perl files and do not glob.

commit c7a35ab67d7cf1802c21276e27e66ef8658d8199
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:59:45 2014 +0100

    pidl-waf: Check for system perl(Parse::Yapp::Driver).
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 7d66a2c7d92296b05c5c120b15d556377acc9ff9
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:59:41 2014 +0100

    pidl-waf: Add a function to check for a system perl module.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit fadd326938779b731937de5776e34ab0a460f619
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:55:46 2014 +0100

    pidl-waf: Do not glob to install pidl modules.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 39575642e738b437760e28af41440ea725288c0c
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:53:10 2014 +0100

    pidl-waf: Install pidl modules to the perl vendorlib directory.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 7876b4b1c43d58731253e577206a3de6d57eaa23
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:54:09 2014 +0100

    pidl-waf: Remove unused variable pidl_src.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit fe7d930338f29aab47b55ead0a5323e1d9b31495
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Mar 5 16:27:15 2014 +0100

    autobuild: Set perl vendorlib direcotry.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit b1d86ee5588ade222594fc18dd7e10dc9f86dc40
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:50:02 2014 +0100

    buildtools: Add perl vendorlib configure option.
    
    After this patch has been pushed, we need to change autobuild to compile
    with this option or we will not be able to install pidl.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 4ba0f7ab45b62b3f127b7b0bb620d9ef9e39f983
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 28 15:47:45 2014 +0100

    buildtools: Rename perl vendorarch configure option.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit b53c122519386585e08b49d8f3781e1e0e9acacf
Author: Kai Blin <kai at samba.org>
Date:   Fri Feb 28 10:35:07 2014 +0100

    dns: Extend tests for records with another type
    
    Add another check to the one added for bug #10471, for added paranoia
    
    Signed-off-by: Kai Blin <kai at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Kai Blin <kai at samba.org>
    Autobuild-Date(master): Tue Mar  4 15:47:10 CET 2014 on sn-devel-104
    
    (cherry picked from commit 5bd47bb563c3736b9de1a3a93bdf46a498928643)

commit 5e62b6ef1055eefe2fc12f6f584f836011f45abd
Author: Kai Blin <kai at samba.org>
Date:   Thu Feb 27 23:49:24 2014 +0100

    bug #10471: Don't respond with NXDOMAIN to records that exist with another type
    
    DNS queries for records with the wrong type need to trigger an empty
    response with RCODE_OK instead of returning NXDOMAIN.
    
    This adds a test and fixes bug #10471
    
    Signed-off-by: Kai Blin <kai at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d9829df13317b38677d92a499134727ab31fbb0e)

commit 8745204fa91c4d31bf6506c4b58aa25637f0d642
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 17 14:35:00 2014 -0700

    s3: smbd: Fileserving share access checks.
    
    Git commit 86d1e1db8e2747e30c89627cda123fde1e84f579
    fixed share_access not being reset between users,
    by changing make_connection_snum() to call a common
    function check_user_share_access() in the same way
    that change_to_user() (which can be called on any
    incoming packet) does.
    
    Unfortunately that bugfix was incorrect and
    broke "force user" and "force group" as it
    called check_user_share_access() inside
    make_connection_snum() using the conn->session_info
    pointer instead of the vuser->session_info pointer.
    
    conn->session_info represents the token to use
    when actually accessing the file system, and so
    is modified by force user and force group.
    
    vuser->session_info represents the "pristine"
    token of the user logging in, and is never modified
    by force user and force group.
    
    Samba 3.6.x checked the share access based on
    the "pristine" token of the user logging in,
    not the token modified by force user and force group.
    This change restores the expected behavior.
    
    Fixes bug #9878 - force user does not work as expected
    
    https://bugzilla.samba.org/show_bug.cgi?id=9878
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 032ab0bfc0bfbe6126862de8bd2f76c1dd4f7960
Author: Gustavo Zacarias <gustavo at zacarias.com.ar>
Date:   Thu Mar 6 18:57:40 2014 -0300

    smbreadline: switch to new-style readline typedef
    
    Function, CPFunction, CPPFunction and VFunction typedefs are considered
    old-style (deprecated) starting from readline 4.2 (circa 2001).
    Compatibility typedefs have been in place up to readline 6.2 but were
    removed with the 6.3 release thus causing builds to break.
    Switch to the new-style specific prototyped typedef.
    
    Return value is unused so the callback should still be void (see
    readline/input.c around line 456 in version 6.3).
    
    Signed-off-by: Gustavo Zacarias <gustavo at zacarias.com.ar>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Mar 13 00:21:47 CET 2014 on sn-devel-104
    
    (cherry picked from commit 29d779c7029f89e530994c45ae065707ffd62c43)
    
    Fix bug #10506 - smbreadline doesn't build with readline 6.3.

commit d60f58d450dfc1d754855acd9efce8a258f0156a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 10:28:23 2014 +0100

    s4:lib/socket: simplify iface_list_wildcard() and its callers
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10464
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Change-Id: Ib317d71dea01fc8ef6b6a26455f15a8a175d59f6
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Mar  7 02:18:17 CET 2014 on sn-devel-104
    (cherry picked from commit f7883ae02a4e8935a44396f776712cebfd411e52)

commit 06441251d87f870df677f3a01ded8fb3df337706
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 10:18:35 2014 +0100

    s4:lib/socket: use the same logic in iface_list_wildcard() as in smbd
    
    If we have ipv6 support we should listen on "::" too.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10464
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Change-Id: I8ce185d5070280149bee9fd33010443be9031089
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit a571fe520d09a00273a58b1fb0fa9aab8e0aefce)

commit 8d256c8887839bc36d425f6222f57aaf011dad85
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:56:12 2013 +0100

    s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Mar  5 22:53:34 CET 2014 on sn-devel-104
    (cherry picked from commit 032621d5bf842e60dc9cd1cd0d3acc90482462a6)

commit 3ada2b3877d0e15927344ed8b3f096ddd9f1e0db
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Mar 5 14:03:42 2014 +0100

    s3:smbd: fix the maxentries calculation depending on the max_send.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit c899d4fd9c5a337ab82acdf11866df50fb0629e0)

commit f5f5e5b175f1bd529a524e10668baa6766558d8d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Mar 5 14:00:40 2014 +0100

    s3:smbd: simplify maxentries calculation in reply_search()
    
    Using helper variables make it much easier to understand.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 734e1b65044a33eba01b41695502c2257c1a4d9e)

commit 57f6afcd916161db904731f90aaa489e4deb80a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Mar 4 14:07:26 2014 +0100

    s3:smbd: fix the read numtoread calculation depending on the max_send.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 8b746f5a2137b74e28bce5370f5aa9d4bcdac6c2)

commit 6deb0f2a505c9446657962127926d6c0df9817e7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Mar 4 14:07:26 2014 +0100

    s3:smbd: fix the lockread numtoread calculation depending on the max_send.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit f69be2c28e097c66907df264794706006fe0ae7f)

commit 434e2115a15f201908c16c2f290c35098fc42d78
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Mar 4 14:07:26 2014 +0100

    s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b86f90611820bcf7826bd1de3c7b05488a8f1b0e)

commit 49197c18aa43b0c22ce1496dc75e9fd6c316c6a8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Mar 4 14:07:26 2014 +0100

    s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 3dac00b568613f5a1322883237e40b98ddd1d71d)

commit 9404bd6ea16b3e565289c617a78892e207719986
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:53:45 2013 +0100

    s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
    
    We're now sure that sconn->smb1.sessions.max_send is >= SMB_BUFFER_SIZE_MIN.
    in order to garantee some progress we need to make sure our assumed
    header overhead is less than SMB_BUFFER_SIZE_MIN.
    
    Assuming 372 bytes for the SMBtrans headers should still be more than
    enough.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 2ec49cf57c88735be962b0681b487df5efe7ed6b)

commit 39af4a795625d97b1b7eca9b87e292c4e57578fd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:52:09 2013 +0100

    s3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request
    
    This makes sure sconn->smb1.sessions.max_send is always >= SMB_BUFFER_SIZE_MIN.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit cce1eaea91088efd742891befdaafade0c1fdce6)

commit 8724f6c6c63a6ed58573856841dfa9c5d8662c38
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:50:49 2013 +0100

    s3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX
    
    SMB_BUFFER_SIZE_MAX is UINT16_MAX and the largest value a client
    can possibly specify in the session setup request.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 5cd5c1613996ecebdcd632e932957947f4c27308)

commit 047f88151091590f1fee08e4e45ae4874a99e6c8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:45:35 2013 +0100

    s3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()
    
    The current limit of 128*1024 causes problems as the value has to be
    <= UINT16_MAX otherwise some clients get confused, as they want to
    use the MaxBufferSize value from the negprot response (uint32_t)
    for the MaxBufferSize value in thet session setup request (uint16_t).
    E.g. Windows 7 (as client) sends MaxBufferSize = 0 if the server value
    is > UINT16_MAX.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit a349b0bef9085fd139640ec92399bc63d8029cb9)

commit 08aa53b581bc0b0a03babafca527de481f855782
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:57:15 2013 +0100

    s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 7f3faa1f1837870195352253fe220e0677565d9e)

commit ba91a666baa0ddfb3086c700aaf6435363e2e1de
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 6 13:28:35 2013 +0100

    libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 900839e2216048a614f2f0aeb1f79092fc93334f)

commit 3a36bf7bc6bb9c49ab44473669d76c5351b26f83
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Feb 19 13:59:07 2014 +0100

    s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
    
    There's really no reason to add such limit.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 74f8c3568a5dcdee108a0526cefac9d282361044)

commit 2092577644d3145dbb84958c43e44cb007f83f98
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Feb 19 13:57:28 2014 +0100

    s3:client: only limit the buffer by the given length 'n'
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit f0f245f4c8b1a506e8d06c72d3d6680b95738714)

commit 3528b520dc0f284b9e2aa2207b20a0c80a8ec5be
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Feb 19 13:56:06 2014 +0100

    s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 05e821b220328b88dd9eece919b8adee3e4281ac)

commit 8733ce128982b368a0337ffe5c14eb80aceac0f9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Feb 19 13:54:44 2014 +0100

    s3:utils/smbfilter: use a local variable for the packet buffer
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 3667a2eee388915fca2b894ae37375eeed46e941)

commit 3b6d207f218ce623b0a023e48e305d61d9aca086
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Feb 24 10:44:59 2014 -0800

    s4: smbtorture: Add a proper change_notify going async followed by tdis test.
    
    [Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Mar 12 20:12:58 CET 2014 on sn-devel-104
    
    (cherry picked from commit 9c677fff0bb0abc8d19dd67c33b3e044b1a9862e)

commit 4df79f072949dcb89c9977a77979a578e1284cb2
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 28 14:07:26 2014 -0800

    s4: smbtorture: Update the torture_smb2_notify_ulogoff test to demonstrate the problem.
    
    [Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 3a727d5d39bab05fa7237e32ffe244ddfebb0ee0)

commit 91dea257914b41e87bf8ed946ab5d1022045de6b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 10 09:53:18 2014 +0100

    s3:smb2_tcon: cancel and wait for pending requests on tdis
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 95f96a81083be578ee638c0cebd590228d9a4424)

commit e039346a004d39a377377602223877e5cc743ff2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 10 09:53:18 2014 +0100

    s3:smb2_sesssetup: cancel and wait for pending requests on logoff
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 7c26475d58a003888b7ba6f17f649cca6d93f6f3)

commit 3f4af7f4937485573c31f19c988e9beb0040ddbf
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 10 09:53:18 2014 +0100

    s3:smb2_tcon: split smbd_smb2_tdis into an async *_send/recv pair.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 195c2d84807a7580e90e288cc813a6c6ca596055)
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 0ca9ce818d4f646318edfa641b38f30ed3f334d0
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 10 09:53:18 2014 +0100

    s3:smb2_sesssetup: split smbd_smb2_logoff into an async *_send/recv pair.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 506817dfc9d18c2c5c35d60a6e61a82917665e2d)
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit ad5d9c3ffc28ccb29f969e8453656f506ce1be9d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 10 09:47:11 2014 +0100

    s3:smb2_lock: return RANGE_NOT_LOCKED instead of CANCELLED for logoff and tdis
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 4d1d288b89d259f1b69eb3ed643b86d39e03f6bf)

commit 2ded846535f241fd65e3804b5ed7be4812f3d510
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 10 09:43:35 2014 +0100

    s3:smb2_lock: fix whitespaces/tabs in smbd_smb2_lock_cancel()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b49893776167460d921822362e1b55abdd5cc751)

commit 1a4e5cfbf9558dad68b70cadf01840630d9e79b9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 7 12:31:19 2014 +0100

    s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdis
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 0e4f23991f33bed708e99210e5940abc050e5933)

commit a9703c981d66d11453d171012254ee47427f3a5a
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Mar 13 10:06:48 2014 -0700

    s3: lib: Back-port tevent_queue_wait_send/recv -> smbd_tevent_queue_wait_send/recv
    
    Required for bugfix:
    
    [Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10344
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit c77fbd2cf9a555e12597d5a671a534fa7140e523
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 11 08:58:05 2014 +0100

    tevent: fix crash bug in tevent_queue_immediate_trigger()
    
    Assume we we have a queue with 2 entries (A and B with triggerA() and triggerB()).
    If triggerA() removes itself tevent_queue_entry_destructor() will be called
    for A, this schedules the immediate event to call triggerB().
    If triggerA() then also removes B by an explicit of implizit talloc_free(),
    q->list is NULL, but the immediate event is still scheduled and can't be unscheduled.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 7fe5584e2a59584431cb2ddf8a4da22bfb924454)

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

Summary of changes:
 buildtools/wafadmin/Tools/perl.py                  |   23 ++-
 lib/tevent/tevent_queue.c                          |    4 +
 libcli/smb/smb_constants.h                         |    8 +
 libcli/smbreadline/smbreadline.c                   |    2 +-
 librpc/idl/lsa.idl                                 |    4 +-
 pidl/lib/wscript_build                             |   35 ++++-
 pidl/wscript                                       |   30 +++-
 python/samba/tests/dns.py                          |   30 ++++
 script/autobuild.py                                |    7 +-
 source3/client/client.c                            |    2 +-
 source3/include/client.h                           |    2 +-
 source3/include/smb.h                              |    4 +-
 .../lib/smbd_tevent_queue.c                        |   59 ++++---
 .../kerberos.h => source3/lib/smbd_tevent_queue.h  |   31 ++--
 source3/param/loadparm.c                           |    2 +-
 source3/rpc_server/srv_pipe.c                      |   40 ++---
 source3/smbd/ipc.c                                 |   10 +-
 source3/smbd/process.c                             |   11 +-
 source3/smbd/reply.c                               |   54 +++---
 source3/smbd/service.c                             |   12 +-
 source3/smbd/sesssetup.c                           |   19 ++-
 source3/smbd/smb2_lock.c                           |   42 ++++--
 source3/smbd/smb2_sesssetup.c                      |  183 ++++++++++++++++++--
 source3/smbd/smb2_tcon.c                           |  180 ++++++++++++++++++--
 source3/torture/torture.c                          |    2 +-
 source3/utils/smbfilter.c                          |    2 +-
 source3/wscript_build                              |    1 +
 source4/cldap_server/cldap_server.c                |    2 +-
 source4/dns_server/dns_query.c                     |   14 +-
 source4/dns_server/dns_server.c                    |    8 +-
 source4/kdc/kdc.c                                  |    2 +-
 source4/ldap_server/ldap_server.c                  |    4 +-
 source4/lib/socket/interface.c                     |   26 +---
 source4/rpc_server/dcerpc_server.c                 |    4 +-
 source4/smb_server/service_smb.c                   |    4 +-
 source4/torture/smb2/lock.c                        |   24 ++--
 source4/torture/smb2/notify.c                      |   88 +++++++++-
 source4/web_server/web_server.c                    |    4 +-
 38 files changed, 743 insertions(+), 236 deletions(-)
 copy lib/tevent/tevent_wakeup.c => source3/lib/smbd_tevent_queue.c (53%)
 copy lib/replace/system/kerberos.h => source3/lib/smbd_tevent_queue.h (61%)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py
index a6787a8..8f13e28 100644
--- a/buildtools/wafadmin/Tools/perl.py
+++ b/buildtools/wafadmin/Tools/perl.py
@@ -98,12 +98,27 @@ def check_perl_ext_devel(conf):
 	conf.env.EXTUTILS_TYPEMAP  = read_out('print "$Config{privlib}/ExtUtils/typemap"')
 	conf.env.perlext_PATTERN   = '%s.' + read_out('print $Config{dlext}')[0]
 
-	if getattr(Options.options, 'perlarchdir', None):
-		conf.env.ARCHDIR_PERL = Options.options.perlarchdir
+	if getattr(Options.options, 'perl_vendorarch_dir', None):
+		conf.env.PERL_VENDORARCH_DIR = Options.options.perl_vendorarch_dir
 	else:
-		conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0]
+		conf.env.PERL_VENDORARCH_DIR = read_out('print $Config{vendorarch}')[0]
+
+	if getattr(Options.options, 'perl_vendorlib_dir', None):
+		conf.env.PERL_VENDORLIB_DIR = Options.options.perl_vendorlib_dir
+	else:
+		conf.env.PERL_VENDORLIB_DIR = read_out('print $Config{vendorlib}')[0]
 
 def set_options(opt):
 	opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None)
-	opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None)
 
+	opt.add_option("--with-perl-vendorarch",
+		       type="string",
+		       dest="perl_vendorarch_dir",
+		       help = ('Specify directory where to install arch specific files'),
+		       default=None)
+
+	opt.add_option("--with-perl-vendorlib",
+		       type="string",
+		       dest="perl_vendorlib_dir",
+		       help = ('Specify directory where to install vendor specific files'),
+		       default=None)
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 4750675..eeb922f 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -140,6 +140,10 @@ static void tevent_queue_immediate_trigger(struct tevent_context *ev,
 		return;
 	}
 
+	if (!q->list) {
+		return;
+	}
+
 	q->list->triggered = true;
 	q->list->trigger(q->list->req, q->list->private_data);
 }
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 8a3ef72..175ffaf 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -208,6 +208,14 @@ enum smb_signing_setting {
 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED	0x04
 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED	0x08
 
+/*
+ * The negotiated buffer size for non LARGE_READX/WRITEX
+ * should be limited to uint16_t and has to be at least
+ * 500, which is the default for MinClientBufferSize on Windows.
+ */
+#define SMB_BUFFER_SIZE_MIN 500
+#define SMB_BUFFER_SIZE_MAX 65535
+
 /* Capabilities.  see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
 
 #define CAP_RAW_MODE		0x00000001
diff --git a/libcli/smbreadline/smbreadline.c b/libcli/smbreadline/smbreadline.c
index cff25a7..80e10b0 100644
--- a/libcli/smbreadline/smbreadline.c
+++ b/libcli/smbreadline/smbreadline.c
@@ -141,7 +141,7 @@ char *smb_readline(const char *prompt, void (*callback)(void),
 
 #if HAVE_DECL_RL_EVENT_HOOK
 	if (callback)
-		rl_event_hook = (Function *)callback;
+		rl_event_hook = (rl_hook_func_t *)callback;
 #endif
 	ret = readline(prompt);
 	if (ret && *ret)
diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl
index d8f2649..80efbd5 100644
--- a/librpc/idl/lsa.idl
+++ b/librpc/idl/lsa.idl
@@ -1328,14 +1328,14 @@ import "misc.idl", "security.idl";
 		[default] uint32 flags;
 	} lsa_ForestTrustCollisionFlags;
 
-	typedef struct {
+	typedef [public] struct {
 		uint32 index;
 		lsa_ForestTrustCollisionRecordType type;
 		[switch_is(type)] lsa_ForestTrustCollisionFlags flags;
 		lsa_String name;
 	} lsa_ForestTrustCollisionRecord;
 
-	typedef struct {
+	typedef [public] struct {
 		uint32 count;
 		[size_is(count)] lsa_ForestTrustCollisionRecord **entries;
 	} lsa_ForestTrustCollisionInfo;
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
index eb5f1e0..5023e07 100644
--- a/pidl/lib/wscript_build
+++ b/pidl/lib/wscript_build
@@ -1,4 +1,37 @@
 #!/usr/bin/env python
 
 # install the pidl modules
-bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False)
+bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR,
+                  '''
+                  Parse/Pidl.pm
+                  Parse/Pidl/Samba4.pm
+                  Parse/Pidl/CUtil.pm
+                  Parse/Pidl/Expr.pm
+                  Parse/Pidl/Wireshark/Conformance.pm
+                  Parse/Pidl/Wireshark/NDR.pm
+                  Parse/Pidl/ODL.pm
+                  Parse/Pidl/Dump.pm
+                  Parse/Pidl/Util.pm
+                  Parse/Pidl/Samba4/Header.pm
+                  Parse/Pidl/Samba4/COM/Header.pm
+                  Parse/Pidl/Samba4/COM/Proxy.pm
+                  Parse/Pidl/Samba4/COM/Stub.pm
+                  Parse/Pidl/Samba4/TDR.pm
+                  Parse/Pidl/Samba4/NDR/Server.pm
+                  Parse/Pidl/Samba4/NDR/Client.pm
+                  Parse/Pidl/Samba4/NDR/Parser.pm
+                  Parse/Pidl/Samba4/Python.pm
+                  Parse/Pidl/Samba4/Template.pm
+                  Parse/Pidl/IDL.pm
+                  Parse/Pidl/Typelist.pm
+                  Parse/Pidl/Samba3/ClientNDR.pm
+                  Parse/Pidl/Samba3/ServerNDR.pm
+                  Parse/Pidl/Compat.pm
+                  Parse/Pidl/NDR.pm
+                  ''',
+                  flat=False)
+
+if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'):
+    bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR,
+                      'Parse/Yapp/Driver.pm',
+                      flat=False)
diff --git a/pidl/wscript b/pidl/wscript
index 7a25734..4965870 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -3,11 +3,38 @@
 import os, sys, Logs
 from samba_utils import MODE_755
 
+# This function checks if a perl module is installed on the system.
+def check_system_perl_module(conf, module, version=None):
+    bundle_name = module.replace('::', '_')
+    module_check = module
+    found = False
+
+    # Create module string with version
+    if version:
+        module_check = module + ' ' + str(version)
+
+    # Check if we have to bundle it.
+    if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()):
+        return False
+
+    # Check for system perl module
+    if not conf.check_perl_module(module_check):
+        return False
+
+    conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1)
+
+    return True
+
 def set_options(opt):
     opt.tool_options('perl')
 
 def configure(conf):
     conf.check_tool('perl')
+    conf.check_perl_ext_devel()
+
+    # Check if perl(Parse::Yapp::Driver) is available.
+    check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05)
+
     # we need a recent version of MakeMaker to get the right man page names
     if conf.CHECK_PERL_MANPAGE():
         conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')
@@ -26,9 +53,6 @@ def build(bld):
     if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
         return
 
-    pidl_src = ['pidl']
-    pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split())
-
     pidl_manpages = {
         'pidl': 'man1/pidl.${PERLMAN1EXT}',
         'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}',
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index 0ac9cf4..f2c5685 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -171,6 +171,36 @@ class TestSimpleQueries(DNSTest):
         self.assertEquals(response.answers[0].rdata,
                           os.getenv('SERVER_IP'))
 
+    def test_one_mx_query(self):
+        "create a query packet causing an empty RCODE_OK answer"
+        p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+        questions = []
+
+        name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
+        q = self.make_name_question(name, dns.DNS_QTYPE_MX, dns.DNS_QCLASS_IN)
+        print "asking for ", q.name
+        questions.append(q)
+
+        self.finish_name_packet(p, questions)
+        response = self.dns_transaction_udp(p)
+        self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK)
+        self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
+        self.assertEquals(response.ancount, 0)
+
+        p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+        questions = []
+
+        name = "invalid-%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
+        q = self.make_name_question(name, dns.DNS_QTYPE_MX, dns.DNS_QCLASS_IN)
+        print "asking for ", q.name
+        questions.append(q)
+
+        self.finish_name_packet(p, questions)
+        response = self.dns_transaction_udp(p)
+        self.assert_dns_rcode_equals(response, dns.DNS_RCODE_NXDOMAIN)
+        self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
+        self.assertEquals(response.ancount, 0)
+
     def test_two_queries(self):
         "create a query packet containing two query records"
         p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
diff --git a/script/autobuild.py b/script/autobuild.py
index fe39ed9..3136643 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -35,7 +35,7 @@ defaulttasks = [ "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "ntdb", "tal
 
 tasks = {
     # We have 'test' before 'install' because, 'test' should work without 'install'
-    "samba" : [ ("configure", "./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab", "text/plain"),
+    "samba" : [ ("configure", "./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab", "text/plain"),
                 ("make", "make -j", "text/plain"),
                 ("test", "make test FAIL_IMMEDIATELY=1", "text/plain"),
                 ("install", "make install", "text/plain"),
@@ -53,7 +53,7 @@ tasks = {
                      ("ctdb-header-install", "cp ./ctdb/include/* ${PREFIX_DIR}/include", "text/plain"),
                      ("ctdb-header-ls", "ls ${PREFIX_DIR}/include/ctdb.h", "text/plain"),
 
-                     ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"),
+                     ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"),
                      ("make", "make", "text/plain"),
                      ("check", "./bin/smbd -b | grep CLUSTER_SUPPORT", "text/plain"),
                      ("install", "make install", "text/plain"),
@@ -82,7 +82,7 @@ tasks = {
                       ("ldb-make", "cd lib/ldb && make", "text/plain"),
                       ("ldb-install", "cd lib/ldb && make install", "text/plain"),
 
-                      ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
+                      ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX} ${PERL_VENDOR_LIB}", "text/plain"),
                       ("make", "make", "text/plain"),
                       ("install", "make install", "text/plain")],
 
@@ -212,6 +212,7 @@ class builder(object):
         self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(standard_lib=1, prefix=self.prefix))
         self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix)
         self.cmd = self.cmd.replace("${PREFIX_DIR}", "%s" % self.prefix)
+        self.cmd = self.cmd.replace("${PERL_VENDOR_LIB}", "--with-perl-vendorlib=%s/share/perl5" % self.prefix)
 #        if self.output_mime_type == "text/x-subunit":
 #            self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
         print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd)
diff --git a/source3/client/client.c b/source3/client/client.c
index afa5847..b4a3031 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -232,7 +232,7 @@ static int readfile(uint8_t *b, int n, XFILE *f)
 		return x_fread(b,1,n,f);
 
 	i = 0;
-	while (i < (n - 1) && (i < BUFFER_SIZE)) {
+	while (i < (n - 1)) {
 		if ((c = x_getc(f)) == EOF) {
 			break;
 		}
diff --git a/source3/include/client.h b/source3/include/client.h
index 6c20843..3f92d6d 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -22,7 +22,7 @@
 #ifndef _CLIENT_H
 #define _CLIENT_H
 
-#define CLI_BUFFER_SIZE (0xFFFF)
+#define CLI_BUFFER_SIZE SMB_BUFFER_SIZE_MAX
 
 /* default client timeout to 20 seconds on most commands */
 #define CLIENT_TIMEOUT (20 * 1000)
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 64ea568..7ff997e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -32,11 +32,9 @@
 /* logged when starting the various Samba daemons */
 #define COPYRIGHT_STARTUP_MESSAGE	"Copyright Andrew Tridgell and the Samba Team 1992-2013"
 
-
-#define BUFFER_SIZE (128*1024)
-
 #define SAFETY_MARGIN 1024
 #define LARGE_WRITEX_HDR_SIZE 65
+#define LARGE_WRITEX_BUFFER_SIZE (128*1024)
 
 #define NMB_PORT 137
 #define DGRAM_PORT 138
diff --git a/lib/tevent/tevent_wakeup.c b/source3/lib/smbd_tevent_queue.c
similarity index 53%
copy from lib/tevent/tevent_wakeup.c
copy to source3/lib/smbd_tevent_queue.c
index 82c3942..421f77d 100644
--- a/lib/tevent/tevent_wakeup.c
+++ b/source3/lib/smbd_tevent_queue.c
@@ -22,49 +22,60 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
+/* Back-port of missing API from 4.2.x for tevent_queues. */
+
 #include "replace.h"
-#include "tevent.h"
-#include "tevent_internal.h"
-#include "tevent_util.h"
+#include <tevent.h>
+#include "source3/lib/smbd_tevent_queue.h"
 
-struct tevent_wakeup_state {
-	struct timeval wakeup_time;
+struct tevent_queue_wait_state {
+	uint8_t dummy;
 };
 
-struct tevent_req *tevent_wakeup_send(TALLOC_CTX *mem_ctx,
-				      struct tevent_context *ev,
-				      struct timeval wakeup_time)
+static void tevent_queue_wait_trigger(struct tevent_req *req,
+				      void *private_data);
+
+struct tevent_req *smbd_tevent_queue_wait_send(TALLOC_CTX *mem_ctx,
+					  struct tevent_context *ev,
+					  struct tevent_queue *queue)
 {
 	struct tevent_req *req;
-	struct tevent_wakeup_state *state;
+	struct tevent_queue_wait_state *state;
+	bool ok;
 
 	req = tevent_req_create(mem_ctx, &state,
-				struct tevent_wakeup_state);
-	if (!req) {
+				struct tevent_queue_wait_state);
+	if (req == NULL) {
 		return NULL;
 	}
-	state->wakeup_time = wakeup_time;
 
-	if (!tevent_req_set_endtime(req, ev, wakeup_time)) {
-		goto post;
+	ok = tevent_queue_add(queue, ev, req,
+			      tevent_queue_wait_trigger,
+			      NULL);
+	if (!ok) {
+		tevent_req_oom(req);
+		return tevent_req_post(req, ev);
 	}
 
 	return req;
-post:
-	return tevent_req_post(req, ev);
 }
 
-bool tevent_wakeup_recv(struct tevent_req *req)
+static void tevent_queue_wait_trigger(struct tevent_req *req,
+					 void *private_data)
+{
+	tevent_req_done(req);
+}
+
+bool smbd_tevent_queue_wait_recv(struct tevent_req *req)
 {
 	enum tevent_req_state state;
-	uint64_t error;
+	uint64_t err;
 
-	if (tevent_req_is_error(req, &state, &error)) {
-		if (state == TEVENT_REQ_TIMED_OUT) {
-			return true;
-		}
+	if (tevent_req_is_error(req, &state, &err)) {
+		tevent_req_received(req);
+		return false;
 	}
 
-	return false;
+	tevent_req_received(req);
+	return true;
 }
-
diff --git a/lib/replace/system/kerberos.h b/source3/lib/smbd_tevent_queue.h
similarity index 61%
copy from lib/replace/system/kerberos.h
copy to source3/lib/smbd_tevent_queue.h
index 636ce0f..c919958 100644
--- a/lib/replace/system/kerberos.h
+++ b/source3/lib/smbd_tevent_queue.h
@@ -1,14 +1,10 @@
-#ifndef _system_kerberos_h
-#define _system_kerberos_h
-
-/* 
+/*
    Unix SMB/CIFS implementation.
+   Infrastructure for async requests
+   Copyright (C) Volker Lendecke 2008
+   Copyright (C) Stefan Metzmacher 2009
 
-   kerberos system include wrappers
-
-   Copyright (C) Andrew Tridgell 2004
-
-     ** NOTE! The following LGPL license applies to the replace
+     ** NOTE! The following LGPL license applies to the tevent
      ** library. This does NOT imply that all of Samba is released
      ** under the LGPL
 
@@ -24,18 +20,15 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
-
 */
 
-#ifdef HAVE_KRB5
+/* Back-port of missing API from 4.2 for tevent_queues. */
 
-#if HAVE_KRB5_H
-#include <krb5.h>
-#endif
-
-#if HAVE_COM_ERR_H
-#include <com_err.h>
-#endif
+#ifndef _SMBD_TEVENT_QUEUE_H_
+#define _SMBD_TEVENT_QUEUE_H_
+struct tevent_req *smbd_tevent_queue_wait_send(TALLOC_CTX *mem_ctx,
+					  struct tevent_context *ev,
+					  struct tevent_queue *queue);
 
-#endif
+bool smbd_tevent_queue_wait_recv(struct tevent_req *req);
 #endif
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index b9945ac..a339a1d 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5467,7 +5467,7 @@ int lp_min_receive_file_size(void)
 	if (Globals.iminreceivefile < 0) {
 		return 0;
 	}
-	return MIN(Globals.iminreceivefile, BUFFER_SIZE);
+	return Globals.iminreceivefile;
 }
 
 /*******************************************************************
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 894f12c..7daff04 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1561,24 +1561,16 @@ static bool process_request_pdu(struct pipes_struct *p, struct ncacn_packet *pkt
 		}
 	}
 
-	if (pkt->pfc_flags & DCERPC_PFC_FLAG_LAST) {
-		bool ret = False;
-		/*
-		 * Ok - we finally have a complete RPC stream.
-		 * Call the rpc command to process it.
-		 */
-
-		/*
-		 * Process the complete data stream here.
-		 */
-		if (pipe_init_outgoing_data(p)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list