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

Karolin Seeger kseeger at samba.org
Mon Aug 13 15:26:02 UTC 2018


The branch, v4-8-test has been updated
       via  6f44ef8 s3/smbd: Ensure quota code is only called when quota support detected
       via  e93a716 systemd: Only start smb when network interfaces are up
       via  4b91f85 s3/utils: fix regression where specifying -Unetbios/root works
       via  807611f s3/smbd: allow set quota for non root user (when built with --enable-selftest)
       via  2162b45 s3/script/tests: Add simple (smb1 & smb2) get/set/list tests for smbcquotas
       via  6938ec9 s3/script/test: modify existing smbcquota test to use SMB2 in addition to SMB1.
       via  87bf244 s3/smbd: smb2 server implementation for query get/set info.
       via  aa7fb23 s3/smbd: adjust smb1 server to use idl structs and generated ndr push/pull funcs
       via  34208d3 s3/libsmb: adjust smb2 code for new idl structs & generated ndr push/pull funcs.
       via  f1e7ffd s3/libsmb: adjust smb1 cli code to use idl structs and ndr push/pull funcs.
       via  964626e librpc/idl Add some query [getset]info quota related structures
       via  d10a32c s3/smbd: Don't stat when doing a quota operation (as it's a fake file)
       via  f4a456a s3/libsmb: Avoid potential smbpanic calling parse_user_quota_list.
       via  acacc78 s3/lib: Fix misleading typo in debug message
       via  aeb57fe s3: smbd: Fix AIX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
       via  91c15b4 s3: smbd: Fix FreeBSD sendfile() for SMB2. Ensure we don't spin on EAGAIN.
       via  b21e833 s3: smbd: Fix HPUX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
       via  4e0c971 s3: smbd: Fix Solaris sendfile() for SMB2. Ensure we don't spin on EAGAIN.
       via  37e2ff7 s3: smbd: Fix Linux sendfile() for SMB2. Ensure we don't spin on EAGAIN.
       via  357d2b6 dns wildcards: fix BUG 13536
       via  a01a981 dns wildcards: tests to confirm BUG 13536
       via  25e23c2 s3: smbd: fix path check in smbd_smb2_create_durable_lease_check()
       via  a734876 s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
       via  a970d45 s3: libsmbclient: Fix cli_splice() fallback when reading less than a complete file.
       via  41302b4 s3: torture: Test SMB1 cli_splice() fallback path when doing a non-full file splice.
       via  a96f69a docs/vfs_ceph: add CTDB_SAMBA_SKIP_SHARE_CHECK=yes caveat
       via  3558765 vfs_ceph: don't lie about flock support
       via  2a54623 ldb: Refuse to build Samba against a newer minor version of ldb
       via  04a8995 samba-tool trust: support discovery via netr_GetDcName
       via  4b3ac37 s3:selftest: run rpc.lsa.lookupsids also with explicit [smb1] and [smb2]
       via  ecf9e20 s4:librpc: autonegotiate SMB1/2/3
       via  e9494f9 python/tests: use explicit "client ipc max protocol = NT1" for samba.tests.net_join_no_spnego
       via  94ab84f tests/auth_log: Permit SMB2 service description if empty binding is used for kerberos authentication
       via  5b60ffc s4:libcli: add smb_connect_nego_{send,recv}()
       via  dcaa67f s4:libcli: allow a fallback to NTLMSSP if SPNEGO is not supported locally
       via  3212bc7 s4:libcli: add fallback_to_anonymous to smb2_connect_send()
       via  2fd61b0 s4:libcli: allow passing an already negotiated connection to smb2_connect_send()
       via  2635c62 s4:libcli: split out smb2_connect_session_start()
       via  dbf268e s4:libcli: add smb2_transport_raw_init()
       via  1136ff2 s4:libcli: allow passing an already negotiated connection to smb_composite_connect()
       via  77ab463 s4:libcli: use talloc_zero() for struct smb_composite_connect in fetchfile.c
       via  19e65af s4:libcli: add smbcli_transport_raw_init()
       via  92b6b90 s4:libcli: split out smb_raw_negotiate_fill_transport()
       via  d23a1c1 librpc: add binding handle support for [smb1]
       via  b336179 s3: smbd: always set vuid in check_user_ok()
      from  c5680ba s3: smbd/durable: remove dev and inode check from vfs_default_durable_reconnect_check_stat()

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


- Log -----------------------------------------------------------------
commit 6f44ef8511490f9ad9f849c09aededf0f0b38dff
Author: Noel Power <noel.power at suse.com>
Date:   Tue Aug 7 11:06:34 2018 +0100

    s3/smbd: Ensure quota code is only called when quota support detected
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13563
    Signed-off-by: Noel Power <noel.power at suse.com>
    
    Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-8-test): Mon Aug 13 17:25:23 CEST 2018 on sn-devel-144

commit e93a716a98ff6e88cffb7167e8dc142c5d299ceb
Author: Oleksandr Natalenko <oleksandr at redhat.com>
Date:   Fri Aug 3 14:34:47 2018 +0200

    systemd: Only start smb when network interfaces are up
    
    For smb, if the smb.conf contains explicit bindings to the network
    interfaces, the service must wait till network interfaces are up,
    otherwise the service won't be operational.
    
    The 0e571054a61e commit and the BZ 13184 have fixed this for nmb and
    samba, so do exactly the same here, for smb.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13559
    
    Signed-off-by: Oleksandr Natalenko <oleksandr at redhat.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    (cherry picked from commit a3d248f284eb2e5f4fe886310e481b28c9f1c392)

