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

Karolin Seeger kseeger at samba.org
Thu Apr 26 07:29:13 UTC 2018


The branch, v4-8-stable has been updated
       via  e5b036d VERSION: Disable GIT_SNAPSHOT for the 4.8.1 release.
       via  4ec9939 WHATSNEW: Add release notes for Samba 4.8.1.
       via  98fb60b s3:modules: fix the build of vfs_aixacl2.c
       via  74da4c8 ldb/tests: avoid 'return void_function();' which isn't portable
       via  8c0a598 lib/crypto: avoid 'return void_function();' which isn't portable
       via  08d5ade s3:modules: make virusfilter_io_connect_path() more portable
       via  deb624c s3:modules: fix the picky-developer build of vfs_virusfilter.c on FreeBSD 11
       via  bade8dc vfs_virusfilter: Fix CID 1428738 Macro compares unsigned to 0
       via  932bdb2 vfs_virusfilter: Fix CID 1428740 Macro compares unsigned to 0
       via  c703cfb vfs_virusfilter: Fix CID 1428739 Buffer not null terminated
       via  9e1b535 nsswitch: fix the developer build of nsswitch/wins.c on freebsd 11
       via  f0aa869 nsswitch: add some const to _nss_winbind_initgroups_dyn() prototype
       via  5cc7432 nsswitch: maintain prototypes for the linux based functions only once
       via  63d9b53 lib/replace: define __[u]intptr_t_defined if we prove an replacement
       via  f11278f s3:passdb: Do not return OK if we don't have pinfo set up
       via  cd2cc69 lib/util: remove unused '#include <sys/syscall.h>' from tests/tfork.c
       via  f8abea5 winbindd: add retry to _winbind_SendToSam
       via  71eb2d9 winbindd: add retry to _winbind_DsrUpdateReadOnlyServerDnsRecords
       via  ce6357b winbindd: add retry to _wbint_DsGetDcName
       via  f9ccb90 winbindd: add retry to _wbint_LookupSids()
       via  6e1018e winbindd: use reset_cm_connection_on_error() instead of dcerpc_binding_handle_is_connected()
       via  5bf61b0 winbindd: fix logic calling dcerpc_binding_handle_is_connected()
       via  c4fd5a3 winbindd: call dcerpc_binding_handle_is_connected() from reset_cm_connection_on_error()
       via  cde7022 winbindd: force netlogon reauth for certain errors in reset_cm_connection_on_error()
       via  7d9aa1d winbindd: call reset_cm_connection_on_error() from reconnect_need_retry()
       via  4d2968c winbindd: make reset_cm_connection_on_error() public
       via  5c701c4 winbindd: check for NT_STATUS_IO_DEVICE_ERROR in reset_cm_connection_on_error()
       via  586a0ff winbindd: add and use ldap_reconnect_need_retry() in winbindd_reconnect_ads.c
       via  1e60ca5 winbind: Keep "force_reauth" in invalidate_cm_connection
       via  ad0b42a winbind: Add smbcontrol disconnect-dc
       via  ade0d54 utils: Add destroy_netlogon_creds_cli
       via  c45c96e smbclient: Handle ENUM_DIR in "notify" command
       via  61470f6 libsmb: Handle IO_TIMEOUT in cli_smb2_notify properly
       via  daf2c88 libsmb: Handle long-running smb2cli_notify
       via  a25ec76 rpc_server: Init local_server_* in make_internal_rpc_pipe_socketpair
       via  9f3ab35 libads: Fix the build --without-ads
       via  7e01028 torture: Test compound request request counters
       via  de39857 s3:smb2_server: correctly maintain request counters for compound requests
       via  bb5526d winbindd: Do not ignore domain in the LOOKUPNAME request
       via  40ee786 Add test for wbinfo name lookup
       via  8056016 nsswitch: Fix wbcListGroups test
       via  f901e8c nsswitch: Fix wbcListUsers test
       via  d2799ab test_smbclient_s3.sh: Use correct separator in "list with backup privilege" test
       via  7abe54b s3: smbd: Unix extensions attempts to change wrong field in fchown call.
       via  bc11f28 s3: smbd: Fix memory leak in vfswrap_getwd()
       via  5afebb2 s3: lib: messages: Don't use the result of sec_init() before calling sec_init().
       via  2c3060b dsdb: Fix CID 1034966 Uninitialized scalar variable
       via  a9ed196 s3:smbd: don't use the directory cache for SMB2/3
       via  eb9085b ctdb-scripts: Drop "net serverid wipe" from 50.samba event script
       via  365569d ms_schema: fix python2.6 incompatibility
       via  9230fe2 samba-tool visualize: fix python2.6 incompatibility
       via  8e149c8 s4: torture: Test all combinations of directory open with existing directory to ensure behavior is the same.
       via  1f94e36 s4: torture: Test all combinations of directory create to ensure behavior is the same.
       via  29aa75e s4: torture: Test all combinations of file open with existing file to ensure behavior is the same.
       via  d3ac788 s4: torture: Test all combinations of file create to ensure behavior is the same.
       via  2f41822 s4: torture: Ensure a failed file create doesn't create the file.
       via  03876304 s3: smbd: Files or directories can't be opened DELETE_ON_CLOSE without delete access.
       via  879fccb ctdb-client: Client code should never free the client context
       via  a630cb9 ctdb-client: Add missing initialization of tevent_context
       via  aeed66e ctdb-client: Do not try to allocate 0 sized record
       via  25edad4 Fix invocation of gnutls_aead_cipher_encrypt()
       via  8a77ae0 Allow AESNI to be used on all processor supporting AESNI, not just Intel's This improves performance/reduced CPU usage. Tests performed: - Ran on Ivy Bridge and Ryzen and verified that AESNI is detected (crypto tests) - Ran on Ryzen, and observed 50% increased speed.
       via  58befdd s3: docs: Add documentation for "smb2" and "smb2_credits" debug classes.
       via  b5bc2f5 s3: smbd: SMB2: Add DBGC_SMB2_CREDITS class to specifically debug credit issues.
       via  e9f5476 lib: debug: Add DBGC_XXX versions of the macros to allow class-specific messages.
       via  49a9c98 s3: debug: smb2: Create a new DBGC_SMB2 debug class and mark all smbd/smb2_*.c files with it.
       via  43cbf7f lib:replace: Fix linking when libtirpc-devel overwrites system headers
       via  ccda6d9 s3:smbd: map nterror on smb2_flush errorpath
       via  f66a35b ctdb-tests: Don't use nc -d or -w options
       via  65ca557 s3: smbd: Fruit. Make the use of dom_sid_compare_domain() much clearer.
       via  47b1ec0 s4: vfs: fruit tests: Add regression test for dealing with NFS ACE entries.
       via  c45da7e selftest: vfs.fruit: add xattr_tdb where possible
       via  1f93e4d selftest: run vfs.fruit_netatalk test against seperate share
       via  134c412 s3: smbd: vfs_fruit: Replace code in fruit_fget_nt_acl() with remove_virtual_nfs_aces().
       via  9c80cb6 s3: smbd: vfs_fruit: Replace code in check_ms_nfs() with remove_virtual_nfs_aces().
       via  2fc537b s3: smbd: vfs_fruit: Add remove_virtual_nfs_aces() a generic NFS ACE remover.
       via  0aed473 s3: vfs_fruit. Change check_ms_nfs() to remove the virtual ACE's generated by fruit_fget_nt_acl().
       via  8ea9d13 s3: vfs_fruit. If the security descriptor was modified, ensure we set the flags correctly to reflect the ACE's left.
       via  9fab1dd s3: vfs_fruit: Ensure we operate on a copy of the incoming security descriptor.
       via  f1c0db3 s3: vfs_fruit. Ensure we only return one set of the 'virtual' UNIX ACE entries.
       via  6785550 s3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()
       via  a02a98a s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on error, we don't own it here.
       via  cbbb6ef s3:auth: make use of make_{server,session}_info_anonymous()
       via  f9d850d s3:rpc_server: make use of make_session_info_anonymous()
       via  a6ecafa s3:auth: add make_{server,session}_info_anonymous()
       via  07091cd s3:auth: pass the whole auth_session_info from copy_session_info_serverinfo_guest() to create_local_token()
       via  e811adb s3:auth: base make_new_session_info_system() on auth_system_user_info_dc() and auth3_create_session_info()
       via  59cf56e s3:auth: add auth3_user_info_dc_add_hints() and auth3_session_info_create()
       via  df9ae9d auth: add auth_user_info_copy() function
       via  05fad28 s3:auth: remove static from finalize_local_nt_token()
       via  aee3318 s3:auth: pass AUTH_SESSION_INFO_* flags to finalize_local_nt_token()
       via  3adb292 s3:auth: don't try to expand system or anonymous tokens in finalize_local_nt_token()
       via  2c148eb s3:auth: add add_builtin_guests() handling to finalize_local_nt_token()
       via  8557994 s3:auth: only call secrets_fetch_domain_sid() once in finalize_local_nt_token()
       via  03b4684 s3:passdb: handle dom_sid=NULL in create_builtin_{users,administrators}()
       via  253f0d1 s3:auth: move add_local_groups() out of finalize_local_nt_token()
       via  88c8499 s3:auth: add the "Unix Groups" sid for the primary gid
       via  a67e3d0 s3:auth: remove unused auth_serversupplied_info->system
       via  abffcb8 libcli/security: only announce a session as GUEST if 'Builtin\Guests' is there without 'Authenticated User'
       via  8227b0a s3:selftest: run SMB2-ANONYMOUS
       via  ebc2137 s3:torture: add SMB2-ANONYMOUS which asserts no GUEST bit for anonymous
       via  5d36aa6 VERSION: Bump version up to 4.8.1...
      from  5a9d09f VERSION: Bump version up to 4.8.0...

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


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

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       | 108 +++
 auth/auth_sam_reply.c                              |  35 +
 auth/auth_sam_reply.h                              |   3 +
 ctdb/client/client_connect.c                       |   1 -
 ctdb/client/client_db.c                            |  20 +-
 ctdb/config/events.d/50.samba                      |   2 -
 ctdb/tests/complex/30_nfs_tickle_killtcp.sh        |   2 +-
 ctdb/tests/complex/31_nfs_tickle.sh                |   2 +-
 ctdb/tests/complex/32_cifs_tickle.sh               |   2 +-
 ctdb/tests/complex/34_nfs_tickle_restart.sh        |   2 +-
 ctdb/tests/complex/36_smb_reset_server.sh          |   2 +-
 ctdb/tests/complex/37_nfs_reset_server.sh          |   2 +-
 docs-xml/smbdotconf/logging/loglevel.xml           |   2 +
 .../smbdotconf/misc/directorynamecachesize.xml     |   5 +-
 lib/crypto/aes.c                                   |  26 +-
 lib/ldb/tests/ldb_mod_op_test.c                    |   8 +-
 lib/replace/replace.h                              |   2 +
 lib/replace/wscript                                |  10 +-
 lib/util/debug.c                                   |   2 +
 lib/util/debug.h                                   |  32 +
 lib/util/tests/tfork.c                             |   1 -
 libcli/security/session.c                          |  18 +-
 libcli/smb/smb2cli_notify.c                        |  54 +-
 librpc/idl/messaging.idl                           |   1 +
 nsswitch/libwbclient/tests/wbclient.c              |  66 +-
 nsswitch/tests/test_wbinfo_name_lookup.sh          |  40 +
 nsswitch/winbind_nss.h                             |   6 +
 nsswitch/winbind_nss_freebsd.c                     |  19 -
 nsswitch/winbind_nss_linux.c                       |  24 +-
 nsswitch/winbind_nss_linux.h                       |  24 +-
 nsswitch/winbind_nss_netbsd.c                      |  26 -
 nsswitch/winbind_nss_solaris.h                     |  26 -
 nsswitch/wins.c                                    |   2 +-
 python/samba/ms_schema.py                          |   2 +-
 python/samba/netcmd/visualize.py                   |   6 +-
 selftest/target/Samba3.pm                          |  20 +-
 source3/auth/auth_builtin.c                        |   2 +-
 source3/auth/auth_ntlmssp.c                        |   5 +-
 source3/auth/auth_util.c                           | 852 ++++++++++++++++++---
 source3/auth/proto.h                               |  38 +
 source3/auth/token_util.c                          | 251 ++++--
 source3/client/client.c                            |   9 +-
 source3/include/auth.h                             |   6 +-
 source3/lib/messages.c                             |   9 +-
 source3/libads/kerberos_keytab.c                   |   4 +
 source3/libads/ldap_utils.c                        |   9 +
 source3/libsmb/cli_smb2_fnum.c                     |   9 +
 source3/modules/vfs_aixacl2.c                      |   5 +-
 source3/modules/vfs_default.c                      |   9 +-
 source3/modules/vfs_fruit.c                        |  93 ++-
 source3/modules/vfs_virusfilter.c                  |   5 +-
 source3/modules/vfs_virusfilter_utils.c            |  43 +-
 source3/passdb/machine_account_secrets.c           |   2 +-
 source3/passdb/pdb_util.c                          |  10 +-
 source3/rpc_server/rpc_ncacn_np.c                  |  31 +-
 source3/rpc_server/rpc_ncacn_np.h                  |  18 +-
 source3/rpc_server/rpc_server.c                    |   9 +-
 source3/rpc_server/srv_pipe_hnd.c                  |  18 +-
 source3/script/tests/test_smbclient_s3.sh          |  10 +-
 source3/selftest/tests.py                          |   7 +-
 source3/smbd/dir.c                                 |  32 +-
 source3/smbd/open.c                                |  12 +
 source3/smbd/smb2_break.c                          |   3 +
 source3/smbd/smb2_close.c                          |   3 +
 source3/smbd/smb2_create.c                         |   3 +
 source3/smbd/smb2_flush.c                          |   5 +-
 source3/smbd/smb2_getinfo.c                        |   3 +
 source3/smbd/smb2_glue.c                           |   3 +
 source3/smbd/smb2_ioctl.c                          |   3 +
 source3/smbd/smb2_ioctl_dfs.c                      |   3 +
 source3/smbd/smb2_ioctl_filesys.c                  |   3 +
 source3/smbd/smb2_ioctl_named_pipe.c               |   3 +
 source3/smbd/smb2_ioctl_network_fs.c               |   3 +
 source3/smbd/smb2_keepalive.c                      |   3 +
 source3/smbd/smb2_lock.c                           |   3 +
 source3/smbd/smb2_negprot.c                        |   3 +
 source3/smbd/smb2_notify.c                         |   3 +
 source3/smbd/smb2_query_directory.c                |  12 +-
 source3/smbd/smb2_read.c                           |   3 +
 source3/smbd/smb2_server.c                         |  57 +-
 source3/smbd/smb2_sesssetup.c                      |   3 +
 source3/smbd/smb2_setinfo.c                        |   3 +
 source3/smbd/smb2_tcon.c                           |   3 +
 source3/smbd/smb2_write.c                          |   3 +
 source3/smbd/trans2.c                              |   4 +-
 source3/torture/proto.h                            |   1 +
 source3/torture/test_smb2.c                        |  42 +
 source3/torture/torture.c                          |   1 +
 source3/utils/destroy_netlogon_creds_cli.c         | 137 ++++
 source3/utils/smbcontrol.c                         |  14 +
 source3/utils/wscript_build                        |   9 +
 source3/winbindd/winbindd.c                        |   4 +
 source3/winbindd/winbindd_cm.c                     |  18 +-
 source3/winbindd/winbindd_dual.c                   |  21 +-
 source3/winbindd/winbindd_dual_srv.c               | 144 ++--
 source3/winbindd/winbindd_lookupname.c             |  33 +-
 source3/winbindd/winbindd_proto.h                  |  15 +
 source3/winbindd/winbindd_reconnect.c              |   8 +-
 source3/winbindd/winbindd_reconnect_ads.c          |  58 +-
 source4/dsdb/samdb/ldb_modules/encrypted_secrets.c |   6 +-
 source4/dsdb/samdb/ldb_modules/samldb.c            |   1 +
 source4/torture/basic/delete.c                     | 257 ++++++-
 source4/torture/smb2/compound.c                    |  77 ++
 source4/torture/vfs/fruit.c                        | 171 +++++
 105 files changed, 2738 insertions(+), 517 deletions(-)
 create mode 100755 nsswitch/tests/test_wbinfo_name_lookup.sh
 create mode 100644 source3/utils/destroy_netlogon_creds_cli.c


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 2f7a2d1..03071b3 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=8
-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 cea642b..c5bbe29 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,112 @@
                    =============================
