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

Karolin Seeger kseeger at samba.org
Mon May 9 12:05:12 UTC 2016


The branch, v4-3-test has been updated
       via  133e196 s3:libnet:libnet_join: add netbios aliases as SPNs
       via  313ba1d init: set core file size to unlimited by default
       via  6d7ed01 source3: Honor the core soft limit of the OS.
       via  568ce3b heimdal: encode/decode kvno as signed integer
       via  d926b8b vfs_fruit: add an option that allows disabling POSIX rename behaviour
       via  7916bd8 s3:smbd/filename remove smelly code
       via  859080c s3:smbd/service apply some code formatting
       via  e21f43a s3:smbd/service disable case-sensitivity for SMB2/3 connections
       via  4598743 Correctly set cli->raw_status for libsmbclient in SMB2 code
      from  a417e10 VERSION: Bump version up to 4.3.10...

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


- Log -----------------------------------------------------------------
commit 133e1968a443a0aa0b80bcf74d47b5b0ddf1c3c3
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Apr 26 17:21:46 2016 +0200

    s3:libnet:libnet_join: add netbios aliases as SPNs
    
    Add all listed smb.conf netbios aliases as SPNs to the machine account:
    
      HOST/NETBIOS_ALIAS at REALM
    
    and
    
      HOST/netbios_alias.dnsdomain.name at REALM
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=1703
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Wed May  4 17:58:05 CEST 2016 on sn-devel-144
    
    Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-3-test): Mon May  9 14:04:05 CEST 2016 on sn-devel-104

commit 313ba1dec50222d9231cd748e46eae5ec8c1c672
Author: Raghavendra Talur <rtalur at redhat.com>
Date:   Mon May 2 16:14:06 2016 +0530

    init: set core file size to unlimited by default
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11907
    
    Signed-off-by: Raghavendra Talur <rtalur at redhat.com>
    
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jose A. Rivera <jarrpa at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Fri May  6 19:15:17 CEST 2016 on sn-devel-144
    
    (cherry picked from commit ebd139c4db7e51a2d7843a773991f15cadf504dd)

commit 6d7ed01ce3afca6012b3c97f762c55bedd60ce94
Author: Ira Cooper <ira at samba.org>
Date:   Thu Mar 3 13:47:32 2016 -0500

    source3: Honor the core soft limit of the OS.
    
    We should honor the soft limits set by the operating system.
    
    In any case, 16M doesn't make a useful coredump for modern
    Samba.
    
    Signed-off-by: Ira Cooper <ira at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Mar  5 00:39:48 CET 2016 on sn-devel-144
    
    (cherry picked from commit 58d3462bc58290d8eb5e554c6c59cf6b73ccf58a)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11907