commit 4b91f85260ef9f505e70f7e119c9760e68213e78
Author: Noel Power <noel.power at suse.com>
Date:   Thu Jun 28 16:04:24 2018 +0100

    s3/utils: fix regression where specifying -Unetbios/root works
    
    Usually you need to be root on a linux server to modify quotas. Even
    with a linux server joined to a windows AD you could always log in as
    local root with smbcquotas. However in recent builds this has changed.
    This patch fixes this
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Noel Power <npower at samba.org>
    Autobuild-Date(master): Tue Jul 31 19:45:59 CEST 2018 on sn-devel-144

commit 807611fe3bc9647e82feeb1d2b2d909fa35ad8ef
Author: Noel Power <noel.power at suse.com>
Date:   Wed Mar 22 20:06:13 2017 +0000

    s3/smbd: allow set quota for non root user (when built with --enable-selftest)
    
    Currently it appears you need to be root to set quotas, for test purposes
    this requirement needs to be relaxed.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2162b45bd27b0e2eaf73ffb71e085e61b76a973c
Author: Noel Power <noel.power at suse.com>
Date:   Tue Mar 21 08:29:59 2017 +0000

    s3/script/tests: Add simple (smb1 & smb2) get/set/list tests for smbcquotas
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6938ec995469a1b577a8781c33308fbf2bd5a669
Author: Noel Power <noel.power at suse.com>
Date:   Wed Mar 8 14:27:27 2017 +0000

    s3/script/test: modify existing smbcquota test to use SMB2 in addition to SMB1.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 87bf24407ab39941d7a827c982bbc13cd09e9321
Author: Noel Power <noel.power at suse.com>
Date:   Fri May 26 16:02:33 2017 +0100

    s3/smbd: smb2 server implementation for query get/set info.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit aa7fb239243db4d9b49a31d628aa9e705ebe49f8
Author: Noel Power <noel.power at suse.com>
Date:   Fri May 26 16:01:53 2017 +0100

    s3/smbd: adjust smb1 server to use idl structs and generated ndr push/pull funcs
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 34208d31bfd7150f6330315e3897b02a50fb8ea4
Author: Noel Power <noel.power at suse.com>
Date:   Fri May 26 15:50:18 2017 +0100

    s3/libsmb: adjust smb2 code for new idl structs & generated ndr push/pull funcs.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f1e7ffd833d2ccb4e87cccef88f336e4fe074c13
Author: Noel Power <noel.power at suse.com>
Date:   Fri May 26 15:01:17 2017 +0100

    s3/libsmb: adjust smb1 cli code to use idl structs and ndr push/pull funcs.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 964626ec57799216f24b54b429071acd75a3e862
Author: Noel Power <noel.power at suse.com>
Date:   Thu Mar 2 09:20:24 2017 +0000

    librpc/idl Add some query [getset]info quota related structures
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d10a32cf881049e0e949dd5236380b0758ab02da
Author: Noel Power <noel.power at suse.com>
Date:   Tue Feb 28 11:36:47 2017 +0000

    s3/smbd: Don't stat when doing a quota operation (as it's a fake file)
    
    calling SMB_VFS_STAT on the quota fake file fails and caused
    FS_INFO/FileFsControlInfo request to error out early, in turn stopped a
    Win8.1 client from proceeding with quota queries.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f4a456a969082d47c3c0d7ff5d881a6e8b883830
Author: Noel Power <noel.power at suse.com>
Date:   Tue Feb 28 15:04:16 2017 +0000

    s3/libsmb: Avoid potential smbpanic calling parse_user_quota_list.
    
    Calling parse_user_quota_list with a NULL buffer can cause a panic, while
    this shouldn't happen, I managed to trigger this with an early implementation
    of SMB2 quota support in smbd which didn't pass back NT_STATUS_NO_MORE_ENTRIES
    when handling a SMB2_0_INFO_QUOTA GETINFO message.
    OTHOH the Windows client handled the same situation gracefully.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit acacc78678b5a8442a49ac8f5730c5ebb6cb825c
Author: Noel Power <noel.power at suse.com>
Date:   Wed Mar 22 14:53:22 2017 +0000

    s3/lib: Fix misleading typo in debug message
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit aeb57feb6534819d4311929762795f0dd4a04d3f
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 18 15:49:29 2018 -0700

    s3: smbd: Fix AIX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
    
    For SMB2 the socket is set non-blocking. Ensure sendfile()
    calls complete if they return EAGAIN by saving the socket state,
    setting it blocking, doing the sendfile until completion and then
    restoring the socket state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13537
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Jul 20 15:14:24 CEST 2018 on sn-devel-144
    
    (cherry picked from commit 582ce5d6b599516d6d8d619529a2aa809139a175)

commit 91c15b49ced2c25ecc6e162223ae79eea0d3209e
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 18 15:44:34 2018 -0700

    s3: smbd: Fix FreeBSD sendfile() for SMB2. Ensure we don't spin on EAGAIN.
    
    For SMB2 the socket is set non-blocking. Ensure sendfile()
    calls complete if they return EAGAIN by saving the socket state,
    setting it blocking, doing the sendfile until completion and then
    restoring the socket state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13537
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 456e520a3be7e4b54f1f144324c3671b8f6e35ea)

commit b21e833e83281f58b734296e965c38aa676babdb
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 18 15:36:47 2018 -0700

    s3: smbd: Fix HPUX sendfile() for SMB2. Ensure we don't spin on EAGAIN.
    
    For SMB2 the socket is set non-blocking. Ensure sendfile()
    calls complete if they return EAGAIN by saving the socket state,
    setting it blocking, doing the sendfile until completion and then
    restoring the socket state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13537
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit d222caa449d9c00bb2dd9da6c79ea509960d47c6)

commit 4e0c9718b0fd02117e7e22b5d191c9750809c4ce
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 18 15:29:37 2018 -0700

    s3: smbd: Fix Solaris sendfile() for SMB2. Ensure we don't spin on EAGAIN.
    
    For SMB2 the socket is set non-blocking. Ensure sendfile()
    calls complete if they return EAGAIN by saving the socket state,
    setting it blocking, doing the sendfile until completion and then
    restoring the socket state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13537
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 16a587075c8c62c1160869358ca56a133e90247a)

