[SCM] Samba Shared Repository - branch v3-6-stable updated

Karolin Seeger kseeger at samba.org
Mon Oct 29 03:18:05 MDT 2012


The branch, v3-6-stable has been updated
       via  951e583 WHATSNEW: Finish release notes for Samba 3.6.9.
       via  47a6b76 libcli/smb: fix unitialized padding in smb2_create_blob_push_one() (bug #9209)
       via  ddf3b7e WHATSNEW: Start to add changes since 3.6.8.
       via  3618a49 lib-addns: ensure that allocated buffer are pre set to 0 (bug #9259)
       via  00281ad Remove useless bool "upper_case_domain" parameter from ntv2_owf_gen().
       via  8dbe390 Remove useless bool "upper_case_domain" parameter. (cherry picked from commit cbdf6c5c5135ce7d14ceff5d12b99428f4285e13) (cherry picked from commit 39e5641f2a8a48817492c9d5204ffbeccf66f8ec)
       via  242c812 Move uppercasing the domain out of smb_pwd_check_ntlmv2()
       via  01fb1b6 s3-libsmb: Initialise ticket to ensure we do not invalid memory
       via  2b4bb1b s3-printing: Increase debug level for info that the db is empty.
       via  b1e004b packaging: Add support for reloading systemd services.
       via  fc7d446 autoconf: fix --with(out)-sendfile-support option handling
       via  275d10a libreplace: Bug 8107, Fix poll replacement to become a msleep replacement
       via  3597056 replace: add some includes for poll.h
       via  6c47e8c Correct fix for bug #9222 - smbd ignores the "server signing = no" setting for SMB2.
       via  638b744 s3fs-printing: Fix RAW printing for normal users.
       via  3a2d8c7 s3: Add two tests a CLEAR_IF_FIRST crash
       via  b10e2ae tdb: Make tdb robust against improper CLEAR_IF_FIRST restart
       via  fb7e362 tdb: Make robust against shrinking tdbs
       via  5e1962d When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries. (cherry picked from commit 6575d1d34fee45c7a965c7c9641cc52b566a9e7f)
       via  a85906b Only apply masks on non-default ACL entries when setting the ACL. (cherry picked from commit f163bcd18f80b8ac1add96c93964fa02c08a4615)
       via  741b8dd Use is_default_acl variable in canonicalise_acl(). (cherry picked from commit 82e7132bdf7c9d4ddead3cd5d845bfe68b93448b) (cherry picked from commit e8533833c2a138a54b7583f57187ee9e68b2e3cd)
       via  04352a3 Reformat spacing to be even. (cherry picked from commit efb446a38cca448855977666499603d12e1477b4) (cherry picked from commit 9b40fd8893584884ec282605b8c5481b089a43f1)
       via  df6d41f html docs: Remove link to Using Samba.
       via  2e0e116 s3:quota: don't force the block size to 512
       via  fc55340 Fix net rpc share allowedusers to work with 2008r2
       via  87436d7 s3-smbd: Move housekeeping to the background process.
       via  58bb6b5 Fix service control for non-internal services.
       via  1c19ef7 s3:selftest: run the posix_s3.smb2.oplock tests
       via  8f878d4 s4:torture/smb2: remove samba specific stuff from smb2.oplock
       via  c92747f s3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug #9196)
       via  758652e s3:selftest: mark the driver_info_winreg tests knownfail.
       via  14d59e1 Fix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.
       via  f5ae308 libcli/smb: fix padding in smb2_create_blob*
       via  5701906 s3-smbd: Don't segfault if user specified ports out for range.
       via  669eb48 Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
       via  c403b54 selftest: we fail samba3.smb2.compound.interim2
       via  aa530fc s4:torture:smb2:compound: remove two unused macros (cherry picked from commit 6f6b1c6ac15f225978e8c2d67c1a817d9e098317)
       via  9dcd8be s4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8 (cherry picked from commit 8df0b023c51ed198d3054760447e1b273eada991)
       via  ee30b34 s4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8 (cherry picked from commit 917e714831178b2a3d07c7f9d09711231a7ccf31)
       via  f0fce58 s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()
       via  4671cb4 s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()
       via  1f9e5e5 s4:torture:smb2: extend the compound.invalid1 test
       via  92285f2 s3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()
       via  448960d s3:smbd:smb2: add check for session_status for compound requests (cherry picked from commit 27d38b5c27bd96d5124c175d946718bf0836b8f4)
       via  17615ca s3:smb2_server: do the req->next_status check before the signing checks
       via  941787c s3:smb2_server: reset req->last_session_id and req->last_tid after using it
       via  c7e2411 s4:torture:smb2: fix the compound.invalid3 test to work against windows (cherry picked from commit bd8d50b451ea7f94efa7777fbe5dc0c2c19f6bf9)
       via  93e3cce s4:torture:smb2: fix compound.related3 test to work against windows (cherry picked from commit 8e525a29a7c6512f61e4647ecb2e0771e2019a49)
       via  06b99de s3: Compound requests should continue processing.
       via  b845f8b s4:torture/smb2: fix compound.invalid2 against windows
       via  b774e35 Fix bug #9016 - Connection to outbound trusted domain goes offline.
       via  1602ec2 s3-spoolss: Fix builtin forms order to match Windows again.
       via  5d6783c Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
       via  c917572 Add some const to can_delete_file_in_directory(). (cherry picked from commit 0a1f8e7de939c7eb71cfa8cc8f8eef4800d00b78)
       via  4976f91 quota: add supprt for gfs2
       via  72565ed pam_winbind: match more return codes when wbcGetPwnam has failed.
       via  162e33b s3-docs: Remove non-existent option from winbindd manpage.
       via  7c009c3 s3: Fix idmap_hash
       via  4a1f497 Fix bug #9174: Empty SPNEGO packet can cause smbd to crash.
       via  43a213b RHEL packaging: Try to fix makerpms.sh on RHEL.
       via  61bdc8f configure: fix wrong test == syntax
       via  203de50 s3-rap: Open printers with the right access mask.
       via  4caa92d nsswitch: fix crash on null pam change pw response
       via  606a56e Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP
      from  f77c137 WHATSNEW: Start release notes for Samba 3.6.9.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-stable


- Log -----------------------------------------------------------------
commit 951e58303646fc0eb3360b0865631b6c96b6959f
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Oct 29 10:03:56 2012 +0100

    WHATSNEW: Finish release notes for Samba 3.6.9.
    
    Karolin
    (cherry picked from commit e86f5e4e864aa0d6a72f11c94e3cfe9c19eaeb9a)

commit 47a6b76f05ae8cce0506bb6ae0d2912bda11c1e4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Oct 27 08:11:14 2012 +0200

    libcli/smb: fix unitialized padding in smb2_create_blob_push_one() (bug #9209)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Sat Oct 27 10:05:22 CEST 2012 on sn-devel-104
    (cherry picked from commit 2b4672f2d30c01a4767acf660ddb061676c59908)
    (cherry picked from commit 3641ba3d1e57d366fd3cad0e142fd21db30a68de)

commit ddf3b7edfd5a5242cf4f06b650cd5508703fabed
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Oct 22 12:48:50 2012 +0200

    WHATSNEW: Start to add changes since 3.6.8.
    
    To be continued.
    
    Karolin
    (cherry picked from commit f5f6d9eef32f696fe8aa3938df52901dcb9dc785)

commit 3618a49c8c1c934701eabb7031c76db8aea50aed
Author: Matthieu Patou <mat at matws.net>
Date:   Thu Sep 27 01:22:57 2012 -0700

    lib-addns: ensure that allocated buffer are pre set to 0 (bug #9259)
    
    It avoid bugs when one of the buffer is supposed to contain a string
    that is not null terminated (ie. label->label) and that we don't force
    the last byte to 0.
    (similar to commit 03c4dceaab82ca2c60c9ce0e09fddd071f98087b)
    (cherry picked from commit 1ecbacc354fff78c51c24cc08072881bb3f10d2b)

commit 00281ad9f67459a47d06a6eab64d9157be0638fe
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 23 16:02:09 2012 -0700

    Remove useless bool "upper_case_domain" parameter from ntv2_owf_gen().
    
    The code in SMBNTLMv2encrypt_hash() should not be requesting case
    changes on the domain name.
    (cherry picked from commit c47183b337d996640f009d133d47f90c153acd56)
    
    The last 3 patches address bug #9117 - smbclient can't connect to a Windows 7
    server using NTLMv2 (crypto code changes domain case).
    (cherry picked from commit 0745ce013878f5c45f291bea2fa479f76fc08dd5)

commit 8dbe39005418d7935b684c5628f4b476ab3bf759
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 23 15:59:54 2012 -0700

    Remove useless bool "upper_case_domain" parameter. (cherry picked from commit cbdf6c5c5135ce7d14ceff5d12b99428f4285e13)
    (cherry picked from commit 39e5641f2a8a48817492c9d5204ffbeccf66f8ec)

commit 242c8122377681acd0be8c785e9edc83da9c79bc
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 23 15:46:16 2012 -0700

    Move uppercasing the domain out of smb_pwd_check_ntlmv2()
    
    Allows us to remove a silly bool parameter.
    
    Based on work done by "Blohm, Guntram (I/FP-37, extern)" <extern.guntram.blohm at audi.de>.
    (cherry picked from commit 43870fb2c83c0fc70fb84b48dffe8f93bacf43c9)
    (cherry picked from commit fc4f4dec062e48cd59df4df2bd13c263732f2ac5)

commit 01fb1b6197e834e151ea97bf2be0c56130cd91fb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Mar 1 16:55:04 2012 +1100

    s3-libsmb: Initialise ticket to ensure we do not invalid memory
    
    The free is however a talloc_free(), which has additional protection against
    freeing the wrong thing.
    
    Andrew Bartlett
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Fri Mar  2 01:45:19 CET 2012 on sn-devel-104
    (cherry picked from commit f1452a296429b79755235f4a480f0d5ea38ce178)
    
    Fix bug #8788 - spnego_parse_krb5_wrap() frees invalid memory.
    (cherry picked from commit e96f50c9bb145a6af2c023e8ff4c3e8888c5a4a6)

commit 2b4bb1bc459d043ac39e7df50b6553a654f58580
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 20 10:20:31 2012 +0200

    s3-printing: Increase debug level for info that the db is empty.
    
    (cherry picked from commit c80d70da1364349a5329d17a68033163c5025264)
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    See bug #9112 - smbd.log is flooded by 'printer_list_get_printer: Failed to
    fetch record!' for details.
    (cherry picked from commit 5166e0bde86619f477645cca9642be85d567ffe8)

commit b1e004b62c6561644d7fc93aaab9bc941597b489
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 10 11:30:15 2012 +0200

    packaging: Add support for reloading systemd services.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Fix bug #9280 - Add support for reloading the daemons using systemctl reload.
    (cherry picked from commit 3c71fa399705f91baae764a43b436e83f14c4024)

commit fc7d4461164b0f6e8e5a42b93af8e1aaf1810e41
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Sep 14 00:02:22 2012 +0200

    autoconf: fix --with(out)-sendfile-support option handling
    
    this fixes bug #8344
    (cherry picked from commit a1db9aada46e2e7eefc989f888d22650320533de)

commit 275d10a715a89153e34472e2dd0d67fdfc1a83e3
Author: Joachim Schmitz <schmitz at hp.com>
Date:   Mon Sep 17 05:26:31 2012 -0700

    libreplace: Bug 8107, Fix poll replacement to become a msleep replacement
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 7542b63188f7e73588c9abb40e36a910c87bc534)
    (cherry picked from commit 6b4169a75fb3180dec1f57b0eb39312ca82cd1ac)

commit 35970565a651ef9e98340ce49a3f0502bf4494bb
Author: Björn Jacke <bj at sernet.de>
Date:   Sun Sep 16 02:21:39 2012 +0200

    replace: add some includes for poll.h
    
    See bug #8107
    
    Autobuild-User(master): Björn Jacke <bj at sernet.de>
    Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104
    (cherry picked from commit 520c9b0b0ae33e6e8fb78034cfff685f5491aab3)
    (cherry picked from commit ea96d79e21a549204a7f64307059ea877bfb9fd5)
    (cherry picked from commit 757dc4d753275d42b8dbf2710290b3dbfb9f3cda)

commit 6c47e8c3ff7370a73191c8bafe11b698b7592349
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 3 12:58:00 2012 -0700

    Correct fix for bug #9222 - smbd ignores the "server signing = no" setting for SMB2.
    
    Signing cannot be disabled for SMB2 by design, so fix the documentation
    instead.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Oct  3 23:47:23 CEST 2012 on sn-devel-104
    (cherry picked from commit fe38a93c71d0adc0be1d43b438ac3b54eaf4ba53)
    (cherry picked from commit 1bc9a208337b50e5ee566060799b3b17d8ed95e3)

commit 638b744129200483d32479c0232b22bf96d3d534
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Oct 8 12:32:49 2012 +0200

    s3fs-printing: Fix RAW printing for normal users.
    
    This fixes bug #8769.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit aecb5a61a378bdfa97cf621f408c9921c6e042ad)

commit 3a2d8c7ce18497e3703112973c42860b8cf081b5
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 8 12:25:49 2012 -0700

    s3: Add two tests a CLEAR_IF_FIRST crash
    
    The last 3 patches address bug #9268 - Make tdb robust against improper
    CLEAR_IF_FIRST restart.
    (cherry picked from commit 493f3a0e84a4bbeb8bac68dc28988c54b1619317)

commit b10e2aefd5c99681eb04c943e064f87d9245f9a6
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 8 12:02:43 2012 -0700

    tdb: Make tdb robust against improper CLEAR_IF_FIRST restart
    
    When winbind is restarted, there is a potential crash in tdb. Following
    situation: We are in a cluster with ctdb. A winbind child hangs
    in a request to the DC. Cluster monitoring decides the node has a
    problem. Cluster monitoring decides to kill ctdbd. winbind child
    still hangs in a RPC request. winbind parent figures that ctdb is
    dead and immediately commits suicide. winbind parent is restarted by
    cluster management, overwriting gencache.tdb with CLEAR_IF_FIRST. The
    CLEAR_IF_FIRST logic as implemented now will not see that a child still
    has the tdb open, only the parent holds the ACTIVE_LOCK due to performance
    reasons. During the CLEAR_IF_FIRST logic is done, there is a very small
    window where we ftruncate(tfd, 0) the file and re-write a proper header
    without a lock. When during this small window the winbind child comes
    back, wanting to store something into gencache.tdb, that winbind child
    will crash with a SIGBUS.
    
    Sounds unlikely? See:
    
        [2012/09/29 07:02:31.871607,  0] lib/util.c:1183(smb_panic)
          PANIC (pid 1814517): internal error
        [2012/09/29 07:02:31.877596,  0] lib/util.c:1287(log_stack_trace)
          BACKTRACE: 35 stack frames:
           #0 winbindd(log_stack_trace+0x1a) [0x7feb7d4ca18a]
           #1 winbindd(smb_panic+0x2b) [0x7feb7d4ca25b]
           #2 winbindd(+0x1a3cc4) [0x7feb7d4bacc4]
           #3 /lib64/libc.so.6(+0x32900) [0x7feb7a929900]
           #4 /lib64/libc.so.6(memcpy+0x35) [0x7feb7a97f355]
           #5 /usr/lib64/libtdb.so.1(+0x6e76) [0x7feb7b0b0e76]
           #6 /usr/lib64/libtdb.so.1(+0x3d37) [0x7feb7b0add37]
           #7 /usr/lib64/libtdb.so.1(+0x863d) [0x7feb7b0b263d]
           #8 /usr/lib64/libtdb.so.1(+0x8700) [0x7feb7b0b2700]
           #9 /usr/lib64/libtdb.so.1(+0x2505) [0x7feb7b0ac505]
           #10 /usr/lib64/libtdb.so.1(+0x25b7) [0x7feb7b0ac5b7]
           #11 /usr/lib64/libtdb.so.1(tdb_fetch+0x13) [0x7feb7b0ac633]
           #12 winbindd(gencache_set_data_blob+0x259) [0x7feb7d4d8449]
           #13 winbindd(gencache_set+0x53) [0x7feb7d4d85b3]
           #14 winbindd(gencache_del+0x5e) [0x7feb7d4d879e]
           #15 winbindd(saf_delete+0x93) [0x7feb7d54b693]
           #16 winbindd(+0xe507e) [0x7feb7d3fc07e]
           #17 winbindd(+0xe85e5) [0x7feb7d3ff5e5]
           #18 winbindd(+0xe65be) [0x7feb7d3fd5be]
           #19 winbindd(+0xe7562) [0x7feb7d3fe562]
           #20 winbindd(init_dc_connection+0x2e) [0x7feb7d3fe5be]
           #21 winbindd(+0xe75d9) [0x7feb7d3fe5d9]
           #22 winbindd(cm_connect_netlogon+0x58) [0x7feb7d3fe658]
           #23 winbindd(_wbint_PingDc+0x61) [0x7feb7d410991]
           #24 winbindd(+0x103175) [0x7feb7d41a175]
           #25 winbindd(winbindd_dual_ndrcmd+0xb7) [0x7feb7d4107d7]
           #26 winbindd(+0xf8609) [0x7feb7d40f609]
           #27 winbindd(+0xf9075) [0x7feb7d410075]
           #28 winbindd(tevent_common_loop_immediate+0xe8) [0x7feb7d4db198]
           #29 winbindd(run_events_poll+0x3c) [0x7feb7d4d93fc]
           #30 winbindd(+0x1c2b52) [0x7feb7d4d9b52]
           #31 winbindd(_tevent_loop_once+0x90) [0x7feb7d4d9f60]
           #32 winbindd(main+0x7b3) [0x7feb7d3e7aa3]
           #33 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7feb7a915cdd]
           #34 winbindd(+0xce2a9) [0x7feb7d3e52a9]
    
    This is in a winbind child, logfiles surrounding indicate the parent
    was restarted.
    
    This patch takes all chain locks around the CLEAR_IF_FIRST introduced
    tdb_new_database.
    (cherry picked from commit 15a3dfbc15de1e214e9aee57d7d83de60fe747bd)

commit fb7e362a6bfa5b4d83735ef62f97a4fdd4b04ca7
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Oct 8 11:56:47 2012 -0700

    tdb: Make robust against shrinking tdbs
    
    When probing for a size change (eg. just before tdb_expand, tdb_check,
    tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1).  Unfortunately
    this does nothing if the tdb has actually shrunk, which as Volker
    demonstrated, can actually happen if a "longlived" parent crashes.
    
    So move the map/update size/remap before the limit check.
    (cherry picked from commit e7e86fcb929e7b8e7d879349d5f7f9422126a3a2)

commit 5e1962d7ca9f232345e6e7e64d358547958630ed
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 2 10:15:54 2012 -0700

    When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries. (cherry picked from commit 6575d1d34fee45c7a965c7c9641cc52b566a9e7f)
    
    The last 4 patches address bug #9236 - ACL masks incorrectly applied when
    setting ACLs.
    (cherry picked from commit ac7d9768c718f6225f2182d763ec1dbc6dc48ea8)

commit a85906b99765fb104ea5ac332ad2c6c9ba913ed6
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 2 12:21:10 2012 -0700

    Only apply masks on non-default ACL entries when setting the ACL.
    (cherry picked from commit f163bcd18f80b8ac1add96c93964fa02c08a4615)

commit 741b8dd817f5cf98431b21aa42f4fb16b3a2a9a0
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 2 09:55:09 2012 -0700

    Use is_default_acl variable in canonicalise_acl(). (cherry picked from commit 82e7132bdf7c9d4ddead3cd5d845bfe68b93448b)
    (cherry picked from commit e8533833c2a138a54b7583f57187ee9e68b2e3cd)

commit 04352a3276749d143715951162abbe1a998f7039
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 2 09:21:17 2012 -0700

    Reformat spacing to be even. (cherry picked from commit efb446a38cca448855977666499603d12e1477b4)
    (cherry picked from commit 9b40fd8893584884ec282605b8c5481b089a43f1)

commit df6d41f0d9bf5ea7ab960f501994fdaf30544d70
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Oct 4 11:43:20 2012 +0200

    html docs: Remove link to Using Samba.
    
    Thanks to Christian Perrier <bubulle at debian.org> for reporting!
    
    Fix bug #7826 - HTML docs index file still points to Using Samba.
    
    Karolin
    
    Autobuild-User(master): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(master): Thu Oct  4 13:48:00 CEST 2012 on sn-devel-104
    (cherry picked from commit 1bf209dd7e5a0f0001b3d1e3798093772bbd3fd3)
    (cherry picked from commit 178266e6bc6d8d0b1dfd2269626c6da5b279b555)

commit 2e0e116bd5d0201b0b711f46eb3f0e96cdbd89a4
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Sep 6 10:23:50 2012 +0200

    s3:quota: don't force the block size to 512
    
    there is no point in forcing the block size to 512 when curblocks is 1. This
    will only lead to false quota reporting. See bug #3272
    (cherry picked from commit d6cc08b9eeb9de17bc0e610d6cf6dba13c5c8222)
    (cherry picked from commit 7b2acf8abe50f20302e7e296dc0ccb5e0c7963de)

commit fc553408ca5a0d8a478c5a60d0620932840236a1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 4 10:56:12 2012 +0200

    Fix net rpc share allowedusers to work with 2008r2
    
    The RAP NetShareEnum command was removed in 2008r2, so use the RPC equivalent
    instead.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=8966
    Author: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 0efdbc565fe64ab87bda4c9632a701e3115d7b23)

commit 87436d7f9ccdb93ee7a02fb5eea2a9387e53232f
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 27 17:20:25 2012 +0200

    s3-smbd: Move housekeeping to the background process.
    
    If you add 200 printers using lpadmin. Then you wait for the printcap
    cache to expire. As soon as this expires we notify all deamons that they
    should reload the printers. This mean we need to create the default
    registry keys for each printer. If you do e.g. a 'smbclient -L' during
    that time you will get a lot of timeouts.
    
    This moves the housekeeping of the printcap cache to the background
    queue process and lets the background process reload the printers first.
    So the background process creates the default registry keys. When it is
    done with the task it will tell all smbd childs to reload the printers
    and the 200 printers appear.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Fix bug #9231 - NT_STATUS_IO_TIMEOUT during slow import of printers into
    registry.
    (cherry picked from commit a0f687794d4ea7bbbe759279ed01e377a662a9c1)

commit 58bb6b5a3cf4e86088dfe8a977f1e081100b1791
Author: Vladimir Marek <Vladimir.Marek at Oracle.COM>
Date:   Mon Sep 17 13:50:55 2012 -0700

    Fix service control for non-internal services.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    (cherry picked from commit a4e8869f7c93f30dd7014ff83d6d2f2b5afc2d64)
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Fix bug #9192 - svcctl list option prohibits smbd to start.
    (cherry picked from commit 6ae1bf115ec1f927baee24cf4d611090d3b1bf91)

commit 1c19ef7d8f4fc8cc3b128f57e8f3b26eb202d3f3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 26 03:24:22 2012 +0200

    s3:selftest: run the posix_s3.smb2.oplock tests
    
    metze
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Wed Sep 26 07:57:12 CEST 2012 on sn-devel-104
    (silimar to commit 98d117a5424d62804b7cb3d8a9ad35e703fc158a)
    (cherry picked from commit 21a6a9ec045963000e31c5efe91135e021cd534c)

commit 8f878d47fd74c389701977f5931a7e53b4e4fe0a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 26 03:08:33 2012 +0200

    s4:torture/smb2: remove samba specific stuff from smb2.oplock
    
    metze
    (cherry picked from commit 7a14f09f9cc14cfb6234175add1841faf751d51a)
    (cherry picked from commit 4e9bbc2a4381d6e7a610a7ee3c5dfb1fc89701ac)

commit c92747f36048981dd6263b5171299ec1b2454ce2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 26 03:04:20 2012 +0200

    s3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug #9196)
    
    We always set state->te = NULL of TALLOC_FREE(state->te),
    before calling smbd_smb2_request_dispatch(), so
    open_was_deferred_smb2() always returned false, while dispatching
    it again.
    
    But it's remove_deferred_open_message_smb2_internal() which
    should reset this state.
    
    In developer mode validate_my_share_entries() did call smb_panic()
    before.
    
    metze
    (cherry picked from commit 4604219ceba96955b3c4bf6ab31aa70c11442d61)
    (cherry picked from commit 5eae9829f206fa5ac169420d897c875fea5f2fc6)

commit 758652ee1d9b2e6fd626323615279a68d7224501
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 29 10:04:54 2012 +0200

    s3:selftest: mark the driver_info_winreg tests knownfail.
    
    They only get executed when driver files are around.
    
    metze
    (similar to commit ef8e228a5b4952b51d9db6b28017142759f40d10)
    (cherry picked from commit 60a4b69933509273c4923c5593f6eb3b5afa0c3b)

commit 14d59e1c8ba37ddd80fda6c8288ba743c25f11e1
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Sep 26 16:58:58 2012 -0700

    Fix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.
    
    Ensure we correctly protect against blobs with data_offset==0
    and data_length != 0.
    
    Jeremy.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Sep 27 22:07:02 CEST 2012 on sn-devel-104
    (cherry picked from commit 322e3d42f65dadabeccf8813fcb0e9b7d353ffb2)
    (cherry picked from commit dd8e9801d6bcb8c6dca42312ffcb24149eb2645a)

commit f5ae3088e96f25d0dc569cda539dbb83645513c9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 19 08:11:23 2012 +0200

    libcli/smb: fix padding in smb2_create_blob*
    
    metze
    (cherry picked from commit aa5caf1fe92b159eae00c7b11499e9ec697cf9ae)
    (cherry picked from commit f4ed6437a8e60043edf968103a2c503b12e5191f)

commit 5701906aa051e7567561a14e38eb5a3dd5db3919
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Sep 25 14:28:22 2012 +0200

    s3-smbd: Don't segfault if user specified ports out for range.
    
    (cherry picked from commit 50d324b7e070de4672eff3fb6231923e6dca807a)
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Fix bug #9218 - Samba panics if a user specifies an invalid port number.
    (cherry picked from commit f3f960bed8e155f7a3f93fc7f2cc4d483785e975)

commit 669eb48fc1925b8ee34c34c89c9eb36fd28619b9
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 25 16:35:09 2012 -0700

    Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
    
    Not the correct fix for the specific issue, but a general fix to
    make sure this can never happen again.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104
    (cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)
    (cherry picked from commit d0b872ea7ca112d047b9ee2d10d1a75a2ee4aed3)

commit c403b54b946299c47e46650fcd85f03a6eb74883
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 20:46:53 2012 +0200

    selftest: we fail samba3.smb2.compound.interim2
    
    We currently return NT_STATUS_CANCELLED where we should
    return NT_STATUS_INTERNAL_ERROR.
    
    (similar to commit 841934647b06d6400148932cc8ce02a20c209610)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    The last 15 patches address bug #9173 - SMB2 compound request
    create/delete_on_close/close doesn't work as windows.
    (cherry picked from commit 834c817d6ea8384bd2e3d3bb6555c950ba98c80d)

commit aa530fc782cff67c874ccf1f9bdf254eb2c5187b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 00:43:54 2012 +0200

    s4:torture:smb2:compound: remove two unused macros (cherry picked from commit 6f6b1c6ac15f225978e8c2d67c1a817d9e098317)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit f9773cfc85c92cace85163092b2f40783cd482a5)

commit 9dcd8be132ac6c5eed515ef783b07ea52a0b4286
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 00:41:48 2012 +0200

    s4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8 (cherry picked from commit 8df0b023c51ed198d3054760447e1b273eada991)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 51ae7533af420e232c431a80d9a378f89e4363c6)