commit 568ce3be78fd7a57e8b0f99c5af1fcbd5e7c3b32
Author: Uri Simchoni <uri at samba.org>
Date:   Thu May 5 23:40:22 2016 +0300

    heimdal: encode/decode kvno as signed integer
    
    This patch changes the encoding/decoding of kvno (key version number)
    in blobs and packets to signed integer, for compatibility with Windows.
    Reportedly, MIT Kerberos does the same.
    
    This patch effectively reverts commit 1124c4872dfb81bec9c4b527b8927ca35e39a599
    in the heimdal tree.
    
    According to the Kerberos spec (RFC 4120 5.2.9), the kvno field
    in encrypted data object is an unsigned integer that fits in
    32 bits. The Heimdal Kerberos component bundled with Samba
    conforms to this. However, Windows deviates from the standard
    and encodes kvno as a signed integer, and this creates
    interoperability issues.
    
    ASN.1 DER has no special encoding for unsigned integer. A 32-bit
    unsigned integer is encoded as a signed integer, so while a signed
    32-bit integer (covering the range of -0x80000000..0x7fffffff) is
    encoded using up to 4 bytes, an unsigned integer (covering
    0..0xffffffff) could require 5 bytes.
    
    Normally, kvno for a given account starts at 1 and increments on
    password changes. Kerberos defined this as unsigned because there's
    no meaning for negative version numbers, so the standard writers figured
    4 billion versions is better than 2 billion. It was not
    expected for a kvno to really go past 0x7fffffff and the disctinction
    usually does not matter. However, RODCs use kvnos which
    have the most-significant bit set.
    
    In Active Directory, RODCs have a private secret for the krbtgt,
    because the assumption is that the RODC is less secure, and
    recovering the domain krbtgt secret from the RODC would compromise
    the security of the entire domain. The kvno field is being used
    to identify the private krbtgt account that owns the key - the
    upper 16 bits are the RODC id, and the lower 16 bits identify
    the key version number for this specific RODC. It's common to
    have an RODC id greater than 0x8000, and therefore to have a
    kvno larger than 0x7fffffff, which would be DER-encoded using
    5 bytes.
    
    Windows encodes kvno as signed integer - basically taking the
    32 bits and treating them as a signed integer rather than an
    unsigned integer. This means that in Windows a kvno can
    always be encoded using 4 bytes, and Windows DCs reject a kvno
    encoded using more than 4 bytes without even generating an error
    response (the DC assumes it's an attack).
    
    Heimdal re-encodes the TGT when it creates a TGS request. Obviously
    it cannot decode and encode the encrypted parts but it does re-encode
    the plain parts, which include the kvno. That leads to a 5-byte
    kvno in the TGS request, which is rejected without an error
    response.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11900
    
    Signed-off-by: Uri Simchoni <uri at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Sat May  7 21:14:21 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 6379737b7ddc6ccb752238c5820cc62e76a8da17)

commit d926b8be2f186f250af15a6071678c9fb2641485
Author: Ralph Boehme <slow at samba.org>
Date:   Mon Apr 11 12:17:22 2016 +0200

    vfs_fruit: add an option that allows disabling POSIX rename behaviour
    
    https://bugzilla.samba.org/show_bug.cgi?id=11721
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu May  5 00:04:50 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 625dcef765adc75c34ee5955a08c6cb77b87f41b)

commit 7916bd8f507d916b5031475c557bb89c054b8b44
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Apr 5 02:58:48 2016 +0200

    s3:smbd/filename remove smelly code
    
    not sure how this chunk ended up there, but I agree with
    the statement in the comment that behavior should not depend
    on developer mode
    
    make test does not seem to depend on it anymore.
    
    This piece had some bad influence on the tests I wrote
    for case insensitivite behavior of SMB2/3, so let us
    remove this technical debt.
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    The last 3 patches address
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11438

commit 859080c5783fb1c8ed18e472dc96cff47039b7ce
Author: Christian Ambach <ambi at samba.org>
Date:   Sun Apr 3 05:16:45 2016 +0200

    s3:smbd/service apply some code formatting
    
    reduce indentation in switch statement, obey 80 char line limit, use C99 bool
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e21f43a787ed3bac799a6b4b9fae299ce875bd5b
Author: Christian Ambach <ambi at samba.org>
Date:   Sun Apr 3 05:06:05 2016 +0200

    s3:smbd/service disable case-sensitivity for SMB2/3 connections
    
    in SMB2, there is no flag to let us know if the client wants to have case-sensitive behavior,
    so in Auto mode, disable case-sensitivity
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=11438
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 4598743b53aa9153751c76297c0d2c35b8d83405
Author: Robin McCorkell <robin at mccorkell.me.uk>
Date:   Mon May 2 21:48:14 2016 +0100

    Correctly set cli->raw_status for libsmbclient in SMB2 code
    
    The SMB2 file handling code wasn't correctly setting raw_status, which
    is used by libsmbclient to report file open errors etc.
    
    https://bugzilla.samba.org/show_bug.cgi?id=11276
    
    Signed-off-by: Robin McCorkell <robin at mccorkell.me.uk>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 2a872e2b66f373b3c96b315b13c9f06a15522e13)

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