commit 37e2ff724ed0c295c80ce0707596e3d0b3e70aa4
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 18 13:32:49 2018 -0700

    s3: smbd: Fix Linux sendfile() for SMB2. Ensure we don't spin on EAGAIN.
    
    For SMB2 the socket is set non-blocking. Ensure sendfile()
    calls complete if they return EAGAIN by saving the socket state,
    setting it blocking, doing the sendfile until completion and then
    restoring the socket state.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13537
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 809967b3eab7a1b48c186517701538ca93536246)

commit 357d2b658225825227c5d8ff35704e902c17cf01
Author: Gary Lockyer <gary at catalyst.net.nz>
Date:   Wed Jul 18 15:33:26 2018 +1200

    dns wildcards: fix BUG 13536
    
    The current position in the dns name was not advanced past the '.'
    character
    
    Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jul 20 04:40:31 CEST 2018 on sn-devel-144
    
    (cherry picked from commit cef1b31cd1f33074e8ab6de52aa0fb74e9b57a9f)

commit a01a98182a5d4eaeddd7b127b8beb5028f7b08b2
Author: Gary Lockyer <gary at catalyst.net.nz>
Date:   Wed Jul 18 15:29:21 2018 +1200

    dns wildcards: tests to confirm BUG 13536
    
    DNS wildcard matching failing if more than one label to the left of the
    wildcard. This commits adds tests to confirm the bug.
    
    Wildcard entry: *.example.org
    bar.example.com matches
    foo.bar.example.com does not, but it it should.
    
    Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 0d3aec18679a2637430263a55de5e210a9201e21)

commit 25e23c273c4c7c20cc297f04eaab8e9e8cad0bdb
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jul 17 15:40:04 2018 +0200

    s3: smbd: fix path check in smbd_smb2_create_durable_lease_check()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13535
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit e60e9368cb3cb512e2506620d814187a692108e0)

commit a734876315bc294da8a0d72988f6de92e99ee6e6
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Jul 17 15:56:05 2018 +0200

    s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13535
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 725319743f1f2de934cbde477ca84430f5b2b4b4)

commit a970d45d1774b5b55bea23488035ca44de0cb7f2
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jul 12 12:18:50 2018 -0700

    s3: libsmbclient: Fix cli_splice() fallback when reading less than a complete file.
    
    We were always asking for SPLICE_BLOCK_SIZE even when the
    remaining bytes we wanted were smaller than that. This works
    when using cli_splice() on a complete file, as the cli_read()
    terminated the read at the right place. We always have the
    space to read SPLICE_BLOCK_SIZE bytes so this isn't an overflow.
    
    Found by Bailey Berro <baileyberro at google.com>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13527
    
    Signed-off-by: Bailey Berro <baileyberro at google.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Fri Jul 13 14:57:14 CEST 2018 on sn-devel-144
    
    (cherry picked from commit c9656fd2977557ab20ec4e3d87c385a9b2f1bf43)

commit 41302b40301b410ca618c92df67394de51d6b1bc
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jul 12 12:15:12 2018 -0700

    s3: torture: Test SMB1 cli_splice() fallback path when doing a non-full file splice.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13527
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    (cherry picked from commit 1c8d1cceff852acaca4a0ec0da37b053ed03fe4a)
    (cherry picked from commit 49d6c3f061284aac31c3ef21f88f9d69bdd86bd8)
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jul 14 00:14:13 CEST 2018 on sn-devel-144

commit a96f69a346a4d7a46873c1d3d65d90578fdf15e6
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Jul 6 13:31:43 2018 +0200

    docs/vfs_ceph: add CTDB_SAMBA_SKIP_SHARE_CHECK=yes caveat
    
    Mostly copied from the vfs_gluster manpage: the CephFS share path is not
    locally mounted, which breaks the ctdb_check_directories_probe() check.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jul  6 23:19:02 CEST 2018 on sn-devel-144
    
    (cherry picked from commit 0cd44821f3889067620d685344c3eaf913a31329)

commit 35587653149f23144f3348cb4a86267d3c1bd807
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Jul 5 17:18:15 2018 +0200

    vfs_ceph: don't lie about flock support
    
    Instead, match vfs_gluster behaviour and require that users explicitly
    disable "kernel share modes".
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13506
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 926ae50627d536735cee9b3931ee35bc19060261)

commit 2a546235712bc475df1abd0f92c07dd656bb5338
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jul 12 12:34:56 2018 +1200

    ldb: Refuse to build Samba against a newer minor version of ldb
    
    Samba is not compatible with new versions of ldb (except release versions)
    
    Other users would not notice the breakages, but Samba makes many
    more assuptions about the LDB internals than any other package.
    
    (Specifically, LDB 1.2 and 1.4 broke builds against released
    Samba versions)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13519
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
    (cherry picked from commit 52efa796538ae004ca62ea32fc8c833472991be6)

commit 04a8995fd0b8fe4f9ab59e91b51b0d9bdf1a04c4
Author: Alexander Bokovoy <ab at samba.org>
Date:   Sat Feb 24 14:34:44 2018 +0200

    samba-tool trust: support discovery via netr_GetDcName
    
    In case a remote DC does not support netr_DsRGetDCNameEx2(),
    use netr_GetDcName() instead.
    
    This should help with FreeIPA where embedded smbd runs as a domain
    controller but does not implement full Active Directory compatibility.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13538
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Alexander Bokovoy <ab at samba.org>
    Autobuild-Date(master): Tue Jul 24 09:55:23 CEST 2018 on sn-devel-144
    
    (cherry picked from commit c390728819e73cefbf02e0d52d22805930f4c45b)