commit ee30b3423939a8c3b284632cd046727854c7f0e1
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 00:41:04 2012 +0200

    s4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8 (cherry picked from commit 917e714831178b2a3d07c7f9d09711231a7ccf31)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 52b06922b5d63207b03a1ae07896a9657b091cd4)

commit f0fce586393d772e4e78a14513394dc189e98923
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 20 16:23:26 2012 +0200

    s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()
    
    smbd_notify_cancel_by_smbreq() will already trigger this via
    smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger().
    
    metze
    (cherry picked from commit 1f0dfd42f16c388abc7054a7b615d2e81031472b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 3326b16454c9b4299a7213c42c3a63a29e3b20dc)

commit 4671cb47639c142424f9e0d159fb1120a053b685
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 20 16:04:01 2012 +0200

    s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()
    
    Because we should not call smbd_smb2_request_error() on an
    request that is still running.
    
    If the subreq implementes a cancel function, this should
    take care of triggering smbd_smb2_request_error.
    
    metze
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 9249871f40aab021d62d3154f8ca286b52f5ef76)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit d7910716920a324e0bba962241dd9b362d38d2b2)

commit 1f9e5e5b86a3d05ffa7ef871bcc519dec79f7f77
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 21 22:20:20 2012 +0200

    s4:torture:smb2: extend the compound.invalid1 test
    
    Test that when turning the related flag back off for the
    last compound request, the return code changes from
    invalid parameter to file closed.
    
    Pair-Programmed-With: Michael Adam <obnox at samba.org>
    (cherry picked from commit 25437df8a65e56616499dda18c696f58be08f67a)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 54463ccc90379213ecab18bbfcfd0646929d21ad)