+                   Release Notes for Samba 4.8.1
+                           April 26, 2018
+                   =============================
+
+
+This is the latest stable release of the Samba 4.8 release series.
+
+
+Changes since 4.8.0:
+--------------------
+
+o  Jeremy Allison <jra at samba.org>
+   * BUG 13244: s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on
+     error, we don't own it here.
+   * BUG 13270: s3: smbd: Fix possible directory fd leak if the underlying OS
+     doesn't support fdopendir().
+   * BUG 13319: Round-tripping ACL get/set through vfs_fruit will increase the
+     number of ACE entries without limit.
+   * BUG 13347: s3: smbd: SMB2: Add DBGC_SMB2_CREDITS class to specifically
+     debug credit issues.
+   * BUG 13358: s3: smbd: Files or directories can't be opened DELETE_ON_CLOSE
+     without delete access.
+   * BUG 13372: s3: smbd: Fix memory leak in vfswrap_getwd().
+   * BUG 13375: s3: smbd: Unix extensions attempts to change wrong field in
+     fchown call.
+
+o  Björn Baumbach <bb at sernet.de>
+   * BUG 13337: ms_schema/samba-tool visualize: Fix python2.6 incompatibility.
+
+o  Timur I. Bakeyev <timur at iXsystems.com>
+   * BUG 13352: Fix invocation of gnutls_aead_cipher_encrypt().
+
+o  Ralph Boehme <slow at samba.org>
+   * BUG 13328: Windows 10 cannot logon on Samba NT4 domain.
+   * BUG 13332: winbindd: Recover loss of netlogon secure channel in case the
+     peer DC is rebooted.
+   * BUG 13363: s3:smbd: Don't use the directory cache for SMB2/3.
+
+o  Amitay Isaacs <amitay at gmail.com>
+   * BUG 13356: ctdb-client: Fix bugs in client code.
+   * BUG 13359: ctdb-scripts: Drop "net serverid wipe" from 50.samba event
+     script.
+
+o  Lutz Justen <ljusten at google.com>
+   * BUG 13368: s3: lib: messages: Don't use the result of sec_init() before
+     calling sec_init().
+
+o  Volker Lendecke <vl at samba.org>
+   * BUG 13273: libads: Fix the build '--without-ads'.
+   * BUG 13332: winbind: Keep "force_reauth" in invalidate_cm_connection,
+     add 'smbcontrol disconnect-dc'.
+   * BUG 13343: vfs_virusfilter: Fix CIDs 1428738-1428740.
+   * BUG 13367: dsdb: Fix CID 1034966 Uninitialized scalar variable.
+   * BUG 13370: rpc_server: Fix core dump in dfsgetinfo.
+   * BUG 13382: smbclient: Fix notify.
+
+o  Stefan Metzmacher <metze at samba.org>
+   * BUG 13215: Fix smbd panic if the client-supplied channel sequence number
+     wraps.
+   * BUG 13328: Windows 10 cannot logon on Samba NT4 domain.
+   * BUG 13342: lib/util: Remove unused '#include <sys/syscall.h>' from
+     tests/tfork.c.
+   * BUG 13343:	Fix build errors with cc from developerstudio 12.5 on Solaris.
+   * BUG 13344: Fix the picky-developer build on FreeBSD 11.
+   * BUG 13345: s3:modules: Fix the build of vfs_aixacl2.c.
+
+o  Anton Nefedov
+   * BUG 13338: s3:smbd: map nterror on smb2_flush errorpath.
+
+o  Noel Power <noel.power at suse.com>
+   * BUG 13341: lib:replace: Fix linking when libtirpc-devel overwrites system
+     headers.
+
+o  Christof Schmitt <cs at samba.org>
+   * BUG 13312: winbindd: 'wbinfo --name-to-sid' returns misleading result on
+     invalid query.
+
+o  Andreas Schneider <asn at samba.org>
+   * BUG 13376: s3:passdb: Do not return OK if we don't have pinfo set up.
+
+o  Eric Vannier <evannier at google.com>
+   * BUG 13302: Allow AESNI to be used on all processor supporting AESNI.
+
+
+#######################################
+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.1 and newer" 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.8.0
                            March 13, 2018
                    =============================