Summary of changes:
 docs-xml/manpages/vfs_fruit.8.xml  | 11 +++++++
 packaging/RHEL-CTDB/setup/smb.init |  1 +
 packaging/RHEL/setup/smb.init      |  1 +
 packaging/systemd/smb.service      |  1 +
 source3/lib/dumpcore.c             | 15 ----------
 source3/libnet/libnet_join.c       | 60 ++++++++++++++++++++++++++++++++++++++
 source3/libsmb/cli_smb2_fnum.c     | 16 +++++++++-
 source3/modules/vfs_fruit.c        |  6 +++-
 source3/smbd/filename.c            | 28 ------------------
 source3/smbd/service.c             | 50 ++++++++++++++++++-------------
 source4/heimdal/kdc/misc.c         |  2 +-
 source4/heimdal/lib/asn1/krb5.asn1 |  2 +-
 source4/torture/rpc/lsa.c          |  2 +-
 13 files changed, 126 insertions(+), 69 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml
index 80c565c..9f38dff 100644
--- a/docs-xml/manpages/vfs_fruit.8.xml
+++ b/docs-xml/manpages/vfs_fruit.8.xml
@@ -226,6 +226,17 @@
 	    </listitem>
 	  </varlistentry>
 
+	  <varlistentry>
+	    <term>fruit:posix_rename = yes | no</term>
+	    <listitem>
+	      <para>Whether to enable POSIX directory rename behaviour
+	      for OS X clients. Without this, directories can't be
+	      renamed if any client has any file inside it
+	      (recursive!) open.</para>
+	      <para>The default is <emphasis>yes</emphasis>.</para>
+	    </listitem>
+	  </varlistentry>
+
 	</variablelist>
 </refsect1>
 
diff --git a/packaging/RHEL-CTDB/setup/smb.init b/packaging/RHEL-CTDB/setup/smb.init
index 4dd5b23..00984d2 100644
--- a/packaging/RHEL-CTDB/setup/smb.init
+++ b/packaging/RHEL-CTDB/setup/smb.init
@@ -51,6 +51,7 @@ RETVAL=0
 start() {
 	KIND="SMB"
 	echo -n $"Starting $KIND services: "
+	ulimit -c unlimited
 	daemon smbd $SMBDOPTIONS
 	RETVAL=$?
 	echo
diff --git a/packaging/RHEL/setup/smb.init b/packaging/RHEL/setup/smb.init
index af85b2c..dff9cd8 100644
--- a/packaging/RHEL/setup/smb.init
+++ b/packaging/RHEL/setup/smb.init
@@ -50,6 +50,7 @@ RETVAL=0
 start() {
 	KIND="SMB"
 	echo -n $"Starting $KIND services: "
+	ulimit -c unlimited
 	daemon smbd $SMBDOPTIONS
 	RETVAL=$?
 	echo
diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service
index 9810891..6053a5c 100644
--- a/packaging/systemd/smb.service
+++ b/packaging/systemd/smb.service
@@ -10,6 +10,7 @@ LimitNOFILE=16384
 EnvironmentFile=-/etc/sysconfig/samba
 ExecStart=/usr/sbin/smbd $SMBDOPTIONS
 ExecReload=/usr/bin/kill -HUP $MAINPID
+LimitCORE=infinity
 
 [Install]
 WantedBy=multi-user.target
diff --git a/source3/lib/dumpcore.c b/source3/lib/dumpcore.c
index 487ccec..c72aa88 100644
--- a/source3/lib/dumpcore.c
+++ b/source3/lib/dumpcore.c
@@ -251,21 +251,6 @@ void dump_core_setup(const char *progname, const char *log_file)
 		goto out;
 	}
 
-
-#ifdef HAVE_GETRLIMIT
-#ifdef RLIMIT_CORE
-	{
-		struct rlimit rlp;
-		getrlimit(RLIMIT_CORE, &rlp);
-		rlp.rlim_cur = MAX(16*1024*1024,rlp.rlim_cur);
-		setrlimit(RLIMIT_CORE, &rlp);
-		getrlimit(RLIMIT_CORE, &rlp);
-		DEBUG(3,("Maximum core file size limits now %d(soft) %d(hard)\n",
-			 (int)rlp.rlim_cur,(int)rlp.rlim_max));
-	}
-#endif
-#endif
-
 	/* FIXME: if we have a core-plus-pid facility, configurably set
 	 * this up here.
 	 */
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 56ddec1..632b81c 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -394,6 +394,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
 	size_t num_spns = 0;
 	char *spn = NULL;
 	bool ok;
+	const char **netbios_aliases = NULL;
 
 	/* Find our DN */
 
@@ -455,6 +456,65 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
 		}
 	}
 