commit 92285f27c3194b581ecf70723e42c574b1fe8fa1
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 21 21:43:36 2012 +0200

    s3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()
    
    removes unnneccary checks/assignments for compound_related and next_status
    and duplicate setting of error status.
    
    And remove (now) unused next_status from struct smbd_smb2_request.
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    (similar to commit 1ae6f9c62629f8513bbe93a56775b3c64ff06832)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 52aa2612b73b43589f01d87a4852df28e44d0cfb)

commit 448960d27ba88f18622a53f70ccaa9c335d919eb
Author: Michael Adam <obnox at samba.org>
Date:   Sat Sep 22 04:06:27 2012 +0200

    s3:smbd:smb2: add check for session_status for compound requests (cherry picked from commit 27d38b5c27bd96d5124c175d946718bf0836b8f4)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit efb16fc0ff7908c61c1c85e7959270702ab28c80)

commit 17615caa52b96f195102c4f5510384d3bedeca6e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 20 00:52:19 2012 +0200

    s3:smb2_server: do the req->next_status check before the signing checks
    
    Windows 2012 returns NT_STATUS_INVALID_PARAMETER to
    the smb2.compound.invalid1 test if that uses signing
    (instead of NT_STATUS_ACCESS_DENIED).
    
    metze
    (similar to commit 4384485f82aac109bf4c4c31075e313e54b4c076)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit ebabb40d1d423fab720735ac9225a09a8fc5feca)

