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

Karolin Seeger kseeger at samba.org
Wed Apr 15 12:02:32 MDT 2015


The branch, v4-2-stable has been updated
       via  c2633a9 VERSION: Disable git snapshot for the 4.2.1 release.
       via  172cdbd WHATSNEW: Add release notes for Samba 4.2.1.
       via  be7b660 s3-passdb: Fix 'force user' with winbind default domain
       via  57f54da s4-process_model: Do not close random fds while forking.
       via  fad13d7 s3: libsmbclient: Add missing talloc stackframe.
       via  100cd28 lib: tdb: Use sigaction when testing for robust mutexes.
       via  6cab690 s4:auth/gensec_gssapi: let gensec_gssapi_update() return NT_STATUS_LOGON_FAILURE for unknown errors
       via  f4525a5 s3: client - "client use spnego principal = yes" code checks wrong name.
       via  faaf9af docs: Mark 'client use spnego principal' as deprecated and also a bad idea.
       via  c286a17 vfs_fruit: enhance handling of malformed AppleDouble files
       via  f93f74c s3:winbind:grent: don't stop group enumeration when a group has no gid
       via  903dfd6 backupkey: Use ndr_pull_struct_blob_all()
       via  1dca6ee Ensure we always initialise the winbind context
       via  84782d4 replace: Remove superfluous check for gcrypt header.
       via  b8253f2 backupkey: Explicitly link to gnutls and gcrypt
       via  2ee70a1 lib/tls: Fix behaviour of --disable-gnutls and remove link to gcrypt
       via  1f4edb0 s3: lib: libsmbclient: If reusing a server struct, check every cli->timout miliseconds if it's still valid before use.
       via  a5156c6 s3: libcli: smb1: Ensure we correctly finish a tevent req if the writev fails in the SMB1 case.
       via  6b4a52c s3: lib: ntlmssp: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.
       via  6f262f6 s4: lib: auth: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.
       via  e1bf5b7 docs/idmap_rid: remove deprecated base_rid from example
       via  1346811 libcli/auth: Match Declaration of netlogon_creds_cli_context_tmp with implementation
       via  7b7602c Update libwbclient version to 0.12
       via  fe5ac73 Move wbc global variables into global context instead
       via  bb70e50 Add context versions of wbclient functions
       via  b9d75f6 Add wbcContext to wbcRequestResponse
       via  a52f418 Add wbcContext struct, create and free functions
       via  ae434f4 Use global context for winbindd_request_response
       via  7f787b4 Make winbind client library thread-safe by adding context
       via  f56d56e talloc: version 2.1.2
       via  0693e46 talloc: fix _talloc_total_limit_size prototype
       via  f6df1e9 lib: talloc: Test suite for the new destructor reparent logic.
       via  a21e4e2 lib: talloc: Allow destructors to reparent the object they're called on.
       via  599ca10 lib: talloc: Fix bug when calling a destructor.
       via  bb97c5e s3-winbind: Fix chached user group lookup of trusted domains.
       via  e92a548 Be consistent about what functions add $LISTOPT and $LOADLIST to the command-line.
       via  ebcba7a selftest: Add separate command line for listing tests, allowing us of subunit-filter (which doesn't support subunit v2).
       via  d8aafcd selftest/tests.py: Remove testsuite samba.tests.samdb which does not have any tests.
       via  b953fbd Re-use add_prefix function.
       via  df04a81 selftest: Drop support for TESTSUITE-IDLIST, and remove its last user.
       via  6bf5d33 sam: Use samba.tests.subunitrun.
       via  f847bb0 Use samba.tests.subunitrun in dsdb ldap and ldap_schema tests.
       via  84547fa Use samba.tests.subunitrun in urgent replication test.
       via  502f424 Include mimeparse, which is used by subunit/testtools.
       via  c845ccb ldap: Use samba.tests.subunitrun.
       via  fbf9611 deletetest: use samba.tests.subunitrun.
       via  6fbfee3 ldap_syntaxes: Use samba.tests.subunitrun.
       via  2494914 password lockout: Use samba.tests.subunitrun.
       via  0bd1fde passwords: Use samba.tests.subunitrun.
       via  fb37077 sec_descriptor: Use samba.tests.subunitrun.
       via  17f62c0 token_group: Use samba.tests.subunitrun.
       via  c42d07e sites: Use samba.tests.subunitrun.
       via  84d21d8 speedtest: Use samba.tests.subunitrun.
       via  c41dfc5 credentials test: Use samba.tests.subunitrun.
       via  8f76884 sec_descriptor test: Simplify, use samba.tests.subunitrun module.
       via  368e50f Move option handling into samba.tests.subunitrun.
       via  247974b Move option parsing to samba.tests.subunitrun.
       via  2969bbe subunitrun: Use new samba.tests.subunitrun module.
       via  4e1e255 Add convenience class for old-style Samba subunit python tests.
       via  5ef9651 Add bundled copy of 'extras' python module used by newer versions of testtools/subunit.
       via  48a92dd filter-subunit: Consistently use spaces rather than tabs.
       via  88b864a Support using system ldbmodify.
       via  daa54fd Fix subunit test suite name.
       via  d9c4441 dsdb.tests.acl: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  df1e7b9 dsdb.tests.ldap: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  27c6ebf speedtest: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  b01799a dirsync test: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  b6c9783 filter-subunit: Drop support for allow_empty_output hack.
       via  a72824b samba3dump: Add subunit-enabled test for samba3dump.
       via  7af1da1 urgent_replication: Use subunit reporting, remove allow_empty_output.
       via  defd8b3 Remove unused imports.
       via  9e69843 spoolss: retrieve published printer GUID if not in registry
       via  f296297 printing: rework nt_printer_guid_store to return errors
       via  df9b1ca printing: add nt_printer_guid_retrieve() helper
       via  5c1b979 printing: split out printer DN and GUID retrieval
       via  7c48f53 brlock: Use 0 instead of empty initializer list
       via  6eaa807 lib: texpect. Fix the build on Solaris.
       via  d770ca9 lib/texpect: prefer bsd/libutil.h if available
       via  dcb39ce lib/texpect: fix compiler warnings
       via  447c9bf lib/texpect: make the code more portable by using "replace.h" and "system/wait.h"
       via  3ad9fc5 lib/texpect: portability fix, include signal.h
       via  b3d812b build:wafadmin: fix use of spaces instead of tabs.
       via  d020a34 waf: Fix the build on openbsd
       via  5eb19c7 Initialize dwFlags field of DNS_RPC_NODE structure
       via  cb42626 VERSION: Bump version up to 4.2.1...
      from  1d4445a VERSION: Disable git snapshot for the 4.2.0 release.

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


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       | 110 ++++
 auth/credentials/tests/bind.py                     |  42 +-
 auth/ntlmssp/ntlmssp_client.c                      |  40 +-
 buildtools/wafadmin/Tools/ccroot.py                |   4 +-
 docs-xml/manpages/idmap_rid.8.xml                  |   3 -
 .../security/clientusepsnegoprincipal.xml          |   7 +
 lib/extras/.gitignore                              |  35 ++
 lib/{testtools => extras}/.testr.conf              |   0
 lib/{ccan/time => extras}/LICENSE                  |  17 +-
 lib/extras/MANIFEST.in                             |   6 +
 lib/extras/Makefile                                |  30 +
 lib/extras/NEWS                                    |  27 +
 lib/extras/README.rst                              |  57 ++
 .../helpers.py => extras/extras/__init__.py}       |  52 +-
 lib/extras/extras/tests/__init__.py                |  17 +
 .../extras/tests/test_extras.py}                   |  37 +-
 lib/extras/setup.cfg                               |   4 +
 lib/extras/setup.py                                |  48 ++
 {buildtools/wafsamba => lib/mimeparse}/__init__.py |   0
 lib/mimeparse/mimeparse.py                         | 167 +++++
 lib/mimeparse/mimeparse_test.py                    |  68 ++
 lib/mimeparse/setup.py                             |  50 ++
 lib/param/param_table.c                            |   2 +-
 lib/replace/wscript                                |   2 +-
 ...oc-util-2.0.6.sigs => pytalloc-util-2.1.2.sigs} |   0
 .../ABI/{talloc-2.1.0.sigs => talloc-2.1.2.sigs}   |   0
 lib/talloc/talloc.c                                |  17 +-
 lib/talloc/testsuite.c                             |  82 +++
 lib/talloc/wscript                                 |   2 +-
 lib/tdb/common/mutex.c                             |  35 +-
 lib/testtools/NEWS                                 | 410 +++++++++++++
 lib/texpect/texpect.c                              |  32 +-
 lib/texpect/wscript                                |   4 +-
 lib/update-external.sh                             |  15 +
 lib/wscript_build                                  |   5 +-
 libcli/auth/netlogon_creds_cli.h                   |   2 +-
 libcli/smb/smbXcli_base.c                          |   1 +
 nsswitch/libwbclient/ABI/wbclient-0.12.sigs        | 130 ++++
 nsswitch/libwbclient/wbc_idmap.c                   |  70 ++-
 nsswitch/libwbclient/wbc_pam.c                     | 198 ++++--
 nsswitch/libwbclient/wbc_pwd.c                     | 222 ++++---
 nsswitch/libwbclient/wbc_sid.c                     | 169 +++--
 nsswitch/libwbclient/wbc_util.c                    | 123 +++-
 nsswitch/libwbclient/wbclient.c                    |  90 ++-
 nsswitch/libwbclient/wbclient.h                    | 683 ++++++++++++++++++++-
 nsswitch/libwbclient/wbclient_internal.h           |  13 +-
 nsswitch/libwbclient/wscript                       |   2 +-
 nsswitch/tests/test_rfc2307_mapping.sh             |   7 +-
 nsswitch/wb_common.c                               | 181 ++++--
 nsswitch/wbinfo.c                                  |   4 +-
 nsswitch/winbind_client.h                          |  23 +-
 nsswitch/winbind_nss_aix.c                         |  30 +-
 nsswitch/winbind_nss_linux.c                       |  49 +-
 nsswitch/winbind_nss_netbsd.c                      |   3 +-
 nsswitch/winbind_nss_solaris.c                     |   9 +-
 python/samba/tests/__init__.py                     |   7 +-
 python/samba/tests/subunitrun.py                   |  75 +++
 selftest/filter-subunit                            |  74 +--
 selftest/format-subunit                            |   2 +
 selftest/selftest.pl                               |  29 +-
 selftest/selftesthelpers.py                        |  58 +-
 selftest/testlist.py                               |   7 +-
 selftest/tests.py                                  |   8 +-
 selftest/tests/test_testlist.py                    |   6 +-
 source3/include/libsmb_internal.h                  |   1 +
 source3/include/nt_printing.h                      |   6 +
 source3/libsmb/cliconnect.c                        |   2 +-
 source3/libsmb/libsmb_server.c                     |  16 +
 source3/libsmb/libsmb_stat.c                       |   8 +
 source3/libsmb/ntlmssp.c                           |  38 +-
 source3/locking/brlock.c                           |   2 +-
 source3/modules/vfs_fruit.c                        |  79 ++-
 source3/passdb/lookup_sid.c                        |  24 +
 source3/printing/nt_printing_ads.c                 | 312 +++++++---
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |  20 +-
 source3/utils/ntlm_auth.c                          |  16 +-
 source3/winbindd/wb_lookupusergroups.c             |  11 +
 source3/winbindd/wb_next_grent.c                   |  51 +-
 source4/auth/gensec/gensec_gssapi.c                |   4 +-
 source4/dsdb/tests/python/acl.py                   |  78 ++-
 source4/dsdb/tests/python/deletetest.py            | 112 ++--
 source4/dsdb/tests/python/dirsync.py               |  38 +-
 source4/dsdb/tests/python/ldap.py                  | 211 +++----
 source4/dsdb/tests/python/ldap_schema.py           |  55 +-
 source4/dsdb/tests/python/ldap_syntaxes.py         |  40 +-
 source4/dsdb/tests/python/password_lockout.py      | 189 +++---
 source4/dsdb/tests/python/passwords.py             | 232 ++++---
 source4/dsdb/tests/python/sam.py                   |  12 +-
 source4/dsdb/tests/python/sec_descriptor.py        |  36 +-
 source4/dsdb/tests/python/sites.py                 |  17 +-
 source4/dsdb/tests/python/token_group.py           |  24 +-
 source4/dsdb/tests/python/urgent_replication.py    | 127 ++--
 source4/lib/tls/tlscert.c                          |   4 +-
 source4/lib/tls/wscript                            |  22 +-
 source4/rpc_server/backupkey/dcesrv_backupkey.c    |  12 +-
 source4/rpc_server/dnsserver/dnsdata.c             |   1 +
 source4/rpc_server/wscript_build                   |   2 +-
 source4/scripting/bin/subunitrun                   |  32 +-
 source4/scripting/devel/speedtest.py               |  22 +-
 source4/selftest/test_samba3dump.sh                |  14 +
 source4/selftest/tests.py                          |  34 +-
 source4/smbd/process_standard.c                    |  12 +-
 source4/torture/winbind/struct_based.c             |   2 +-
 104 files changed, 4230 insertions(+), 1392 deletions(-)
 create mode 100644 lib/extras/.gitignore
 copy lib/{testtools => extras}/.testr.conf (100%)
 copy lib/{ccan/time => extras}/LICENSE (77%)
 create mode 100644 lib/extras/MANIFEST.in
 create mode 100644 lib/extras/Makefile
 create mode 100644 lib/extras/NEWS
 create mode 100644 lib/extras/README.rst
 copy lib/{testtools/testtools/helpers.py => extras/extras/__init__.py} (74%)
 create mode 100644 lib/extras/extras/tests/__init__.py
 copy lib/{testtools/testtools/tests/test_helpers.py => extras/extras/tests/test_extras.py} (88%)
 create mode 100644 lib/extras/setup.cfg
 create mode 100755 lib/extras/setup.py
 copy {buildtools/wafsamba => lib/mimeparse}/__init__.py (100%)
 create mode 100644 lib/mimeparse/mimeparse.py
 create mode 100644 lib/mimeparse/mimeparse_test.py
 create mode 100644 lib/mimeparse/setup.py
 copy lib/talloc/ABI/{pytalloc-util-2.0.6.sigs => pytalloc-util-2.1.2.sigs} (100%)
 copy lib/talloc/ABI/{talloc-2.1.0.sigs => talloc-2.1.2.sigs} (100%)
 create mode 100644 nsswitch/libwbclient/ABI/wbclient-0.12.sigs
 create mode 100755 python/samba/tests/subunitrun.py
 create mode 100755 source4/selftest/test_samba3dump.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index b9bd34a..0461c8c 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=2