+	netbios_aliases = lp_netbios_aliases();
+	if (netbios_aliases != NULL) {
+		for (; *netbios_aliases != NULL; netbios_aliases++) {
+			/*
+			 * Add HOST/NETBIOSNAME
+			 */
+			spn = talloc_asprintf(mem_ctx, "HOST/%s", *netbios_aliases);
+			if (spn == NULL) {
+				TALLOC_FREE(spn);
+				return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+			}
+			if (!strupper_m(spn)) {
+				TALLOC_FREE(spn);
+				return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+			}
+
+			ok = ads_element_in_array(spn_array, num_spns, spn);
+			if (ok) {
+				TALLOC_FREE(spn);
+				continue;
+			}
+			ok = add_string_to_array(spn_array, spn,
+						 &spn_array, &num_spns);
+			if (!ok) {
+				TALLOC_FREE(spn);
+				return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+			}
+			TALLOC_FREE(spn);
+
+			/*
+			 * Add HOST/netbiosname.domainname
+			 */
+			if (r->out.dns_domain_name == NULL) {
+				continue;
+			}
+			fstr_sprintf(my_fqdn, "%s.%s",
+				     *netbios_aliases,
+				     r->out.dns_domain_name);
+
+			spn = talloc_asprintf(mem_ctx, "HOST/%s", my_fqdn);
+			if (spn == NULL) {
+				return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+			}
+
+			ok = ads_element_in_array(spn_array, num_spns, spn);
+			if (ok) {
+				TALLOC_FREE(spn);
+				continue;
+			}
+			ok = add_string_to_array(spn_array, spn,
+						 &spn_array, &num_spns);
+			if (!ok) {
+				TALLOC_FREE(spn);
+				return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+			}
+			TALLOC_FREE(spn);
+		}
+	}
+
 	/* make sure to NULL terminate the array */
 	spn_array = talloc_realloc(mem_ctx, spn_array, const char *, num_spns + 1);
 	if (spn_array == NULL) {
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index c9f4060..a17d918 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -262,6 +262,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum,
 	NTSTATUS status;
 
 	if (tevent_req_is_nterror(req, &status)) {
+		state->cli->raw_status = status;
 		return status;
 	}
 	if (pfnum != NULL) {
@@ -270,6 +271,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum,
 	if (cr != NULL) {
 		*cr = state->cr;
 	}
+	state->cli->raw_status = NT_STATUS_OK;
 	return NT_STATUS_OK;
 }
 
@@ -390,7 +392,11 @@ static void cli_smb2_close_fnum_done(struct tevent_req *subreq)
 
 NTSTATUS cli_smb2_close_fnum_recv(struct tevent_req *req)
 {
-	return tevent_req_simple_recv_ntstatus(req);
+	struct cli_smb2_close_fnum_state *state = tevent_req_data(
+		req, struct cli_smb2_close_fnum_state);
+	NTSTATUS status = tevent_req_simple_recv_ntstatus(req);
+	state->cli->raw_status = status;
+	return status;
 }
 
 NTSTATUS cli_smb2_close_fnum(struct cli_state *cli, uint16_t fnum)
@@ -2302,6 +2308,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req,
 				req, struct cli_smb2_read_state);
 
 	if (tevent_req_is_nterror(req, &status)) {
+		state->cli->raw_status = status;
 		return status;
 	}
 	/*
@@ -2311,6 +2318,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req,
 	 */
 	*received = (ssize_t)state->received;
 	*rcvbuf = state->buf;