commit 4b3ac377a6e8aed03a8e8c478768a32bf6b78fba
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 19 07:34:11 2018 +0200

    s3:selftest: run rpc.lsa.lookupsids also with explicit [smb1] and [smb2]
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 6800077c5c57c257326573537d1f2bb7a8066149)

commit ecf9e20e8bf94cf476aeba425b3a554b15d0eee4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 16:55:33 2018 +0200

    s4:librpc: autonegotiate SMB1/2/3
    
    Windows Server 1709 defaults to SMB2 and does not have SMB1 enabled.
    When establishing trust, samba-tool does not specify SMB protocol
    version and fail by default.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 4422f7382aad3090cb959ade030a02bf4fef81ac)

commit e9494f9b096f6469a3ce0c5c628577ae7e011b96
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jul 23 00:17:35 2018 +0200

    python/tests: use explicit "client ipc max protocol = NT1" for samba.tests.net_join_no_spnego
    
    The tests rely on SMB1.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 802e43bf742e756896fa73fcd139feca9ae293dd)

commit 94ab84fff490bdcd96bc26e920c8813976869c54
Author: Alexander Bokovoy <ab at samba.org>
Date:   Thu Jul 19 14:07:39 2018 +0300

    tests/auth_log: Permit SMB2 service description if empty binding is used for kerberos authentication
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 70a9cf9ccfc4075cc08209191db1bce2c9b432fc)

commit 5b60ffce1812381fd8207aaa1af5d775391d8943
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 14:52:43 2018 +0200

    s4:libcli: add smb_connect_nego_{send,recv}()
    
    This can be used to create a connection up to a negotiated
    smbXcli_conn.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit e4910f35eab008a41cfcac3d97b3647c721ac679)

commit dcaa67ffa4d8e4dc311de683dc68922a2e343b08
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 19 23:04:33 2018 +0200

    s4:libcli: allow a fallback to NTLMSSP if SPNEGO is not supported locally
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 5188454bdce80f6e2bfc45deca18bd1b7289a7a6)

commit 3212bc7694cf8f683f436f129289671122cbf92f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 23:52:30 2018 +0200

    s4:libcli: add fallback_to_anonymous to smb2_connect_send()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit ca000d8901e6acb8a7c59d26d4f75c9d92bafece)

commit 2fd61b0e8645a832aeb963b8f437f279f7eaa735
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 16:44:16 2018 +0200

    s4:libcli: allow passing an already negotiated connection to smb2_connect_send()
    
    It will just do the session setup and tree connect steps.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit f20e607c15b4c8ae56ade5d7e68d832542a2cd5e)

commit 2635c62553bdc59bf646a958226ea523eb610a16
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 16:43:32 2018 +0200

    s4:libcli: split out smb2_connect_session_start()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 5ad5b81b6ef601596583b4ad7d6a14241fa99a71)

commit dbf268e6e62d758f0ee9aec0ca758303fe10a240
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 16:43:04 2018 +0200

    s4:libcli: add smb2_transport_raw_init()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit ce2248c4b5aad2d00155a2e77b3e6340ce824979)

commit 1136ff225fb021c39d9752bb06cbf397a1a0439a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 15:34:55 2018 +0200

    s4:libcli: allow passing an already negotiated connection to smb_composite_connect()
    
    It will just do the session setup and tree connect steps.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 2b68f9b8b0dd944fa89b9e0037886ddd4fb4e5f9)

commit 77ab463cba24482c049b6977fec82917f68b569a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 15:01:50 2018 +0200

    s4:libcli: use talloc_zero() for struct smb_composite_connect in fetchfile.c
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 87d73397f9a9dee8fa0055a2ff08244b2c85e120)

commit 19e65aff16bf57ab007ab101bc6094ab54123f01
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 15:36:52 2018 +0200

    s4:libcli: add smbcli_transport_raw_init()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit b7e99c2571e31971a6d7f1898e7458c16dc1031e)

commit 92b6b9098c510de1b7e4e4183b2b3dda8ca45eab
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 18 15:36:31 2018 +0200

    s4:libcli: split out smb_raw_negotiate_fill_transport()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 17b12a9b9a9dfd859679de77aa0c7ffbc782f1bc)

commit d23a1c1ff8279bdfce7ee48ecca2e6862690448a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 19 07:32:08 2018 +0200

    librpc: add binding handle support for [smb1]
    
    This will be used to force smb1.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    (cherry picked from commit 062b518cabd9fb5f72f96cdf400c978c0b844619)

commit b336179c60631b26da6b0ea5472d919c990c1198
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Mar 22 08:03:58 2018 +0100

    s3: smbd: always set vuid in check_user_ok()
    
    A SMB session reauth will have invalidated conn->vuid via
    conn_clear_vuid_caches().
    
    Ensure conn->vuid always has the vuid of the current user in
    check_user_ok().
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13351
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Thu Mar 22 18:26:04 CET 2018 on sn-devel-144
    
    (cherry picked from commit 42d6dd2f30b6c3b3176bd1f378422a2eb62b1008)

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