commit 941787c24bac5405c99d274b65e7c950c023dd4b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 20 05:10:28 2012 +0200

    s3:smb2_server: reset req->last_session_id and req->last_tid after using it
    
    If we can find a valid session or tcon we'll set it after the lookup,
    but it need to make sure to reset it if we don't find the session.
    
    This fixes a problem where a compound unrelated request between
    related requests doesn't reset the session.
    
    If we have 3 requests in a compound chain, request 3 should never
    use the id's cached from request 1. It should only every inherit
    handles from request 2.
    
    metze
    (similar to commit 2552b6632372b35cbd7b788c4e00091dfe520a41)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 68ef8cf99a7421daa1d57895189cfc2dc508adfd)

commit c7e2411c375e50c1a553327e1c5bbef92f8e7d08
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 00:36:29 2012 +0200

    s4:torture:smb2: fix the compound.invalid3 test to work against windows (cherry picked from commit bd8d50b451ea7f94efa7777fbe5dc0c2c19f6bf9)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 9e662f376f7ecffb7b0d113db674192b2d64a77a)

commit 93e3cce0a184d6624844a212cd3c7ac685e5121b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 20 00:35:52 2012 +0200

    s4:torture:smb2: fix compound.related3 test to work against windows (cherry picked from commit 8e525a29a7c6512f61e4647ecb2e0771e2019a49)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 96aa3cdc6846994c0799672b509d60796198b9fa)