+	state->cli->raw_status = NT_STATUS_OK;
 	return NT_STATUS_OK;
 }
 
@@ -2409,6 +2417,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req,
 	NTSTATUS status;
 
 	if (tevent_req_is_nterror(req, &status)) {
+		state->cli->raw_status = status;
 		tevent_req_received(req);
 		return status;
 	}
@@ -2416,6 +2425,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req,
 	if (pwritten != NULL) {
 		*pwritten = (size_t)state->written;
 	}
+	state->cli->raw_status = NT_STATUS_OK;
 	tevent_req_received(req);
 	return NT_STATUS_OK;
 }
@@ -2573,11 +2583,13 @@ NTSTATUS cli_smb2_writeall_recv(struct tevent_req *req,
 	NTSTATUS status;
 
 	if (tevent_req_is_nterror(req, &status)) {
+		state->cli->raw_status = status;
 		return status;
 	}
 	if (pwritten != NULL) {
 		*pwritten = (size_t)state->written;
 	}
+	state->cli->raw_status = NT_STATUS_OK;
 	return NT_STATUS_OK;
 }
 
@@ -2838,12 +2850,14 @@ NTSTATUS cli_smb2_splice_recv(struct tevent_req *req, off_t *written)
 	NTSTATUS status;
 
 	if (tevent_req_is_nterror(req, &status)) {
+		state->cli->raw_status = status;
 		tevent_req_received(req);
 		return status;
 	}
 	if (written != NULL) {
 		*written = state->written;
 	}
+	state->cli->raw_status = NT_STATUS_OK;
 	tevent_req_received(req);
 	return NT_STATUS_OK;
 }
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index d87afa6..ff1e598 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -132,6 +132,7 @@ struct fruit_config_data {
 	bool unix_info_enabled;
 	bool copyfile_enabled;
 	bool veto_appledouble;
+	bool posix_rename;
 
 	/*
 	 * Additional options, all enabled by default,
@@ -1355,6 +1356,9 @@ static int init_fruit_config(vfs_handle_struct *handle)
 	config->use_copyfile = lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME,
 					   "copyfile", false);
 
+	config->posix_rename = lp_parm_bool(
+		SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME, "posix_rename", true);
+
 	config->readdir_attr_rsize = lp_parm_bool(
 		SNUM(handle->conn), "readdir_attr", "aapl_rsize", true);
 
@@ -3427,7 +3431,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
 			fsp->aapl_copyfile_supported = true;
 		}
 
-		if (fsp->is_directory) {
+		if (config->posix_rename && fsp->is_directory) {
 			/*
 			 * Enable POSIX directory rename behaviour
 			 */
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 555658d..04323ac 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -917,34 +917,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 			TALLOC_FREE(found_name);
 		} /* end else */
 