Summary of changes:
 docs-xml/manpages/vfs_ceph.8.xml                   |  19 +
 lib/ldb/wscript                                    |  32 +-
 librpc/idl/quota.idl                               |  54 ++
 librpc/idl/wscript_build                           |   1 +
 librpc/rpc/binding.c                               |   1 +
 librpc/rpc/rpc_common.h                            |   2 +
 librpc/wscript_build                               |   5 +
 packaging/systemd/smb.service.in                   |   3 +-
 python/samba/netcmd/domain.py                      |  26 +-
 python/samba/tests/auth_log.py                     |  28 +-
 python/samba/tests/dns_wildcard.py                 |  48 ++
 python/samba/tests/net_join_no_spnego.py           |   2 +
 selftest/target/Samba3.pm                          |   9 +
 source3/lib/sendfile.c                             | 293 ++++++++-
 source3/lib/sysquotas.c                            |   2 +-
 source3/libsmb/cli_smb2_fnum.c                     |  94 ++-
 source3/libsmb/cliquota.c                          | 392 ++++++------
 source3/libsmb/clireadwrite.c                      |   4 +-
 source3/libsmb/proto.h                             |   6 +
 source3/modules/vfs_ceph.c                         |  11 +-
 source3/script/tests/getset_quota.py               | 154 +++++
 source3/script/tests/test_dfree_quota.sh           |  14 +-
 source3/script/tests/test_smbcquota.py             | 244 ++++++++
 .../script/tests/test_smbcquota.sh                 |  42 +-
 source3/selftest/tests.py                          |   8 +-
 source3/smbd/nttrans.c                             | 661 ++++++++++++---------
 source3/smbd/proto.h                               |  14 +
 source3/smbd/smb2_create.c                         |  16 +-
 source3/smbd/smb2_getinfo.c                        |  87 ++-
 source3/smbd/smb2_setinfo.c                        |  41 ++
 source3/smbd/trans2.c                              |   3 +-
 source3/smbd/uid.c                                 |   2 +
 source3/torture/torture.c                          | 153 +++++
 source3/utils/smbcquotas.c                         |   3 +-
 source3/wscript_build                              |   2 +
 source4/dns_server/dnsserver_common.c              |   1 +
 source4/libcli/raw/clitransport.c                  |  44 ++
 source4/libcli/raw/clitree.c                       |   1 +
 source4/libcli/raw/rawnegotiate.c                  |  74 ++-
 source4/libcli/smb2/connect.c                      |  69 ++-
 source4/libcli/smb2/session.c                      |  35 +-
 source4/libcli/smb2/transport.c                    |  35 ++
 source4/libcli/smb_composite/connect.c             |  48 +-
 source4/libcli/smb_composite/connect_nego.c        | 209 +++++++
 source4/libcli/smb_composite/fetchfile.c           |   2 +-
 source4/libcli/smb_composite/smb_composite.h       |  23 +
 source4/libcli/wscript_build                       |  20 +-
 source4/librpc/rpc/dcerpc_connect.c                | 257 ++++----
 source4/ntvfs/cifs/vfs_cifs.c                      |   1 +
 source4/torture/smb2/durable_v2_open.c             |  11 +-
 50 files changed, 2538 insertions(+), 768 deletions(-)
 create mode 100644 librpc/idl/quota.idl
 create mode 100755 source3/script/tests/getset_quota.py
 create mode 100755 source3/script/tests/test_smbcquota.py
 copy python/samba/tests/policy.py => source3/script/tests/test_smbcquota.sh (52%)
 mode change 100644 => 100755
 create mode 100644 source4/libcli/smb_composite/connect_nego.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_ceph.8.xml b/docs-xml/manpages/vfs_ceph.8.xml
index 453030e..453052e 100644
--- a/docs-xml/manpages/vfs_ceph.8.xml
+++ b/docs-xml/manpages/vfs_ceph.8.xml
@@ -62,7 +62,26 @@
 	<programlisting>
 		<smbconfsection name="[share]"/>
 		<smbconfoption name="vfs objects">ceph</smbconfoption>
+		<smbconfoption name="path">/non-mounted/cephfs/path</smbconfoption>
+		<smbconfoption name="kernel share modes">no</smbconfoption>
 	</programlisting>
+
+	<para>
+		Since <command>vfs_ceph</command> does not require a filesystem
+		mount, the share <command>path</command> is treated differently:
+		it is interpreted as an absolute path within the Ceph filesystem
+		on the attached Ceph cluster.
+		In a ctdb cluster environment where ctdb manages Samba,
+		<command>CTDB_SAMBA_SKIP_SHARE_CHECK=yes</command> must be
+		configured to disable local share path checks, otherwise ctdb
+		will not reach a healthy state.
+	</para>
+
+	<para>
+		Note that currently <command>kernel share modes</command> have
+		to be disabled in a share running with the CephFS vfs module for
+		file serving to work properly.
+	</para>
 </refsect1>
 
 <refsect1>
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 2477885..15a7cae 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -63,23 +63,33 @@ def configure(conf):
     conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
 
     if not conf.env.standalone_ldb:
+        max_ldb_version = [int(x) for x in VERSION.split(".")]
+        max_ldb_version[2] = 999
+        max_ldb_version_dots = "%d.%d.%d" % tuple(max_ldb_version)
+
         if conf.env.disable_python:
-            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
-                                         onlyif='talloc tdb tevent',
-                                         implied_deps='replace talloc tdb tevent'):
+            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
+                                             minversion=VERSION,
+                                             maxversion=max_ldb_version_dots,
+                                             onlyif='talloc tdb tevent',
+                                             implied_deps='replace talloc tdb tevent'):
                 conf.define('USING_SYSTEM_LDB', 1)
         else:
             using_system_pyldb_util = True
-            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION,
-                                             onlyif='talloc tdb tevent',
-                                             implied_deps='replace talloc tdb tevent ldb'):
+            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util',
+                                                 minversion=VERSION,
+                                                 maxversion=max_ldb_version_dots,
+                                                 onlyif='talloc tdb tevent',
+                                                 implied_deps='replace talloc tdb tevent ldb'):
                 using_system_pyldb_util = False
 
             # We need to get a pyldb-util for all the python versions
             # we are building for
             if conf.env['EXTRA_PYTHON']:
                 name = 'pyldb-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
-                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
+                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name,
+                                                     minversion=VERSION,
+                                                     maxversion=max_ldb_version_dots,
                                                      onlyif='talloc tdb tevent',
                                                      implied_deps='replace talloc tdb tevent ldb'):
                     using_system_pyldb_util = False