commit 06b99de49d57f73f6ee4f8cb8797af6bfca5f39e
Author: Ira Cooper <ira at samba.org>
Date:   Wed Sep 19 18:39:07 2012 +0000

    s3: Compound requests should continue processing.
    
    This patch addresses #9173.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 75951946193c874b6db30c1b9c8722264c3ce656)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 750b600d35f87103f47619fb5961afabeb4d32f2)

commit b845f8b5e88f79280be065d181e8c1fd05c68c3c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Oct 27 21:41:11 2011 +0200

    s4:torture/smb2: fix compound.invalid2 against windows
    
    Tested against w2k8r2 with signing and win8pre0 without signing.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Mon Oct 31 21:40:25 CET 2011 on sn-devel-104
    (cherry picked from commit c90870f9b728dfb827ebc2fe8ad67a7ca3a50c43)
    (cherry picked from commit 41a797a4c0d082d4e2a1d34645c4974de41df199)

commit b774e35ef62ec7388a8b371231e5cc8ce984cb9a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jul 13 16:25:23 2012 -0700

    Fix bug #9016 - Connection to outbound trusted domain goes offline.
    
    By the time we've gotten to init_dc_connection_network() we shouldn't
    be second guessing the caller by calling winbindd_can_contact_domain().
    
    If for some reason we do need to restrict the contact list here we
    can add a condition to only contact the primary domain or domains
    listed in the tdc cache, but I don't think that's neccessary.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jul 14 03:17:57 CEST 2012 on sn-devel-104
    (cherry picked from commit 726ecf6a915ff534af4076e9d0cdebf8b5435d61)
    (cherry picked from commit d4faae3dbdfdd600bbf9bddb2589b8a6dc8434b6)

commit 1602ec2fd4779754044b3a67901c2cf07033fa30
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Sep 26 18:21:55 2012 +0200

    s3-spoolss: Fix builtin forms order to match Windows again.
    
    Thanks to mamachine at gmail.com.
    
    (cherry picked from commit 24fc5b46f2b33f94bf79fc375432609697aaa45e)
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Fix bug #8632 - printing regression: form sizes seem broken, cannot print letter
    size correctly.
    (cherry picked from commit f2d6c007503a335fb7ef0f74cc2f3d4850752829)

commit 5d6783c3e46363f7b744ce877390446bf6e17100
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Sep 24 16:43:12 2012 -0700

    Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
    
    If we aren't already granted DELETE access, check if we have
    DELETE_CHILD in the containing directory.
    (cherry picked from commit d0eb11f521fb21dc0eed4279101e41102a123757)

commit c917572c2492a2f8759c9e17a13b648589e9f1eb
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Sep 24 16:42:57 2012 -0700

    Add some const to can_delete_file_in_directory().
    (cherry picked from commit 0a1f8e7de939c7eb71cfa8cc8f8eef4800d00b78)

commit 4976f911b4facf677b09a02e45c295ecb529ddb8
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Sep 18 13:57:30 2012 +0200

    quota: add supprt for gfs2
    
    gfs2 uses the same generic quota interface as xfs and it has the same base
    block/quota block size ratio and seems to work nice with the xfs quota module.
    
    (People using gfs should be aware that quota reporting is lagging quite a bit
    on gfs.  If you copy a file on a gfs volume the quota values are being updated
    with a delay of 30s here with kernel 3.5. This reporting can lead to data
    corruption if a client thinks he can write but actually he suddently can't.)
    (cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)
    
    Fix bug #9172 - quota on gfs2 being reported wrong.
    (cherry picked from commit 16a3b6e02d1bb8345984ab6a8c81e446d8de2f54)

commit 72565edfebfaf7e9b0e3b52982f4633dd6f99a49
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 19 10:59:50 2012 +0200

    pam_winbind: match more return codes when wbcGetPwnam has failed.
    
    This is required to properly return PAM_USER_UNKNOWN in case winbind had a
    problem.
    
    Guenther
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Wed Sep 19 15:06:10 CEST 2012 on sn-devel-104
    
    Fix bug #9177 - pam_winbind's pm_sm_acct_mgmt needs to return PAM_USER_UNKNOWN.
    (cherry picked from commit de0764d75dc6dd0900a699fe504c576f3f6f2de4)

commit 162e33b6b9ee1093a1a44fd914ec832fbb167da0
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Tue Sep 18 14:43:33 2012 +0200

    s3-docs: Remove non-existent option from winbindd manpage.
    
    Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
    Signed-off-by: Karolin Seeger <kseeger at samba.org>
    
    Fix bug #9171 - winbindd -Y is documented but not implemented.
    (cherry picked from commit 1a97d0cf2baa306a0d33e0fc8d4d3e7d01e1d5ca)

commit 7c009c349d56a9b6c7a220bc9429963c7c194814
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 18 15:31:26 2012 -0700

    s3: Fix idmap_hash
    
    Calling be_init with NULL safely crashes, because we dereference NULL. We
    don't need to call it here, this is called in all workers anyway. Thanks
    to Jiri Sasek <jiri.sasek at oracle.com> for finding this.
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Thu Sep 20 05:03:54 CEST 2012 on sn-devel-104
    
    Fix bug #9188 - idmap_hash crashes.
    (cherry picked from commit 09c91a947005f8feb377dab40fcb937390a4efcb)

commit 4a1f497f7db6011243322ada293b3b15d85ec061
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 18 11:51:31 2012 -0700

    Fix bug #9174: Empty SPNEGO packet can cause smbd to crash.
    
    All fields within NegTokenInit and NegTokenTarg are optional. We incorrectly
    assume we'll always get a data blob and indirect within it.
    (cherry picked from commit 66c3247e74f8d545b1d769c7d9ef6542a08f0719)

commit 43a213be24b67b999f1691e452dac7d89a987814
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Sep 18 11:08:17 2012 +0200

    RHEL packaging: Try to fix makerpms.sh on RHEL.
    
    Address bug #9165 - makerpms.sh can't create package fo RHEL.
    
    Karolin
    
    Autobuild-User(master): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(master): Tue Sep 18 12:51:01 CEST 2012 on sn-devel-104
    (cherry picked from commit 6fb91dd36950151aeec69c074f4d900a6e7adba1)
    (cherry picked from commit 6357c591b62ca275d861d80a651977e16fce949d)

commit 61bdc8f00e0e6b9e3fe456da0bb590b288a190c8
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Sep 14 20:08:19 2012 +0200

    configure: fix wrong test == syntax
    
    This fixes bug #8146. Thanks to Joachim Schmitz for reporting!
    (cherry picked from commit 03a93b81d63b686ba57d106002584b893d885da3)

commit 203de503bec02dae7716b644ab5dc32cf730e944
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Sep 12 12:12:58 2012 +0200

    s3-rap: Open printers with the right access mask.
    
    Fix bug #9154.
    
    (cherry picked from commit 1f8c9ab88e7a2e28e503e99baabb88c3cebbc4b6)
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 9b3a4a16c2068437996650c36d201616a9daa8d3)

commit 4caa92dfe7471612ade20d512304e6c38d73f7d1
Author: Luca Lorenzetto <lorenzetto-luca at ubuntu-it.org>
Date:   Tue Sep 11 18:35:42 2012 +0200

    nsswitch: fix crash on null pam change pw response
    
    The function _pam_winbind_change_pwd crashes due to a null value passed
    to the function strcasecmp and denies to login via graphical login
    manager. Check for a null value before doing a strcasecmp.
    
    Bug-Ubuntu: https://bugs.launchpad.net/bugs/1003296
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9013
    (Desktop Managers (xdm, gdm, lightdm...) crashes with SIGSEGV in
    _pam_winbind_change_pwd() when password is expiring)
    (cherry picked from commit 47f2211f137688a7c46c4a38571a9f94e59dbf6a)