-#ifdef DEVELOPER
-		/*
-		 * This sucks!
-		 * We should never provide different behaviors
-		 * depending on DEVELOPER!!!
-		 */
-		if (VALID_STAT(smb_fname->st)) {
-			bool delete_pending;
-			uint32_t name_hash;
-
-			status = file_name_hash(conn,
-					smb_fname_str_dbg(smb_fname),
-					&name_hash);
-			if (!NT_STATUS_IS_OK(status)) {
-				goto fail;
-			}
-
-			get_file_infos(vfs_file_id_from_sbuf(conn,
-							     &smb_fname->st),
-				       name_hash,
-				       &delete_pending, NULL);
-			if (delete_pending) {
-				status = NT_STATUS_DELETE_PENDING;
-				goto fail;
-			}
-		}
-#endif
-
 		/*
 		 * Add to the dirpath that we have resolved so far.
 		 */
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index ba8946d..0c70250 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -181,6 +181,7 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
 bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir)
 {
 	int snum;
+	enum remote_arch_types ra_type;
 
 	if (!conn)  {
 		last_conn = NULL;
@@ -206,28 +207,35 @@ bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir)
 	last_conn = conn;
 	last_flags = flags;
 
-	/* Obey the client case sensitivity requests - only for clients that support it. */
+	/*
+	 * Obey the client case sensitivity requests - only for clients that
+	 * support it. */
 	switch (lp_case_sensitive(snum)) {
-		case Auto:
-			{
-				/* We need this uglyness due to DOS/Win9x clients that lie about case insensitivity. */
-				enum remote_arch_types ra_type = get_remote_arch();
-				if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
-					/* Client can't support per-packet case sensitive pathnames. */
-					conn->case_sensitive = False;
-				} else {
-					conn->case_sensitive = !(flags & FLAG_CASELESS_PATHNAMES);
-				}
-			}
-			break;
-		case True:
-			conn->case_sensitive = True;
-			break;
-		default:
-			conn->case_sensitive = False;
-			break;
-	}
-	return(True);
+	case Auto:
+		/*
+		 * We need this uglyness due to DOS/Win9x clients that lie
+		 * about case insensitivity. */
+		ra_type = get_remote_arch();
+		if (conn->sconn->using_smb2) {
+			conn->case_sensitive = false;
+		} else if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
+			/*
+			 * Client can't support per-packet case sensitive
+			 * pathnames. */
+			conn->case_sensitive = false;
+		} else {
+			conn->case_sensitive =
+					!(flags & FLAG_CASELESS_PATHNAMES);
+		}
+	break;
+	case True:
+		conn->case_sensitive = true;
+		break;
+	default:
+		conn->case_sensitive = false;
+		break;
+	}
+	return true;
 }
 
 /****************************************************************************
diff --git a/source4/heimdal/kdc/misc.c b/source4/heimdal/kdc/misc.c
index b0bc38a..6fd5119 100644
--- a/source4/heimdal/kdc/misc.c
+++ b/source4/heimdal/kdc/misc.c
@@ -40,7 +40,7 @@ _kdc_db_fetch(krb5_context context,
 	      krb5_kdc_configuration *config,
 	      krb5_const_principal principal,
 	      unsigned flags,
-	      krb5uint32 *kvno_ptr,
+	      krb5int32 *kvno_ptr,
 	      HDB **db,
 	      hdb_entry_ex **h)
 {
diff --git a/source4/heimdal/lib/asn1/krb5.asn1 b/source4/heimdal/lib/asn1/krb5.asn1
index f3ae6bba..c2f40c0 100644
--- a/source4/heimdal/lib/asn1/krb5.asn1
+++ b/source4/heimdal/lib/asn1/krb5.asn1
@@ -360,7 +360,7 @@ LastReq ::= SEQUENCE OF SEQUENCE {
 
 EncryptedData ::= SEQUENCE {
 	etype[0] 		ENCTYPE, -- EncryptionType
-	kvno[1]			krb5uint32 OPTIONAL,
+	kvno[1]			krb5int32 OPTIONAL,
 	cipher[2]		OCTET STRING -- ciphertext
 }
 
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index bff0926..6509e8a 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -3182,7 +3182,7 @@ static bool check_pw_with_krb5(struct torture_context *tctx,
 	const char *old_password = cli_credentials_get_old_password(credentials);
 	int kvno = cli_credentials_get_kvno(credentials);
 	int expected_kvno = 0;
-	krb5uint32 t_kvno = 0;
+	krb5int32 t_kvno = 0;
 	const char *host = torture_setting_string(tctx, "host", NULL);
 	krb5_error_code k5ret;
 	krb5_boolean k5ok;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list