@@ -87,9 +97,11 @@ def configure(conf):
             if using_system_pyldb_util:
                 conf.define('USING_SYSTEM_PYLDB_UTIL', 1)
 
-            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
-                                         onlyif='talloc tdb tevent pyldb-util',
-                                         implied_deps='replace talloc tdb tevent'):
+            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
+                                             minversion=VERSION,
+                                             maxversion=max_ldb_version_dots,
+                                             onlyif='talloc tdb tevent pyldb-util',
+                                             implied_deps='replace talloc tdb tevent'):
                 conf.define('USING_SYSTEM_LDB', 1)
 
     if conf.CONFIG_SET('USING_SYSTEM_LDB'):
diff --git a/librpc/idl/quota.idl b/librpc/idl/quota.idl
new file mode 100644
index 0000000..7c4d00a
--- /dev/null
+++ b/librpc/idl/quota.idl
@@ -0,0 +1,54 @@
+#include "idl_types.h"
+
+import "security.idl";
+
+[
+	pointer_default(unique)
+]
+
+interface file_quota {
+
+	/* MS-FSCC 2.4.33.1 */
+	typedef [public] struct {
+		uint32 next_entry_offset;
+		uint32 sid_length;
+		dom_sid sid;
+	} file_get_quota_info;
+
+	/* MS-FSCC 2.4.33 */
+	typedef [public] struct {
+		uint32 next_entry_offset;
+		uint32 sid_length;
+		hyper change_time;
+		hyper quota_used;
+		hyper quota_threshold;
+		hyper quota_limit;
+		dom_sid sid;
+	} file_quota_information;
+}
+
+interface smb2_query_quoata
+{
+	/* MS-SMB2 2.2.37.1 */
+	typedef [public] struct {
+		uint8 return_single;
+		uint8 restart_scan;
+		uint16 reserved;
+		uint32 sid_list_length;
+		uint32 start_sid_length;
+		uint32 start_sid_offset;
+	} smb2_query_quota_info;
+}
+
+interface smb1_nt_transact_query_quota
+{
+	/* MS-SMB 2.2.7.5.1 */
+	typedef [public] struct {
+		uint16 fid;
+		uint8 return_single_entry;
+		uint8 restart_scan;
+		uint32 sid_list_length;
+		uint32 start_sid_length;
+		uint32 start_sid_offset;
+	} nttrans_query_quota_params;
+}
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index 75eba7d..f1588cd 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -38,6 +38,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     fsrvp_state.idl
                     cab.idl
                     nfs4acl.idl