commit 606a56eacb6b38a82b4ac5f1394032f247763be5
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 11 13:25:14 2012 -0700

    Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP
    
    Don't use "isprint" in ldb_binary_encode(). This is locale specific.
    Restrict to ASCII only, hex encode everything else.
    (cherry picked from commit f4d2e6b6c321ecfccadc3b19f4a27991cf93eb8c)

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

Summary of changes:
 WHATSNEW.txt                                   |   92 +++++++++-
 docs-xml/htmldocs.html                         |    4 -
 docs-xml/manpages-3/winbindd.8.xml             |   10 -
 docs-xml/smbdotconf/security/serversigning.xml |   17 +-
 lib/addns/dnsmarshall.c                        |   24 ++--
 lib/replace/poll.c                             |    8 +-
 lib/tdb/common/io.c                            |   15 +-
 lib/tdb/common/open.c                          |   34 +++-
 libcli/auth/ntlm_check.c                       |   41 ++--
 libcli/auth/proto.h                            |    1 -
 libcli/auth/smbencrypt.c                       |   11 +-
 libcli/smb/smb2_create_blob.c                  |   46 ++++--
 nsswitch/pam_winbind.c                         |    5 +-
 packaging/RHEL/samba.spec.tmpl                 |    2 +-
 packaging/systemd/nmb.service                  |    1 +
 packaging/systemd/smb.service                  |    1 +
 packaging/systemd/winbind.service              |    1 +
 source3/configure.in                           |   39 +++--
 source3/lib/ldb_compat.c                       |   13 +-
 source3/lib/sysquotas.c                        |    2 +
 source3/libsmb/clispnego.c                     |    5 +
 source3/printing/printer_list.c                |    3 +-
 source3/printing/printing.c                    |   31 +++
 source3/printing/printspoolss.c                |    2 +-
 source3/rpc_client/cli_winreg_spoolss.c        |  238 ++++++++++++------------
 source3/rpc_server/svcctl/srv_svcctl_reg.c     |    4 -
 source3/selftest/knownfail                     |    6 +
 source3/selftest/tests.py                      |    2 +-
 source3/smbd/file_access.c                     |    2 +-
 source3/smbd/globals.h                         |    2 -
 source3/smbd/lanman.c                          |    6 +-
 source3/smbd/open.c                            |    6 +
 source3/smbd/posix_acls.c                      |   58 ++++--
 source3/smbd/proto.h                           |    2 +-
 source3/smbd/quotas.c                          |    3 -
 source3/smbd/server.c                          |   51 ++----
 source3/smbd/server_reload.c                   |    9 +
 source3/smbd/sesssetup.c                       |    2 +-
 source3/smbd/smb2_create.c                     |    5 +-
 source3/smbd/smb2_notify.c                     |    3 +-
 source3/smbd/smb2_server.c                     |   87 +++-------
 source3/smbd/smb2_sesssetup.c                  |    4 +-
 source3/smbd/smb2_tcon.c                       |    2 +
 source3/torture/torture.c                      |   56 ++++++
 source3/utils/net_rpc.c                        |   81 +++++----
 source3/winbindd/idmap_hash/idmap_hash.c       |    2 +-
 source3/winbindd/winbindd_cm.c                 |    6 -
 source4/lib/ldb/common/ldb_parse.c             |   11 +-
 source4/torture/smb2/compound.c                |   34 ++--
 source4/torture/smb2/oplock.c                  |   10 -
 50 files changed, 646 insertions(+), 454 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index b2c56fa..e878823 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -8,12 +8,102 @@ This is is the latest stable release of Samba 3.6.
 
 Major enhancements in Samba 3.6.9 include:
 