diff --git a/auth/auth_sam_reply.c b/auth/auth_sam_reply.c
index 15d17b0..bd69515 100644
--- a/auth/auth_sam_reply.c
+++ b/auth/auth_sam_reply.c
@@ -333,6 +333,41 @@ NTSTATUS make_user_info_SamBaseInfo(TALLOC_CTX *mem_ctx,
 	return NT_STATUS_OK;
 }
 
+struct auth_user_info *auth_user_info_copy(TALLOC_CTX *mem_ctx,
+					   const struct auth_user_info *src)
+{
+	struct auth_user_info *dst = NULL;
+
+	dst = talloc_zero(mem_ctx, struct auth_user_info);
+	if (dst == NULL) {
+		return NULL;
+	}
+
+	*dst = *src;
+#define _COPY_STRING(_mem, _str) do { \
+	if ((_str) != NULL) { \
+		(_str) = talloc_strdup((_mem), (_str)); \
+		if ((_str) == NULL) { \
+			TALLOC_FREE(dst); \
+			return NULL; \
+		} \
+	} \
+} while(0)
+	_COPY_STRING(dst, dst->account_name);
+	_COPY_STRING(dst, dst->user_principal_name);
+	_COPY_STRING(dst, dst->domain_name);
+	_COPY_STRING(dst, dst->dns_domain_name);
+	_COPY_STRING(dst, dst->full_name);
+	_COPY_STRING(dst, dst->logon_script);
+	_COPY_STRING(dst, dst->profile_path);
+	_COPY_STRING(dst, dst->home_directory);
+	_COPY_STRING(dst, dst->home_drive);
+	_COPY_STRING(dst, dst->logon_server);
+#undef _COPY_STRING
+
+	return dst;
+}
+
 /**
  * Make a user_info_dc struct from the info3 returned by a domain logon
  */