-SAMBA_VERSION_RELEASE=0
+SAMBA_VERSION_RELEASE=1
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 0996044..3f96dcd 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,114 @@
                    =============================
+                   Release Notes for Samba 4.2.1
+                           April 15, 2015
+                   =============================
+
+
+This is the latest stable release of Samba 4.2.
+
+
+Changes since 4.2.0:
+--------------------
+
+o   Michael Adam <obnox at samba.org>
+    * BUG 8905: s3:winbind:grent: Don't stop group enumeration when a group has
+      no gid.
+    * BUG 10476: build:wafadmin: Fix use of spaces instead of tabs.
+    * BUG 11143: s3-winbind: Fix cached user group lookup of trusted domains.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 10016: s3: lib: ntlmssp: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set,
+      cope with servers that don't send the 2 unused fields.
+    * BUG 10888: s3: client: "client use spnego principal = yes" code checks
+      wrong name.
+    * BUG 11079: s3: lib: libsmbclient: If reusing a server struct, check every
+      cli->timout miliseconds if it's still valid before use.
+    * BUG 11173: s3: libcli: smb1: Ensure we correctly finish a tevent req if
+      the writev fails in the SMB1 case.
+    * BUG 11175: Fix lots of winbindd zombie processes on Solaris platform.
+    * BUG 11177: s3: libsmbclient: Add missing talloc stackframe.
+
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 11135: backupkey: Explicitly link to gnutls and gcrypt.
+    * BUG 11174: backupkey: Use ndr_pull_struct_blob_all().
+
+
+o   Ralph Boehme <slow at samba.org>
+    * BUG 11125: vfs_fruit: Enhance handling of malformed AppleDouble files.
+
+
+o   Samuel Cabrero <samuelcabrero at kernevil.me>
+    * BUG 9791: Initialize dwFlags field of DNS_RPC_NODE structure.
+
+
+o   David Disseldorp <ddiss at samba.org>
+    * BUG 11169: docs/idmap_rid: Remove deprecated base_rid from example.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 10476: waf: Fix the build on openbsd.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 11144: talloc: Version 2.1.2.
+    * BUG 11164: s4:auth/gensec_gssapi: Let gensec_gssapi_update() return
+      NT_STATUS_LOGON_FAILURE for unknown errors.
+
+
+o   Matthew Newton <matthew-git at newtoncomputing.co.uk>
+    * BUG 11149: Update libwbclient version to 0.12.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 11018: spoolss: Retrieve published printer GUID if not in registry.
+    * BUG 11135: replace: Remove superfluous check for gcrypt header.
+    * BUG 11180: s4-process_model: Do not close random fds while forking.
+    * BUG 11185: s3-passdb: Fix 'force user' with winbind default domain.
+
+
+o   Christof Schmitt <cs at samba.org>
+    * BUG 11153: brlock: Use 0 instead of empty initializer list.
+
+
+o   Thomas Schulz <schulz at adi.com>
+    * BUG 11092: lib: texpect: Fix the build on Solaris.
+    * BUG 11140: libcli/auth: Match Declaration of
+      netlogon_creds_cli_context_tmp with implementation.
+
+
+o   Jelmer Vernooij <jelmer at samba.org>
+    * BUG 11137: Backport subunit changes.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the Samba 4.2 product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+======================================================================
+
+
+                   =============================
                    Release Notes for Samba 4.2.0
                            March 04, 2015
                    =============================
diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index aa4b17a..91e493d 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -5,30 +5,20 @@
 import optparse
 import sys
 import base64
-import re
-import os
 import copy
 import time
 
 sys.path.insert(0, "bin/python")
 import samba
-samba.ensure_external_module("testtools", "testtools")
-samba.ensure_external_module("subunit", "subunit/python")
+from samba.tests.subunitrun import SubunitOptions, TestProgram
 
 import samba.getopt as options
 
-from ldb import (
-    SCOPE_BASE, SCOPE_SUBTREE, LdbError, ERR_NO_SUCH_OBJECT)
-from samba.dcerpc import security
+from ldb import SCOPE_BASE, SCOPE_SUBTREE
 
-from samba.auth import system_session
 from samba import gensec
-from samba.samdb import SamDB
-from samba.credentials import Credentials
-import samba.tests, unittest
+import samba.tests
 from samba.tests import delete_force
-from subunit.run import SubunitTestRunner
-from samba.tests import TestCase, TestSkipped
 
 parser = optparse.OptionParser("ldap [options] <host>")
 sambaopts = options.SambaOptions(parser)
@@ -37,6 +27,8 @@ parser.add_option_group(sambaopts)
 # use command line creds if available
 credopts = options.CredentialsOptions(parser)
 parser.add_option_group(credopts)