-o  
+o  When setting a non-default ACL, don't forget to apply masks to
+   SMB_ACL_USER and SMB_ACL_GROUP entries (bug #9236).
+o  Winbind can't fetch user or group info from AD via LDAP (bug #9147).
+o  Fix segfault in smbd if user specified ports out for range (bug #9218).
+
 
 Changes since 3.6.8:
 --------------------
 
+o   Michael Adam <obnox at samba.org>
+    * BUG 9173: Make SMB2 compound request create/delete_on_close/close work as
+      Windows.
+
+
 o   Jeremy Allison <jra at samba.org>
+    * BUG 8966: Fix 'net rpc share allowedusers' to work with 2008r2.
+    * BUG 9016: Connection to outbound trusted domain goes offline.
+    * BUG 9117: 'smbclient' can't connect to a Windows 7 server using NTLMv2.
+    * BUG 9147: Winbind can't fetch user or group info from AD via LDAP.
+    * BUG 9174: Empty SPNEGO packet can cause smbd to crash.
+    * BUG 9189: SMB2 Create doesn't return correct MAX ACCESS access mask in
+      blob.
+    * BUG 9209: Parse of invalid SMB2 create blob can cause smbd crash.
+    * BUG 9213: Bad ASN.1 NegTokenInit packet can cause invalid free.
+    * BUG 9222: Signing cannot be disabled for SMB2 by design, so fix the
+      documentation instead.
+    * BUG 9236: When setting a non-default ACL, don't forget to apply masks to
+      SMB_ACL_USER and SMB_ACL_GROUP entries.
+
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 8788: Initialise ticket to ensure we do not invalid memory.
+
+
+o   Ira Cooper <ira at samba.org>
+    * BUG 9173: Compound requests should continue processing.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 9177: pam_winbind: Match more return codes when wbcGetPwnam has failed.
+
+
+o   Björn Jacke <bj at sernet.de>
+    * BUG 3272: quota: Don't force the block size to 512.
+    * BUG 8107: Add some includes for poll.h.
+    * BUG 8146: Fix wrong test == syntax in configure.
+    * BUG 8344: Fix --with(out)-sendfile-support option handling in autoconf.
+    * BUG 9172: Add quota support for gfs2.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 9188: Fix crash bug in idmap_hash.
+    * BUG 9268: Make tdb robust against improper CLEAR_IF_FIRST restart.
+
+
+o   Luca Lorenzetto <lorenzetto-luca at ubuntu-it.org>
+    * BUG 9013: Fix crash on null pam change pw response.
+
+
+o   Vladimir Marek <Vladimir.Marek at Oracle.COM>
+    * BUG 9192: Fix service control for non-internal services.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 9173: Make SMB2 compound request create/delete_on_close/close work as
+      Windows.
+    * BUG 9196: Don't take 'state->te' as indication for "was_deferred".
+    * BUG 9209: Fix unitialized padding in smb2_create_blob_push_one().
+
+
+o   Matthieu Patou <mat at matws.net>
+    * BUG 9259: lib-addns: ensure that allocated buffer are pre set to 0.
+
+
+o   Rusty Russell <rusty at rustcorp.com.au>
+    * BUG 9268: Make robust against shrinking tdbs.
+
+
+o   Joachim Schmitz <schmitz at hp.com>
+    * BUG 8107: Fix poll replacement to become a msleep replacement.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 8632: Fix builtin forms order to match Windows again.
+    * BUG 8769: Fix RAW printing for normal users.
+    * BUG 9112: Increase debug level for info that the db is empty.
+    * BUG 9154: Open printers with the right access mask.
+    * BUG 9171: Remove non-existent option '-Y' from winbindd manpage.
+    * BUG 9218: Fix segfault in smbd if user specified ports out for range.
+    * BUG 9231: Fix NT_STATUS_IO_TIMEOUT during slow import of printers into
+      registry.
+    * BUG 9280: Add support for reloading systemd services.
+
+
+o   Karolin Seeger <kseeger at samba.org>
+    * BUG 9165: Fix makerpms.sh on RHEL.
 
 
 ######################################################################
diff --git a/docs-xml/htmldocs.html b/docs-xml/htmldocs.html
index 44fcc0f..6fb9e73 100644
--- a/docs-xml/htmldocs.html
+++ b/docs-xml/htmldocs.html
@@ -23,10 +23,6 @@
  <td valign="top">This book provides example configurations, it documents key aspects of Microsoft Windows networking, provides in-depth insight into the important configuration of Samba-3, and helps to put all of these into a useful framework.</td>
 </tr>
 <tr>
- <td valign="top"><a href="using_samba/toc.html">Using Samba</a>, 2nd Edition</td>
- <td valign="top"><i>Using Samba</i>, Second Edition is a comprehensive guide to Samba administration. It covers all versions of Samba from 2.0 to 2.2, including selected features from an alpha version of 3.0, as well as the SWAT graphical configuration tool. Updated for Windows 2000, ME, and XP, the book also explores Samba's new role as a primary domain controller and domain member server, its support for the use of Windows NT/2000/XP authentication and filesystem security on the host Unix system, and accessing shared files and printers from Unix clients.</td>
-</tr>
-<tr>
  <td valign="top"><a href="manpages/index.html">Man pages</a></td>
  <td valign="top">The Samba man pages in HTML.</td>
 </tr>
diff --git a/docs-xml/manpages-3/winbindd.8.xml b/docs-xml/manpages-3/winbindd.8.xml
index df44e44..71829fb 100644
--- a/docs-xml/manpages-3/winbindd.8.xml
+++ b/docs-xml/manpages-3/winbindd.8.xml
@@ -24,7 +24,6 @@
 		<arg choice="opt">-F</arg>
 		<arg choice="opt">-S</arg>
 		<arg choice="opt">-i</arg>
-		<arg choice="opt">-Y</arg>
 		<arg choice="opt">-d <debug level></arg>
 		<arg choice="opt">-s <smb config file></arg>
 		<arg choice="opt">-n</arg>
@@ -193,15 +192,6 @@ hosts:		files wins
 		</para></listitem>
 		</varlistentry>
 
-		<varlistentry>
-		<term>-Y</term>
-		<listitem><para>Single daemon mode. This means winbindd will run
-		as a single process (the mode of operation in Samba 2.2).  Winbindd's
-		default behavior is to launch a child process that is responsible for
-		updating expired cache entries.
-		</para></listitem>
-		</varlistentry>
-
 	</variablelist>
 </refsect1>
 
diff --git a/docs-xml/smbdotconf/security/serversigning.xml b/docs-xml/smbdotconf/security/serversigning.xml
index ea21a2c..0aced5d 100644
--- a/docs-xml/smbdotconf/security/serversigning.xml
+++ b/docs-xml/smbdotconf/security/serversigning.xml
@@ -5,14 +5,19 @@
 		 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
 
-    <para>This controls whether the client is allowed or required to use SMB signing. Possible values 
-    are <emphasis>auto</emphasis>, <emphasis>mandatory</emphasis> 
-    and <emphasis>disabled</emphasis>. 
+    <para>This controls whether the client is allowed or required to use SMB1 and SMB2 signing. Possible values
+    are <emphasis>auto</emphasis>, <emphasis>mandatory</emphasis>
+    and <emphasis>disabled</emphasis>.
     </para>
 
-    <para>When set to auto, SMB signing is offered, but not enforced. 
-    When set to mandatory, SMB signing is required and if set 
-	to disabled, SMB signing is not offered either.</para>
+    <para>When set to auto, SMB1 signing is offered, but not enforced.
+    When set to mandatory, SMB1 signing is required and if set
+    to disabled, SMB signing is not offered either.</para>
+
+    <para>For the SMB2 protocol, by design, signing cannot be disabled. In the case
+    where SMB2 is negotiated, if this parameter is set to <emphasis>disabled</emphasis>,
+    it will be treated as <emphasis>auto</emphasis>. Setting it to <emphasis>mandatory</emphasis>
+    will still require SMB2 clients to use signing.</para>
 </description>
 
 <value type="default">Disabled</value>
diff --git a/lib/addns/dnsmarshall.c b/lib/addns/dnsmarshall.c
index 5530290..b2e84eb 100644
--- a/lib/addns/dnsmarshall.c
+++ b/lib/addns/dnsmarshall.c
@@ -27,7 +27,7 @@ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx)
 {
 	struct dns_buffer *result;
 
-	if (!(result = talloc(mem_ctx, struct dns_buffer))) {
+	if (!(result = talloc_zero(mem_ctx, struct dns_buffer))) {
 		return NULL;
 	}
 
@@ -39,7 +39,7 @@ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx)
 	 */
 	result->size = 2;
 
-	if (!(result->data = TALLOC_ARRAY(result, uint8, result->size))) {
+	if (!(result->data = TALLOC_ZERO_ARRAY(result, uint8, result->size))) {
 		TALLOC_FREE(result);
 		return NULL;
 	}
@@ -216,14 +216,14 @@ static void dns_unmarshall_label(TALLOC_CTX *mem_ctx,
 		return;
 	}
 
-	if (!(label = talloc(mem_ctx, struct dns_domain_label))) {
+	if (!(label = talloc_zero(mem_ctx, struct dns_domain_label))) {
 		buf->error = ERROR_DNS_NO_MEMORY;
 		return;
 	}
 
 	label->len = len;
 
-	if (!(label->label = TALLOC_ARRAY(label, char, len+1))) {
+	if (!(label->label = TALLOC_ZERO_ARRAY(label, char, len+1))) {
 		buf->error = ERROR_DNS_NO_MEMORY;
 		goto error;
 	}
@@ -250,7 +250,7 @@ void dns_unmarshall_domain_name(TALLOC_CTX *mem_ctx,
 
 	if (!ERR_DNS_IS_OK(buf->error)) return;
 
-	if (!(name = talloc(mem_ctx, struct dns_domain_name))) {
+	if (!(name = talloc_zero(mem_ctx, struct dns_domain_name))) {
 		buf->error = ERROR_DNS_NO_MEMORY;
 		return;
 	}
@@ -281,7 +281,7 @@ static void dns_unmarshall_question(TALLOC_CTX *mem_ctx,
 
 	if (!(ERR_DNS_IS_OK(buf->error))) return;
 
-	if (!(q = talloc(mem_ctx, struct dns_question))) {
+	if (!(q = talloc_zero(mem_ctx, struct dns_question))) {
 		buf->error = ERROR_DNS_NO_MEMORY;
 		return;
 	}
@@ -314,7 +314,7 @@ static void dns_unmarshall_rr(TALLOC_CTX *mem_ctx,
 
 	if (!(ERR_DNS_IS_OK(buf->error))) return;
 
-	if (!(r = talloc(mem_ctx, struct dns_rrec))) {
+	if (!(r = talloc_zero(mem_ctx, struct dns_rrec))) {
 		buf->error = ERROR_DNS_NO_MEMORY;
 		return;
 	}
@@ -329,7 +329,7 @@ static void dns_unmarshall_rr(TALLOC_CTX *mem_ctx,
 	if (!(ERR_DNS_IS_OK(buf->error))) return;
 
 	if (r->data_length != 0) {
-		if (!(r->data = TALLOC_ARRAY(r, uint8, r->data_length))) {
+		if (!(r->data = TALLOC_ZERO_ARRAY(r, uint8, r->data_length))) {
 			buf->error = ERROR_DNS_NO_MEMORY;
 			return;
 		}
@@ -406,22 +406,22 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx,
 	err = ERROR_DNS_NO_MEMORY;
 
 	if ((req->num_questions != 0) &&
-	    !(req->questions = TALLOC_ARRAY(req, struct dns_question *,
+	    !(req->questions = TALLOC_ZERO_ARRAY(req, struct dns_question *,
 					    req->num_questions))) {
 		goto error;
 	}
 	if ((req->num_answers != 0) &&
-	    !(req->answers = TALLOC_ARRAY(req, struct dns_rrec *,
+	    !(req->answers = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
 					  req->num_answers))) {
 		goto error;
 	}
 	if ((req->num_auths != 0) &&
-	    !(req->auths = TALLOC_ARRAY(req, struct dns_rrec *,
+	    !(req->auths = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
 					req->num_auths))) {
 		goto error;
 	}
 	if ((req->num_additionals != 0) &&
-	    !(req->additionals = TALLOC_ARRAY(req, struct dns_rrec *,
+	    !(req->additionals = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
 					      req->num_additionals))) {
 		goto error;
 	}
diff --git a/lib/replace/poll.c b/lib/replace/poll.c
index e41548d..1105617 100644
--- a/lib/replace/poll.c
+++ b/lib/replace/poll.c
@@ -30,6 +30,12 @@
 
 #include "replace.h"
 #include "system/select.h"
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
 
 
 int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout)
@@ -40,7 +46,7 @@ int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout)
 	int rc;
 	nfds_t i;
 
-	if (fds == NULL) {
+	if ((fds == NULL) && (nfds != 0)) {
 		errno = EFAULT;
 		return -1;
 	}
diff --git a/lib/tdb/common/io.c b/lib/tdb/common/io.c
index 78bbf2e..649b70f 100644
--- a/lib/tdb/common/io.c
+++ b/lib/tdb/common/io.c
@@ -53,6 +53,14 @@ static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, int probe)
 		return -1;
 	}
 
+	/* Unmap, update size, remap */
+	if (tdb_munmap(tdb) == -1) {
+		tdb->ecode = TDB_ERR_IO;
+		return -1;
+	}
+	tdb->map_size = st.st_size;
+	tdb_mmap(tdb);
+
 	if (st.st_size < (size_t)len) {
 		if (!probe) {
 			/* Ensure ecode is set for log fn. */
@@ -63,13 +71,6 @@ static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, int probe)
 		return -1;
 	}
 
-	/* Unmap, update size, remap */
-	if (tdb_munmap(tdb) == -1) {
-		tdb->ecode = TDB_ERR_IO;
-		return -1;
-	}
-	tdb->map_size = st.st_size;
-	tdb_mmap(tdb);
 	return 0;
 }
 
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index ec45689..eeea8c7 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -313,12 +313,36 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
 	if ((tdb_flags & TDB_CLEAR_IF_FIRST) &&
 	    (!tdb->read_only) &&
 	    (locked = (tdb_nest_lock(tdb, ACTIVE_LOCK, F_WRLCK, TDB_LOCK_NOWAIT|TDB_LOCK_PROBE) == 0))) {
-		open_flags |= O_CREAT;
-		if (ftruncate(tdb->fd, 0) == -1) {
+		int ret;
+		ret = tdb_brlock(tdb, F_WRLCK, FREELIST_TOP, 0,
+				TDB_LOCK_WAIT);
+		if (ret == -1) {
 			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
-				 "failed to truncate %s: %s\n",
-				 name, strerror(errno)));
-			goto fail; /* errno set by ftruncate */
+				"tdb_brlock failed for %s: %s\n",
+				name, strerror(errno)));
+			goto fail;
+		}
+		ret = tdb_new_database(tdb, hash_size);
+		if (ret == -1) {
+			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
+				"tdb_new_database failed for %s: %s\n",
+				name, strerror(errno)));
+			tdb_unlockall(tdb);
+			goto fail;
+		}
+		ret = tdb_brunlock(tdb, F_WRLCK, FREELIST_TOP, 0);
+		if (ret == -1) {
+			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
+				"tdb_unlockall failed for %s: %s\n",
+				name, strerror(errno)));
+			goto fail;
+		}
+		ret = lseek(tdb->fd, 0, SEEK_SET);
+		if (ret == -1) {
+			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
+				"lseek failed for %s: %s\n",
+				name, strerror(errno)));
+			goto fail;
 		}
 	}
 
diff --git a/libcli/auth/ntlm_check.c b/libcli/auth/ntlm_check.c
index da16ce2..74787a4 100644
--- a/libcli/auth/ntlm_check.c
+++ b/libcli/auth/ntlm_check.c
@@ -87,7 +87,6 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
 				 const uint8_t *part_passwd,
 				 const DATA_BLOB *sec_blob,
 				 const char *user, const char *domain,
-				 bool upper_case_domain, /* should the domain be transformed into upper case? */
 				 DATA_BLOB *user_sess_key)
 {
 	/* Finish the encryption of part_passwd. */
@@ -122,7 +121,7 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
 	   but for NTLMv2 it is meant to contain the current time etc.
 	*/
 
-	if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain, kr)) {
+	if (!ntv2_owf_gen(part_passwd, user, domain, kr)) {
 		return false;
 	}
 
@@ -161,7 +160,6 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx,
 				const uint8_t *part_passwd,
 				const DATA_BLOB *sec_blob,
 				const char *user, const char *domain,
-				bool upper_case_domain, /* should the domain be transformed into upper case? */
 				DATA_BLOB *user_sess_key)
 {
 	/* Finish the encryption of part_passwd. */
@@ -192,7 +190,7 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx,
 
 	client_key_data = data_blob_talloc(mem_ctx, ntv2_response->data+16, ntv2_response->length-16);
 
-	if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain, kr)) {
+	if (!ntv2_owf_gen(part_passwd, user, domain, kr)) {
 		return false;
 	}
 
@@ -297,6 +295,14 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 {
 	const static uint8_t zeros[8];
 	DATA_BLOB tmp_sess_key;
+	const char *upper_client_domain = NULL;
+
+	if (client_domain != NULL) {
+		upper_client_domain = talloc_strdup_upper(mem_ctx, client_domain);
+		if (upper_client_domain == NULL) {
+			return NT_STATUS_NO_MEMORY;
+		}
+	}
 
 	if (stored_nt == NULL) {
 		DEBUG(3,("ntlm_password_check: NO NT password stored for user %s.\n", 
@@ -348,13 +354,13 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 		/* We have the NT MD4 hash challenge available - see if we can
 		   use it 
 		*/
-		DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n", client_domain));
+		DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n",
+			client_domain ? client_domain : "<NULL>"));
 		if (smb_pwd_check_ntlmv2(mem_ctx,
 					 nt_response, 
 					 stored_nt->hash, challenge, 
 					 client_username, 
 					 client_domain,
-					 false,
 					 user_sess_key)) {
 			if (user_sess_key->length) {
 				*lm_sess_key = data_blob_talloc(mem_ctx, user_sess_key->data, MIN(8, user_sess_key->length));
@@ -362,13 +368,13 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 			return NT_STATUS_OK;
 		}
 
-		DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n", client_domain));
+		DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n",
+			upper_client_domain ? upper_client_domain : "<NULL>"));
 		if (smb_pwd_check_ntlmv2(mem_ctx,
 					 nt_response, 
 					 stored_nt->hash, challenge, 
 					 client_username, 
-					 client_domain,
-					 true,
+					 upper_client_domain,
 					 user_sess_key)) {
 			if (user_sess_key->length) {
 				*lm_sess_key = data_blob_talloc(mem_ctx, user_sess_key->data, MIN(8, user_sess_key->length));
@@ -382,7 +388,6 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 					 stored_nt->hash, challenge, 
 					 client_username, 
 					 "",
-					 false,
 					 user_sess_key)) {
 			if (user_sess_key->length) {
 				*lm_sess_key = data_blob_talloc(mem_ctx, user_sess_key->data, MIN(8, user_sess_key->length));
@@ -470,13 +475,13 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 	/* This is for 'LMv2' authentication.  almost NTLMv2 but limited to 24 bytes.
 	   - related to Win9X, legacy NAS pass-though authentication
 	*/
-	DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n", client_domain));
+	DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n",
+		client_domain ? client_domain : "<NULL>"));
 	if (smb_pwd_check_ntlmv2(mem_ctx,
 				 lm_response, 
 				 stored_nt->hash, challenge, 
 				 client_username,
 				 client_domain,
-				 false,
 				 &tmp_sess_key)) {
 		if (nt_response->length > 24) {
 			/* If NTLMv2 authentication has preceeded us
@@ -488,7 +493,6 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 					    stored_nt->hash, challenge, 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list