+                    quota.idl
                     ''',
                     options='--header --ndr-parser',
                     output_dir='../gen_ndr')
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index 63ba682..aa8cc6b 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -103,6 +103,7 @@ static const struct ncacn_option {
 	{"print", DCERPC_DEBUG_PRINT_BOTH},
 	{"padcheck", DCERPC_DEBUG_PAD_CHECK},
 	{"bigendian", DCERPC_PUSH_BIGENDIAN},
+	{"smb1", DCERPC_SMB1},
 	{"smb2", DCERPC_SMB2},
 	{"ndr64", DCERPC_NDR64},
 	{"packet", DCERPC_PACKET},
diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h
index d6b2d5d..cdc9fe8 100644
--- a/librpc/rpc/rpc_common.h
+++ b/librpc/rpc/rpc_common.h
@@ -108,6 +108,8 @@ struct dcerpc_binding;
 
 #define DCERPC_PACKET			(1<<26)
 
+#define DCERPC_SMB1                    (1<<27)
+
 /* The following definitions come from ../librpc/rpc/dcerpc_error.c  */
 
 const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code);
diff --git a/librpc/wscript_build b/librpc/wscript_build
index c4b647c..0711b8b 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -399,6 +399,11 @@ bld.SAMBA_SUBSYSTEM('NDR_SMB2_LEASE_STRUCT',
     public_headers='gen_ndr/smb2_lease_struct.h'
     )
 
+bld.SAMBA_SUBSYSTEM('NDR_QUOTA',
+    source='gen_ndr/ndr_quota.c',
+    public_deps='ndr',
+    )
+
 bld.SAMBA_SUBSYSTEM('NDR_SCHANNEL',
     source='ndr/ndr_schannel.c gen_ndr/ndr_schannel.c',
     public_deps='ndr ndr_nbt'
diff --git a/packaging/systemd/smb.service.in b/packaging/systemd/smb.service.in
index dcaf7ef..18912ef 100644
--- a/packaging/systemd/smb.service.in
+++ b/packaging/systemd/smb.service.in
@@ -1,7 +1,8 @@
 [Unit]
 Description=Samba SMB Daemon
 Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
-After=network.target nmb.service winbind.service
+Wants=network-online.target
+After=network.target network-online.target nmb.service winbind.service
 
 [Service]
 Type=notify
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 2cb14f1..38c800c 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -1824,6 +1824,15 @@ class DomainTrustCommand(Command):
 
         return (policy, info)
 
+    def get_netlogon_dc_unc(self, conn, server, domain):
+        try:
+            info = conn.netr_DsRGetDCNameEx2(server,
+                                             None, 0, None, None, None,
+                                             netlogon.DS_RETURN_DNS_NAME)
+            return info.dc_unc
+        except RuntimeError:
+            return conn.netr_GetDcName(server, domain)
+
     def get_netlogon_dc_info(self, conn, server):
         info = conn.netr_DsRGetDCNameEx2(server,
                                          None, 0, None, None, None,
@@ -2458,7 +2467,8 @@ class cmd_domain_trust_create(DomainTrustCommand):
                 raise self.RemoteRuntimeError(self, error, "failed to connect netlogon server")
 
             try:
-                remote_netlogon_info = self.get_netlogon_dc_info(remote_netlogon, remote_server)
+                remote_netlogon_dc_unc = self.get_netlogon_dc_unc(remote_netlogon,
+                                                                  remote_server, domain)
             except RuntimeError as error:
                 raise self.RemoteRuntimeError(self, error, "failed to get netlogon dc info")
 
@@ -2608,9 +2618,9 @@ class cmd_domain_trust_create(DomainTrustCommand):
                         # this triggers netr_GetForestTrustInformation to our domain.
                         # and lsaRSetForestTrustInformation() remotely, but new top level
                         # names are disabled by default.
-                        remote_forest_info = remote_netlogon.netr_DsRGetForestTrustInformation(remote_netlogon_info.dc_unc,
-                                                                      local_lsa_info.dns_domain.string,
-                                                                      netlogon.DS_GFTI_UPDATE_TDO)
+                        remote_forest_info = remote_netlogon.netr_DsRGetForestTrustInformation(remote_netlogon_dc_unc,
+                                                                                               local_lsa_info.dns_domain.string,
+                                                                                               netlogon.DS_GFTI_UPDATE_TDO)
                     except RuntimeError as error:
                         raise self.RemoteRuntimeError(self, error, "netr_DsRGetForestTrustInformation() failed")
 
@@ -2661,10 +2671,10 @@ class cmd_domain_trust_create(DomainTrustCommand):
                 if remote_trust_info.trust_direction & lsa.LSA_TRUST_DIRECTION_OUTBOUND:
                     self.outf.write("Validating incoming trust...\n")
                     try:
-                        remote_trust_verify = remote_netlogon.netr_LogonControl2Ex(remote_netlogon_info.dc_unc,
-                                                                      netlogon.NETLOGON_CONTROL_TC_VERIFY,
-                                                                      2,
-                                                                      local_lsa_info.dns_domain.string)
+                        remote_trust_verify = remote_netlogon.netr_LogonControl2Ex(remote_netlogon_dc_unc,
+                                                                                   netlogon.NETLOGON_CONTROL_TC_VERIFY,
+                                                                                   2,
+                                                                                   local_lsa_info.dns_domain.string)
                     except RuntimeError as error:
                         raise self.RemoteRuntimeError(self, error, "NETLOGON_CONTROL_TC_VERIFY failed")
 
diff --git a/python/samba/tests/auth_log.py b/python/samba/tests/auth_log.py
index 6b032a8..6233228 100644
--- a/python/samba/tests/auth_log.py
+++ b/python/samba/tests/auth_log.py
@@ -33,6 +33,7 @@ from samba.credentials import Credentials, DONT_USE_KERBEROS, MUST_USE_KERBEROS
 from samba import NTSTATUSError
 from subprocess import call
 from ldb import LdbError
+import re
 
 class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
 
@@ -71,6 +72,20 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
         messages = self.waitForMessages(isLastExpectedMessage, x)
         checkFunction(messages, authTypes, service, binding, protection)
 
+    def _assert_ncacn_np_serviceDescription(self, binding, serviceDescription):
+        # Turn "[foo,bar]" into a list ("foo", "bar") to test
+        # lambda x: x removes anything that evaluates to False,
+        # including empty strings, so we handle "" as well
+        binding_list = filter(lambda x: x, re.compile('[\[,\]]').split(binding))
+
+        # Handle explicit smb2, smb1 or auto negotiation
+        if "smb2" in binding_list:
+            self.assertEquals(serviceDescription, "SMB2")
+        elif "smb1" in binding_list:
+            self.assertEquals(serviceDescription, "SMB")
+        else:
+            self.assertIn(serviceDescription, ["SMB", "SMB2"])
+
     def rpc_ncacn_np_ntlm_check(self, messages, authTypes, service,
                                 binding, protection):
 
@@ -83,14 +98,14 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
         msg = messages[0]
         self.assertEquals("Authentication", msg["type"])
         self.assertEquals("NT_STATUS_OK", msg["Authentication"]["status"])
-        self.assertEquals("SMB",
-                           msg["Authentication"]["serviceDescription"])
+        self._assert_ncacn_np_serviceDescription(binding,
+                          msg["Authentication"]["serviceDescription"])
         self.assertEquals(authTypes[1], msg["Authentication"]["authDescription"])
 
         # Check the second message it should be an Authorization
         msg = messages[1]
         self.assertEquals("Authorization", msg["type"])
-        self.assertEquals("SMB",
+        self._assert_ncacn_np_serviceDescription(binding,
                           msg["Authorization"]["serviceDescription"])
         self.assertEquals(authTypes[2], msg["Authorization"]["authType"])
         self.assertEquals("SMB", msg["Authorization"]["transportProtection"])
@@ -139,12 +154,7 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
         # Check the third message it should be an Authorization
         msg = messages[2]
         self.assertEquals("Authorization", msg["type"])
-        serviceDescription = "SMB"
-        print "binding %s" % binding
-        if binding == "[smb2]":
-            serviceDescription = "SMB2"
-
-        self.assertEquals(serviceDescription,
+        self._assert_ncacn_np_serviceDescription(binding,
                           msg["Authorization"]["serviceDescription"])
         self.assertEquals(authTypes[3], msg["Authorization"]["authType"])
         self.assertEquals("SMB", msg["Authorization"]["transportProtection"])
diff --git a/python/samba/tests/dns_wildcard.py b/python/samba/tests/dns_wildcard.py
index ca8426a..01e06b8 100644
--- a/python/samba/tests/dns_wildcard.py
+++ b/python/samba/tests/dns_wildcard.py
@@ -172,6 +172,30 @@ class TestWildCardQueries(DNSTest):
         self.assertEquals(response.answers[0].rr_type, dns.DNS_QTYPE_A)
         self.assertEquals(response.answers[0].rdata, WILDCARD_IP)
 
+    def test_one_a_query_match_wildcard_2_labels(self):
+        """ Query an A record, should match the wild card entry
+            have two labels to the left of the wild card target.
+        """
+
+        p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+        questions = []
+
+        # Check the record
+        name = "label2.label1.wildcardtest.%s" % self.get_dns_domain()
+        q = self.make_name_question(name,
+                                    dns.DNS_QTYPE_A,
+                                    dns.DNS_QCLASS_IN)
+        questions.append(q)
+
+        self.finish_name_packet(p, questions)
+        (response, response_packet) =\
+            self.dns_transaction_udp(p, host=self.server_ip)
+        self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK)
+        self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
+        self.assertEquals(response.ancount, 1)
+        self.assertEquals(response.answers[0].rr_type, dns.DNS_QTYPE_A)
+        self.assertEquals(response.answers[0].rdata, WILDCARD_IP)
+
     def test_one_a_query_wildcard_entry(self):
         "Query the wildcard entry"
 
@@ -239,6 +263,30 @@ class TestWildCardQueries(DNSTest):
         self.assertEquals(response.answers[0].rr_type, dns.DNS_QTYPE_A)
         self.assertEquals(response.answers[0].rdata, LEVEL2_WILDCARD_IP)
 
+    def test_one_a_query_match_wildcard_l2_2_labels(self):
+        """Query an A record, should match the level 2 wild card entry
+           have two labels to the left of the wild card target
+        """
+
+        p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+        questions = []
+
+        # Check the record
+        name = "label1.label2.level2.wildcardtest.%s" % self.get_dns_domain()
+        q = self.make_name_question(name,
+                                    dns.DNS_QTYPE_A,
+                                    dns.DNS_QCLASS_IN)
+        questions.append(q)
+
+        self.finish_name_packet(p, questions)
+        (response, response_packet) =\
+            self.dns_transaction_udp(p, host=self.server_ip)
+        self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK)
+        self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
+        self.assertEquals(response.ancount, 1)
+        self.assertEquals(response.answers[0].rr_type, dns.DNS_QTYPE_A)
+        self.assertEquals(response.answers[0].rdata, LEVEL2_WILDCARD_IP)
+
     def test_one_a_query_exact_match_l2(self):
         """Query an entry that matches the wild card but has an exact match as
          well.
diff --git a/python/samba/tests/net_join_no_spnego.py b/python/samba/tests/net_join_no_spnego.py
index 09a2856..0f45913 100644
--- a/python/samba/tests/net_join_no_spnego.py
+++ b/python/samba/tests/net_join_no_spnego.py
@@ -42,6 +42,7 @@ class NetJoinNoSpnegoTests(samba.tests.TestCaseInTempDir):
         super(NetJoinNoSpnegoTests, self).tearDown()
 
     def test_net_join_no_spnego(self):
+        self.lp.set("client ipc max protocol", "NT1")
         self.lp.set("client use spnego", "no")
         netbios_name = "NetJoinNoSpnego"
         machinepass  = "abcdefghij"
@@ -65,6 +66,7 @@ class NetJoinNoSpnegoTests(samba.tests.TestCaseInTempDir):
         self.fail("Shoud have rejected NTLMv2 without SPNEGO")
 
     def test_net_join_no_spnego_ntlmv1(self):
+        self.lp.set("client ipc max protocol", "NT1")
         self.lp.set("client use spnego", "no")
         self.lp.set("client ntlmv2 auth", "no")
         netbios_name = "NetJoinNoSpnego"
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 7b0303a..1ee5242 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -866,6 +866,9 @@ sub setup_fileserver($$)
 	push(@dirs, "$dfree_share_dir/subdir2");
 	push(@dirs, "$dfree_share_dir/subdir3");
 
+	my $quotadir_dir="$share_dir/quota";
+	push(@dirs, $quotadir_dir);
+
 	my $valid_users_sharedir="$share_dir/valid_users";
 	push(@dirs,$valid_users_sharedir);
 
@@ -892,6 +895,8 @@ sub setup_fileserver($$)
 	usershare allow guests = yes
 	usershare prefix allow list = $usershare_sharedir
 
+	get quota command = $prefix_abs/getset_quota.py
+	set quota command = $prefix_abs/getset_quota.py
 [lowercase]
 	path = $lower_case_share_dir
 	comment = smb username is [%U]
@@ -2151,6 +2156,10 @@ sub provision($$$$$$$$$)
 	vfs objects = acl_xattr fake_acls xattr_tdb fake_dfq
 	inherit owner = yes
 	include = $dfqconffile
+[quotadir]
+	path = $shrdir/quota
+	admin users = $unix_name
+
 [acl_xattr_ign_sysacl_posix]
 	copy = tmp
 	acl_xattr:ignore system acls = yes
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index 3d457bd..d3effaf 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -24,6 +24,7 @@
  */
 
 #include "includes.h"
+#include "system/filesys.h"
 
 #if defined(LINUX_SENDFILE_API)
 
@@ -36,8 +37,10 @@
 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count)
 {
 	size_t total=0;
-	ssize_t ret;
+	ssize_t ret = -1;
 	size_t hdr_len = 0;
+	int old_flags = 0;
+	bool socket_flags_changed = false;
 
 	/*
 	 * Send the header first.
@@ -48,8 +51,25 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset
 		hdr_len = header->length;
 		while (total < hdr_len) {
 			ret = sys_send(tofd, header->data + total,hdr_len - total, MSG_MORE);
-			if (ret == -1)
-				return -1;
+			if (ret == -1) {
+				if (errno == EAGAIN || errno == EWOULDBLOCK) {
+					/*
+					 * send() must complete before we can
+					 * send any other outgoing data on the
+					 * socket. Ensure socket is in blocking
+					 * mode. For SMB2 by default the socket
+					 * is in non-blocking mode.
+					 */


-- 
Samba Shared Repository



More information about the samba-cvs mailing list