+subunitopts = SubunitOptions(parser)
+parser.add_option_group(subunitopts)
 opts, args = parser.parse_args()
 
 if len(args) < 1:
@@ -59,8 +51,11 @@ class BindTests(samba.tests.TestCase):
     def setUp(self):
         super(BindTests, self).setUp()
         # fetch rootDSEs
+
+        self.ldb = samba.tests.connect_samdb(host, credentials=creds, lp=lp, ldap_only=True)
+
         if self.info_dc is None:
-            res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
+            res = self.ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
             self.assertEquals(len(res), 1)
             BindTests.info_dc = res[0]
         # cache some of RootDSE props
@@ -76,8 +71,8 @@ class BindTests(samba.tests.TestCase):
 
     def test_computer_account_bind(self):
         # create a computer acocount for the test
-        delete_force(ldb, self.computer_dn)
-        ldb.add_ldif("""
+        delete_force(self.ldb, self.computer_dn)
+        self.ldb.add_ldif("""
 dn: """ + self.computer_dn + """
 cn: CENTOS53
 displayName: CENTOS53$
@@ -95,7 +90,7 @@ dNSHostName: centos53.alabala.test
 operatingSystemVersion: 5.2 (3790)
 operatingSystem: Windows Server 2003
 """)
-        ldb.modify_ldif("""
+        self.ldb.modify_ldif("""
 dn: """ + self.computer_dn + """
 changetype: modify
 replace: unicodePwd
@@ -112,8 +107,8 @@ unicodePwd:: """ + base64.b64encode("\"P at ssw0rd\"".encode('utf-16-le')) + """
 
     def test_user_account_bind(self):
         # create user
-        ldb.newuser(username=self.username, password=self.password)
-        ldb_res = ldb.search(base=self.domain_dn,
+        self.ldb.newuser(username=self.username, password=self.password)
+        ldb_res = self.ldb.search(base=self.domain_dn,
                                       scope=SCOPE_SUBTREE,
                                       expression="(samAccountName=%s)" % self.username)
         self.assertEquals(len(ldb_res), 1)
@@ -144,11 +139,4 @@ unicodePwd:: """ + base64.b64encode("\"P at ssw0rd\"".encode('utf-16-le')) + """
         res = ldb_user3.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
 
 
-ldb = samba.tests.connect_samdb(host, credentials=creds, lp=lp, ldap_only=True)
-
-runner = SubunitTestRunner()
-rc = 0
-if not runner.run(unittest.makeSuite(BindTests)).wasSuccessful():
-    rc = 1
-
-sys.exit(rc)
+TestProgram(module=__name__, opts=subunitopts)
diff --git a/auth/ntlmssp/ntlmssp_client.c b/auth/ntlmssp/ntlmssp_client.c
index f99257d..d8531e4c 100644
--- a/auth/ntlmssp/ntlmssp_client.c
+++ b/auth/ntlmssp/ntlmssp_client.c
@@ -132,12 +132,13 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
 		talloc_get_type_abort(gensec_security->private_data,
 				      struct gensec_ntlmssp_context);
 	struct ntlmssp_state *ntlmssp_state = gensec_ntlmssp->ntlmssp_state;
-	uint32_t chal_flags, ntlmssp_command, unkn1, unkn2;
+	uint32_t chal_flags, ntlmssp_command, unkn1 = 0, unkn2 = 0;
 	DATA_BLOB server_domain_blob;
 	DATA_BLOB challenge_blob;
 	DATA_BLOB target_info = data_blob(NULL, 0);
 	char *server_domain;
 	const char *chal_parse_string;
+	const char *chal_parse_string_short = NULL;
 	const char *auth_gen_string;
 	DATA_BLOB lm_response = data_blob(NULL, 0);
 	DATA_BLOB nt_response = data_blob(NULL, 0);
@@ -178,6 +179,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
 			chal_parse_string = "CdUdbddB";
 		} else {
 			chal_parse_string = "CdUdbdd";
+			chal_parse_string_short = "CdUdb";
 		}
 		auth_gen_string = "CdBBUUUBd";
 	} else {
@@ -185,6 +187,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
 			chal_parse_string = "CdAdbddB";
 		} else {
 			chal_parse_string = "CdAdbdd";
+			chal_parse_string_short = "CdAdb";
 		}
 
 		auth_gen_string = "CdBBAAABd";
@@ -199,10 +202,39 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
 			 &challenge_blob, 8,
 			 &unkn1, &unkn2,
 			 &target_info)) {
+
+		bool ok = false;
+
 		DEBUG(1, ("Failed to parse the NTLMSSP Challenge: (#2)\n"));
-		dump_data(2, in.data, in.length);
-		talloc_free(mem_ctx);
-		return NT_STATUS_INVALID_PARAMETER;
+
+		if (chal_parse_string_short != NULL) {
+			/*
+			 * In the case where NTLMSSP_NEGOTIATE_TARGET_INFO
+			 * is not used, some NTLMSSP servers don't return
+			 * the unused unkn1 and unkn2 fields.
+			 * See bug:
+			 * https://bugzilla.samba.org/show_bug.cgi?id=10016
+			 * for packet traces.
+			 * Try and parse again without them.
+			 */
+			ok = msrpc_parse(mem_ctx,
+				&in, chal_parse_string_short,
+				"NTLMSSP",
+				&ntlmssp_command,
+				&server_domain,
+				&chal_flags,
+				&challenge_blob, 8);
+			if (!ok) {
+				DEBUG(1, ("Failed to short parse "
+					"the NTLMSSP Challenge: (#2)\n"));
+			}
+		}
+
+		if (!ok) {
+			dump_data(2, in.data, in.length);
+			talloc_free(mem_ctx);
+			return NT_STATUS_INVALID_PARAMETER;
+		}
 	}
 
 	if (chal_flags & NTLMSSP_TARGET_TYPE_SERVER) {
diff --git a/buildtools/wafadmin/Tools/ccroot.py b/buildtools/wafadmin/Tools/ccroot.py
index d59cf26..25c5179 100644
--- a/buildtools/wafadmin/Tools/ccroot.py
+++ b/buildtools/wafadmin/Tools/ccroot.py
@@ -184,7 +184,9 @@ def get_target_name(self):
 			# the import lib file name stays unversionned.
 			name = name + '-' + nums[0]
 		elif self.env.DEST_OS == 'openbsd':
-			pattern = '%s.%s.%s' % (pattern, nums[0], nums[1])
+			pattern = '%s.%s' % (pattern, nums[0])
+			if len(nums) >= 2:
+				pattern += '.%s' % nums[1]
 
 	return os.path.join(dir, pattern % name)
 
diff --git a/docs-xml/manpages/idmap_rid.8.xml b/docs-xml/manpages/idmap_rid.8.xml
index 2db15e2..520d605 100644
--- a/docs-xml/manpages/idmap_rid.8.xml
+++ b/docs-xml/manpages/idmap_rid.8.xml
@@ -65,8 +65,6 @@
 			This means SIDs with a RID less than the base rid are filtered.
 			The default is not to restrict the allowed rids at all,
 			i.e. a base_rid value of 0.
-			A good value for the base_rid can be 1000, since user
-			RIDs by default start at 1000 (512 hexadecimal).
 		</para>
 		<para>
 			Use of this parameter is deprecated.
@@ -114,7 +112,6 @@
 
 	idmap config TRUSTED : backend  = rid
 	idmap config TRUSTED : range    = 50000 - 99999
-	idmap config TRUSTED : base_rid = 1000
 	</programlisting>
 </refsect1>
 
diff --git a/docs-xml/smbdotconf/security/clientusepsnegoprincipal.xml b/docs-xml/smbdotconf/security/clientusepsnegoprincipal.xml
index 6ec1eb1..792a738 100644
--- a/docs-xml/smbdotconf/security/clientusepsnegoprincipal.xml
+++ b/docs-xml/smbdotconf/security/clientusepsnegoprincipal.xml
@@ -14,6 +14,10 @@
     servers known only by IP address.  Kerberos relies on names, so
     ordinarily cannot function in this situation. </para>
 
+    <para>This is a VERY BAD IDEA for security reasons, and so this
+    parameter SHOULD NOT BE USED. It will be removed in a future
+    version of Samba.</para>
+
     <para>If disabled, Samba will use the name used to look up the
     server when asking the KDC for a ticket.  This avoids situations
     where a server may impersonate another, soliciting authentication
@@ -23,6 +27,9 @@
     <para>Note that Windows XP SP2 and later versions already follow
     this behaviour, and Windows Vista and later servers no longer
     supply this 'rfc4178 hint' principal on the server side.</para>
+
+    <para>This parameter is deprecated in Samba 4.2.1 and will be removed
+    (along with the functionality) in a later release of Samba.</para>
 </description>
 <value type="default">no</value>
 </samba:parameter>
diff --git a/lib/extras/.gitignore b/lib/extras/.gitignore
new file mode 100644
index 0000000..cfc114c
--- /dev/null
+++ b/lib/extras/.gitignore
@@ -0,0 +1,35 @@
+*.py[co]
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+MANIFEST
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+
+# editors
+*.swp
+*~
+
+# Testrepository
+.testrepository
diff --git a/lib/testtools/.testr.conf b/lib/extras/.testr.conf
similarity index 100%
copy from lib/testtools/.testr.conf
copy to lib/extras/.testr.conf
diff --git a/lib/ccan/time/LICENSE b/lib/extras/LICENSE
similarity index 77%
copy from lib/ccan/time/LICENSE
copy to lib/extras/LICENSE
index 89de354..4dfca45 100644
--- a/lib/ccan/time/LICENSE
+++ b/lib/extras/LICENSE
@@ -1,3 +1,12 @@
+Copyright (c) 2010-2012 the extras authors.
+
+The extras authors are:
+ * Jonathan Lange
+ * Martin Pool
+ * Robert Collins
+
+and are collectively referred to as "extras developers".
+
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
@@ -5,13 +14,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lib/extras/MANIFEST.in b/lib/extras/MANIFEST.in
new file mode 100644
index 0000000..da2696e
--- /dev/null
+++ b/lib/extras/MANIFEST.in
@@ -0,0 +1,6 @@
+include LICENSE
+include Makefile
+include MANIFEST.in
+include NEWS
+include README.rst
+include .gitignore
diff --git a/lib/extras/Makefile b/lib/extras/Makefile
new file mode 100644
index 0000000..270e8d1
--- /dev/null
+++ b/lib/extras/Makefile
@@ -0,0 +1,30 @@
+# See README.rst for copyright and licensing details.
+
+PYTHON=python
+SOURCES=$(shell find extras -name "*.py")
+
+check:
+	PYTHONPATH=$(PWD) $(PYTHON) -m testtools.run extras.tests.test_suite
+
+TAGS: ${SOURCES}
+	ctags -e -R extras/
+
+tags: ${SOURCES}
+	ctags -R extras/
+
+clean:
+	rm -f TAGS tags
+	find extras -name "*.pyc" -exec rm '{}' \;
+
+### Documentation ###
+
+apidocs:
+	# pydoctor emits deprecation warnings under Ubuntu 10.10 LTS
+	PYTHONWARNINGS='ignore::DeprecationWarning' \
+		pydoctor --make-html --add-package extras \


-- 
Samba Shared Repository


More information about the samba-cvs mailing list