diff --git a/auth/auth_sam_reply.h b/auth/auth_sam_reply.h
index 4aa3096..e4b26e9 100644
--- a/auth/auth_sam_reply.h
+++ b/auth/auth_sam_reply.h
@@ -38,6 +38,9 @@ NTSTATUS make_user_info_SamBaseInfo(TALLOC_CTX *mem_ctx,
 				    bool authenticated,
 				    struct auth_user_info **_user_info);
 
+struct auth_user_info *auth_user_info_copy(TALLOC_CTX *mem_ctx,
+					   const struct auth_user_info *src);
+
 NTSTATUS auth_convert_user_info_dc_saminfo6(TALLOC_CTX *mem_ctx,
 					   const struct auth_user_info_dc *user_info_dc,
 					   struct netr_SamInfo6 **_sam6);
diff --git a/ctdb/client/client_connect.c b/ctdb/client/client_connect.c
index 89a602d..1e4157e 100644
--- a/ctdb/client/client_connect.c
+++ b/ctdb/client/client_connect.c
@@ -297,7 +297,6 @@ static void client_dead_handler(void *private_data)
 	ctdb_client_callback_func_t callback = client->callback;
 	void *callback_data = client->private_data;
 
-	talloc_free(client);
 	if (callback != NULL) {
 		callback(callback_data);
 		return;
diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c
index e86830e..c0ecdeb 100644
--- a/ctdb/client/client_db.c
+++ b/ctdb/client/client_db.c
@@ -1191,6 +1191,7 @@ struct tevent_req *ctdb_fetch_lock_send(TALLOC_CTX *mem_ctx,
 	if (tevent_req_nomem(state->h, req)) {
 		return tevent_req_post(req, ev);
 	}
+	state->h->ev = ev;
 	state->h->client = client;
 	state->h->db = db;
 	state->h->key.dptr = talloc_memdup(state->h, key.dptr, key.dsize);
@@ -1413,14 +1414,19 @@ struct ctdb_record_handle *ctdb_fetch_lock_recv(struct tevent_req *req,
 		offset = ctdb_ltdb_header_len(&h->header);
 
 		data->dsize = h->data.dsize - offset;
-		data->dptr = talloc_memdup(mem_ctx, h->data.dptr + offset,
-					   data->dsize);
-		if (data->dptr == NULL) {
-			TALLOC_FREE(state->h);
-			if (perr != NULL) {
-				*perr = ENOMEM;
+		if (data->dsize == 0) {
+			data->dptr = NULL;
+		} else {
+			data->dptr = talloc_memdup(mem_ctx,
+						   h->data.dptr + offset,
+						   data->dsize);
+			if (data->dptr == NULL) {
+				TALLOC_FREE(state->h);
+				if (perr != NULL) {
+					*perr = ENOMEM;
+				}
+				return NULL;
 			}
-			return NULL;
 		}
 	}
 
diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba
index 4c32e4e..f0d8e84 100755
--- a/ctdb/config/events.d/50.samba
+++ b/ctdb/config/events.d/50.samba
@@ -53,8 +53,6 @@ service_start ()
     # start Samba service. Start it reniced, as under very heavy load
     # the number of smbd processes will mean that it leaves few cycles
     # for anything else
-    net serverid wipe
-
     if [ -n "$CTDB_SERVICE_NMB" ] ; then
 	nice_service "$CTDB_SERVICE_NMB" start || die "Failed to start nmbd"
     fi
diff --git a/ctdb/tests/complex/30_nfs_tickle_killtcp.sh b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
index d1e7d71..40ec6ba 100755
--- a/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
+++ b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
@@ -46,7 +46,7 @@ test_port=2049
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with netcat..."
 
-nc -d -w 30 $test_ip $test_port &
+sleep 30 | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/ctdb/tests/complex/31_nfs_tickle.sh b/ctdb/tests/complex/31_nfs_tickle.sh
index c82d31d..0b6990f 100755
--- a/ctdb/tests/complex/31_nfs_tickle.sh
+++ b/ctdb/tests/complex/31_nfs_tickle.sh
@@ -54,7 +54,7 @@ test_port=2049
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with netcat..."
 
-nc -d -w $(($monitor_interval * 4)) $test_ip $test_port &
+sleep $((monitor_interval * 4)) | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/ctdb/tests/complex/32_cifs_tickle.sh b/ctdb/tests/complex/32_cifs_tickle.sh
index da369b9..3668245 100755
--- a/ctdb/tests/complex/32_cifs_tickle.sh
+++ b/ctdb/tests/complex/32_cifs_tickle.sh
@@ -52,7 +52,7 @@ test_port=445
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with netcat..."
 
-nc -d -w $(($monitor_interval * 4)) $test_ip $test_port &
+sleep $((monitor_interval * 4)) | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/ctdb/tests/complex/34_nfs_tickle_restart.sh b/ctdb/tests/complex/34_nfs_tickle_restart.sh
index 6350db6..2aab061 100755
--- a/ctdb/tests/complex/34_nfs_tickle_restart.sh
+++ b/ctdb/tests/complex/34_nfs_tickle_restart.sh
@@ -53,7 +53,7 @@ test_port=2049
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with netcat..."
 
-nc -d -w 600 $test_ip $test_port &
+sleep 600 | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/ctdb/tests/complex/36_smb_reset_server.sh b/ctdb/tests/complex/36_smb_reset_server.sh
index 5723ac7..beff1a2 100755
--- a/ctdb/tests/complex/36_smb_reset_server.sh
+++ b/ctdb/tests/complex/36_smb_reset_server.sh
@@ -52,7 +52,7 @@ sleep_for 5
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with nc..."
 
-nc -d -w $(($monitor_interval * 4)) $test_ip $test_port &
+sleep $((monitor_interval * 4)) | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/ctdb/tests/complex/37_nfs_reset_server.sh b/ctdb/tests/complex/37_nfs_reset_server.sh
index d6dd0f0..07bd034 100755
--- a/ctdb/tests/complex/37_nfs_reset_server.sh
+++ b/ctdb/tests/complex/37_nfs_reset_server.sh
@@ -52,7 +52,7 @@ sleep_for 5
 
 echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with nc..."
 
-nc -d -w $(($monitor_interval * 4)) $test_ip $test_port &
+sleep $((monitor_interval * 4)) | nc $test_ip $test_port &
 nc_pid=$!
 ctdb_test_exit_hook_add "kill $nc_pid >/dev/null 2>&1"
 
diff --git a/docs-xml/smbdotconf/logging/loglevel.xml b/docs-xml/smbdotconf/logging/loglevel.xml
index 1a3767d..d3b5c45 100644
--- a/docs-xml/smbdotconf/logging/loglevel.xml
+++ b/docs-xml/smbdotconf/logging/loglevel.xml
@@ -22,6 +22,8 @@
 	<listitem><para><parameter moreinfo="none">printdrivers</parameter></para></listitem>
 	<listitem><para><parameter moreinfo="none">lanman</parameter></para></listitem>
 	<listitem><para><parameter moreinfo="none">smb</parameter></para></listitem>
+	<listitem><para><parameter moreinfo="none">smb2</parameter></para></listitem>
+	<listitem><para><parameter moreinfo="none">smb2_credits</parameter></para></listitem>
 	<listitem><para><parameter moreinfo="none">rpc_parse</parameter></para></listitem>
 	<listitem><para><parameter moreinfo="none">rpc_srv</parameter></para></listitem>
 	<listitem><para><parameter moreinfo="none">rpc_cli</parameter></para></listitem>
diff --git a/docs-xml/smbdotconf/misc/directorynamecachesize.xml b/docs-xml/smbdotconf/misc/directorynamecachesize.xml
index 7a89bf2..22999a6 100644
--- a/docs-xml/smbdotconf/misc/directorynamecachesize.xml
+++ b/docs-xml/smbdotconf/misc/directorynamecachesize.xml
@@ -4,8 +4,9 @@
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
 	<para>
-	This parameter specifies the size of the directory name cache.
-	It will be needed to turn this off for *BSD systems.
+	This parameter specifies the size of the directory name cache for SMB1
+	connections. It is not used for SMB2. It will be needed to turn this off
+	for *BSD systems.
 	</para>
 
 </description>
diff --git a/lib/crypto/aes.c b/lib/crypto/aes.c
index c226ac1..4ff019a 100644
--- a/lib/crypto/aes.c
+++ b/lib/crypto/aes.c
@@ -66,22 +66,6 @@ static bool has_intel_aes_instructions(void)
 		return (bool)has_aes_instructions;
 	}
 
-	__cpuid(cpuid_results, 0);
-	/*
-	 *        MSB         LSB
-	 *  EBX = 'u' 'n' 'e' 'G'
-	 *  EDX = 'I' 'e' 'n' 'i'
-	 *  ECX = 'l' 'e' 't' 'n'
-	 */
-	if (memcmp((unsigned char *)&cpuid_results[1], "Genu", 4) != 0 ||
-			memcmp((unsigned char *)&cpuid_results[3],
-				"ineI", 4) != 0 ||
-			memcmp((unsigned char *)&cpuid_results[2],
-				"ntel", 4) != 0) {
-		has_aes_instructions = 0;
-		return (bool)has_aes_instructions;
-	}
-
 	__cpuid(cpuid_results, 1);
 	has_aes_instructions = !!(cpuid_results[2] & (1 << 25));
 	return (bool)has_aes_instructions;
@@ -252,18 +236,20 @@ void
 AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
 {
 	if (has_intel_aes_instructions()) {
-		return AES_encrypt_aesni(in, out, key);
+		AES_encrypt_aesni(in, out, key);
+		return;
 	}
-	return AES_encrypt_rj(in, out, key);
+	AES_encrypt_rj(in, out, key);
 }
 
 void
 AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
 {
 	if (has_intel_aes_instructions()) {
-		return AES_decrypt_aesni(in, out, key);
+		AES_decrypt_aesni(in, out, key);
+		return;
 	}
-	return AES_decrypt_rj(in, out, key);
+	AES_decrypt_rj(in, out, key);
 }
 
 #endif /* SAMBA_RIJNDAEL */
diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
index 766ca79..0f8642d 100644
--- a/lib/ldb/tests/ldb_mod_op_test.c
+++ b/lib/ldb/tests/ldb_mod_op_test.c
@@ -1914,22 +1914,22 @@ static void test_ldb_modify_during_search(void **state, bool add_index,
 
 static void test_ldb_modify_during_indexed_search(void **state)
 {
-	return test_ldb_modify_during_search(state, true, false);
+	test_ldb_modify_during_search(state, true, false);
 }
 
 static void test_ldb_modify_during_unindexed_search(void **state)
 {
-	return test_ldb_modify_during_search(state, false, false);
+	test_ldb_modify_during_search(state, false, false);
 }
 
 static void test_ldb_rename_during_indexed_search(void **state)
 {
-	return test_ldb_modify_during_search(state, true, true);
+	test_ldb_modify_during_search(state, true, true);
 }
 
 static void test_ldb_rename_during_unindexed_search(void **state)
 {
-	return test_ldb_modify_during_search(state, false, true);
+	test_ldb_modify_during_search(state, false, true);
 }
 
 /*
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 128978c..3304cda 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -691,10 +691,12 @@ typedef int bool;
 
 #if !defined(HAVE_INTPTR_T)
 typedef long long intptr_t ;
+#define __intptr_t_defined
 #endif
 
 #if !defined(HAVE_UINTPTR_T)
 typedef unsigned long long uintptr_t ;
+#define __uintptr_t_defined
 #endif
 
 #if !defined(HAVE_PTRDIFF_T)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 2c638b7..0e04bf7 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -68,7 +68,15 @@ def configure(conf):
     conf.CHECK_HEADERS('aio.h sys/unistd.h alloca.h float.h')
 
     conf.SET_TARGET_TYPE('tirpc', 'EMPTY')
-    conf.CHECK_HEADERS('rpc/rpc.h rpc/nettype.h')
+
+    if conf.CHECK_CODE(
+            '\n#ifndef _TIRPC_RPC_H\n#error "no tirpc headers in system path"\n#endif\n',
+            'HAVE_RPC_RPC_HEADERS',
+            headers=['rpc/rpc.h', 'rpc/nettype.h'],
+            msg='Checking for tirpc rpc headers in default system path'):
+        if conf.CONFIG_SET('HAVE_RPC_RPC_H'):
+            conf.undefine('HAVE_RPC_RPC_H')
+
     if not conf.CONFIG_SET('HAVE_RPC_RPC_H'):
         if conf.CHECK_CFG(package='libtirpc', args='--cflags --libs',
                        msg='Checking for libtirpc headers',
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 6428550..d010b72 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -541,6 +541,8 @@ static const char *default_classname_table[] = {
 	[DBGC_AUTH_AUDIT_JSON] = "auth_json_audit",
 	[DBGC_KERBEROS] =       "kerberos",
 	[DBGC_DRS_REPL] =       "drs_repl",
+	[DBGC_SMB2] =           "smb2",
+	[DBGC_SMB2_CREDITS] =   "smb2_credits",
 };
 
 /*
diff --git a/lib/util/debug.h b/lib/util/debug.h
index e82553a..1e184b4 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -93,6 +93,8 @@ bool dbghdr( int level, const char *location, const char *func);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list