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

Stefan Metzmacher metze at samba.org
Sat Sep 16 11:34:03 UTC 2017


The branch, v4-6-test has been updated
       via  a86c837 ctdb-client: Initialize ctdb_ltdb_header completely for empty record
       via  bb709c1 ctdb-daemon: Free up record data if a call request is deferred
       via  4b86f6c s3: vfs: catia: compression get/set must act only on base file, and must cope with fsp==NULL.
       via  21ca207 s3: VFS: streams_xattr: Compression is only set/get on base filenames.
       via  9f768e2 vfs_streams_xattr: Fix segfault when running with log level 10
       via  5ad9d78 charset: fix str[n]casecmp_m() by comparing lower case values
       via  a774df0 charset/tests: also tests the system str[n]casecmp()
       via  26bff68 charset/tests: add more str[n]casecmp_m() tests to demonstrate the bug
       via  03d8780 charset/tests: assert the exact values of str[n]casecmp_m()
      from  c258b78 ctdb-daemon: GET_DB_SEQNUM should read database conditionally

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


- Log -----------------------------------------------------------------
commit a86c8379a0a39154c9481db60db24dfe080ba924
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Sep 11 14:05:17 2017 +1000

    ctdb-client: Initialize ctdb_ltdb_header completely for empty record
    
    ctdb_ltdb_fetch() only fills in relevant portion of ctdb_ltdb_header
    if the record does not exist.  This can result in uninitialized writes
    to ctdb_rec_buffer.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13036
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit a878171cb432673f635a75cce0b72c92bb0d3ec7)
    
    Autobuild-User(v4-6-test): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(v4-6-test): Sat Sep 16 13:33:55 CEST 2017 on sn-devel-144

commit bb709c18aa6de2e4027b4a51b78fe22617800ddd
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Sep 11 15:59:19 2017 +1000

    ctdb-daemon: Free up record data if a call request is deferred
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13029
    
    If a call request for a key (migration request) is in flight, then all
    the subsequent call requests for the same key are deferred.  In that case,
    the data corresponding to key read from the local tdb is useless and there
    is no need to keep it around.  Once the deferred call is reprocessed,
    the data corresponding to that key will be fetched again.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit 77c17b03cfc4734142fd86ba3cdd9663e75f34e3)

commit 4b86f6cb6e1bd5560dc8c6ab067a0e8d59d051d7
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 8 15:28:39 2017 -0700

    s3: vfs: catia: compression get/set must act only on base file, and must cope with fsp==NULL.
    
    Correctly do filename conversion.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13003
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Tue Sep 12 10:50:57 CEST 2017 on sn-devel-144
    
    (cherry picked from commit 3ff1b83ab7cb3a6ab94b87d0bf73857b731c869d)

commit 21ca20787a85b8132f92454482c5d101f8445b8e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 8 15:27:37 2017 -0700

    s3: VFS: streams_xattr: Compression is only set/get on base filenames.
    
    Can be ignored (pass-through) in streams_xattr VFS module.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13003
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 1a7c0f77e2203aa674eb8b06fe3220868f100001)

commit 9f768e26d40e22851c8a304f6915c127986cc189
Author: Christof Schmitt <cs at samba.org>
Date:   Wed Sep 13 16:23:53 2017 -0700

    vfs_streams_xattr: Fix segfault when running with log level 10
    
    This happens when vfs_streams_xattr is loaded, log level is set to 10
    and the default stream of a file or directory is accessed. In that case
    streams_xattr_open does not allocate the stream_io fsp extension. The
    DBG_DEBUG message in streams_xattr_fstat tries to access the stream_io
    before checking for a NULL value, resulting in the crash. Fix this by
    moving the debug message after the check for a NULL pointer.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13032
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Thu Sep 14 10:58:12 CEST 2017 on sn-devel-144
    
    (cherry picked from commit 1b6aa39fac0825b1f25fd62a6c67994b5c491170)

commit 5ad9d78a62d81146f4b8459d49c550ff0bfca7b7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 6 09:47:20 2017 +0200

    charset: fix str[n]casecmp_m() by comparing lower case values
    
    The commits c615ebed6e3d273a682806b952d543e834e5630d^..f19ab5d334e3fb15761fb009e5de876dfc6ea785
    replaced Str[n]CaseCmp() by str[n]casecmp_m().
    
    The logic we had in str[n]casecmp_w() used to compare
    the upper cased as well as the lower cased versions of the
    characters and returned the difference between the lower cased versions.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13018
    
    Signed-off-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): Fri Sep 15 02:23:29 CEST 2017 on sn-devel-144
    
    (cherry picked from commit 3ed9c903671e795964ce3da9d0080444ef3eb5e9)

commit a774df00d39b711f57bf687cb824ee2cdc42b93c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 6 11:24:28 2017 +0200

    charset/tests: also tests the system str[n]casecmp()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13018
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 9d99b640b9002ad6c0eb0d29a6d7adcfda870e13)

commit 26bff686ab3c2e17e7aff6b2521e284026908381
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 6 10:39:00 2017 +0200

    charset/tests: add more str[n]casecmp_m() tests to demonstrate the bug
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13018
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 2a3d4fe0c9eacf9d0b2261ef116a1f6b741e20ee)

commit 03d8780d5bcb7e767c8b5ce8cf71db4f04de2e82
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 6 10:38:37 2017 +0200

    charset/tests: assert the exact values of str[n]casecmp_m()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13018
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit c18ecdececef8fcfdaa5d3e1a066533c8b41f19d)

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

Summary of changes:
 ctdb/client/client_db.c             |  6 +--
 ctdb/server/ctdb_daemon.c           |  1 +
 lib/util/charset/tests/charset.c    | 75 ++++++++++++++++++++++++++++---------
 lib/util/charset/util_str.c         | 32 ++++++++++++++--
 source3/modules/vfs_catia.c         | 44 +++++++++++++++++++---
 source3/modules/vfs_streams_xattr.c | 41 +-------------------
 6 files changed, 130 insertions(+), 69 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c
index 888cfbc3..902e841 100644
--- a/ctdb/client/client_db.c
+++ b/ctdb/client/client_db.c
@@ -705,9 +705,9 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *db, TDB_DATA key,
 			return EIO;
 		}
 
-		header->rsn = 0;
-		header->dmaster = CTDB_UNKNOWN_PNN;
-		header->flags = 0;
+		*header = (struct ctdb_ltdb_header) {
+			.dmaster = CTDB_UNKNOWN_PNN,
+		};
 
 		if (data != NULL) {
 			*data = tdb_null;
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 122d884..4d6987a 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -675,6 +675,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
 				DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret));
 			}
 			CTDB_DECREMENT_STAT(ctdb, pending_calls);
+			talloc_free(data.dptr);
 			return;
 		}
 	}
diff --git a/lib/util/charset/tests/charset.c b/lib/util/charset/tests/charset.c
index 7f33656..71635c6 100644
--- a/lib/util/charset/tests/charset.c
+++ b/lib/util/charset/tests/charset.c
@@ -48,19 +48,37 @@ static bool test_codepoint_cmpi(struct torture_context *tctx)
 	return true;
 }
 
+static bool test_strcasecmp(struct torture_context *tctx)
+{
+	torture_assert_int_equal(tctx, strcasecmp("foo", "bar"), 4, "different strings both lower");
+	torture_assert_int_equal(tctx, strcasecmp("foo", "Bar"), 4, "different strings lower/upper");
+	torture_assert_int_equal(tctx, strcasecmp("Foo", "bar"), 4, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strcasecmp("AFoo", "_bar"), 2, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strcasecmp("foo", "foo"), 0, "same case strings");
+	torture_assert_int_equal(tctx, strcasecmp("foo", "Foo"), 0, "different case strings");
+
+	/*
+	 * Note that strcasecmp() doesn't allow NULL arguments
+	 */
+	return true;
+}
+
 static bool test_strcasecmp_m(struct torture_context *tctx)
 {
 	/* file.{accented e} in iso8859-1 */
 	const char file_iso8859_1[7] = { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xe9, 0 };
 	/* file.{accented e} in utf8 */
 	const char file_utf8[8] =      { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xc3, 0xa9, 0 };
-	torture_assert(tctx, strcasecmp_m("foo", "bar") != 0, "different strings");
-	torture_assert(tctx, strcasecmp_m("foo", "foo") == 0, "same case strings");
-	torture_assert(tctx, strcasecmp_m("foo", "Foo") == 0, "different case strings");
-	torture_assert(tctx, strcasecmp_m(NULL, "Foo") != 0, "one NULL");
-	torture_assert(tctx, strcasecmp_m("foo", NULL) != 0, "other NULL");
-	torture_assert(tctx, strcasecmp_m(NULL, NULL) == 0, "both NULL");
-	torture_assert(tctx, strcasecmp_m(file_iso8859_1, file_utf8) != 0,
+	torture_assert_int_equal(tctx, strcasecmp_m("foo", "bar"), 4, "different strings both lower");
+	torture_assert_int_equal(tctx, strcasecmp_m("foo", "Bar"), 4, "different strings lower/upper");
+	torture_assert_int_equal(tctx, strcasecmp_m("Foo", "bar"), 4, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strcasecmp_m("AFoo", "_bar"), 2, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strcasecmp_m("foo", "foo"), 0, "same case strings");
+	torture_assert_int_equal(tctx, strcasecmp_m("foo", "Foo"), 0, "different case strings");
+	torture_assert_int_equal(tctx, strcasecmp_m(NULL, "Foo"),  -1, "one NULL");
+	torture_assert_int_equal(tctx, strcasecmp_m("foo", NULL),  1, "other NULL");
+	torture_assert_int_equal(tctx, strcasecmp_m(NULL, NULL),   0, "both NULL");
+	torture_assert_int_equal(tctx, strcasecmp_m(file_iso8859_1, file_utf8), 38,
 		"file.{accented e} should differ");
 	return true;
 }
@@ -106,22 +124,43 @@ static bool test_string_replace_m(struct torture_context *tctx)
 	return true;
 }
 
+static bool test_strncasecmp(struct torture_context *tctx)
+{
+	torture_assert_int_equal(tctx, strncasecmp("foo", "bar", 3), 4, "different strings both lower");
+	torture_assert_int_equal(tctx, strncasecmp("foo", "Bar", 3), 4, "different strings lower/upper");
+	torture_assert_int_equal(tctx, strncasecmp("Foo", "bar", 3), 4, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strncasecmp("AFoo", "_bar", 4), 2, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strncasecmp("foo", "foo", 3), 0, "same case strings");
+	torture_assert_int_equal(tctx, strncasecmp("foo", "Foo", 3), 0, "different case strings");
+	torture_assert_int_equal(tctx, strncasecmp("fool", "Foo", 3),0, "different case strings");
+	torture_assert_int_equal(tctx, strncasecmp("fool", "Fool", 40), 0, "over size");
+	torture_assert_int_equal(tctx, strncasecmp("BLA", "Fool", 0),0, "empty");
+
+	/*
+	 * Note that strncasecmp() doesn't allow NULL arguments
+	 */
+	return true;
+}
+
 static bool test_strncasecmp_m(struct torture_context *tctx)
 {
 	/* file.{accented e} in iso8859-1 */
 	const char file_iso8859_1[7] = { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xe9, 0 };
 	/* file.{accented e} in utf8 */
 	const char file_utf8[8] =      { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xc3, 0xa9, 0 };
-	torture_assert(tctx, strncasecmp_m("foo", "bar", 3) != 0, "different strings");
-	torture_assert(tctx, strncasecmp_m("foo", "foo", 3) == 0, "same case strings");
-	torture_assert(tctx, strncasecmp_m("foo", "Foo", 3) == 0, "different case strings");
-	torture_assert(tctx, strncasecmp_m("fool", "Foo", 3) == 0, "different case strings");
-	torture_assert(tctx, strncasecmp_m("fool", "Fool", 40) == 0, "over size");
-	torture_assert(tctx, strncasecmp_m("BLA", "Fool", 0) == 0, "empty");
-	torture_assert(tctx, strncasecmp_m(NULL, "Foo", 3) != 0, "one NULL");
-	torture_assert(tctx, strncasecmp_m("foo", NULL, 3) != 0, "other NULL");
-	torture_assert(tctx, strncasecmp_m(NULL, NULL, 3) == 0, "both NULL");
-	torture_assert(tctx, strncasecmp_m(file_iso8859_1, file_utf8, 6) != 0,
+	torture_assert_int_equal(tctx, strncasecmp_m("foo", "bar", 3), 4, "different strings both lower");
+	torture_assert_int_equal(tctx, strncasecmp_m("foo", "Bar", 3), 4, "different strings lower/upper");
+	torture_assert_int_equal(tctx, strncasecmp_m("Foo", "bar", 3), 4, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strncasecmp_m("AFoo", "_bar", 4), 2, "different strings upper/lower");
+	torture_assert_int_equal(tctx, strncasecmp_m("foo", "foo", 3), 0, "same case strings");
+	torture_assert_int_equal(tctx, strncasecmp_m("foo", "Foo", 3), 0, "different case strings");
+	torture_assert_int_equal(tctx, strncasecmp_m("fool", "Foo", 3),0, "different case strings");
+	torture_assert_int_equal(tctx, strncasecmp_m("fool", "Fool", 40), 0, "over size");
+	torture_assert_int_equal(tctx, strncasecmp_m("BLA", "Fool", 0),0, "empty");
+	torture_assert_int_equal(tctx, strncasecmp_m(NULL, "Foo", 3),  -1, "one NULL");
+	torture_assert_int_equal(tctx, strncasecmp_m("foo", NULL, 3),  1, "other NULL");
+	torture_assert_int_equal(tctx, strncasecmp_m(NULL, NULL, 3),   0, "both NULL");
+	torture_assert_int_equal(tctx, strncasecmp_m(file_iso8859_1, file_utf8, 6), 38,
 		"file.{accented e} should differ");
 	return true;
 }
@@ -276,10 +315,12 @@ struct torture_suite *torture_local_charset(TALLOC_CTX *mem_ctx)
 	torture_suite_add_simple_test(suite, "toupper_m", test_toupper_m);
 	torture_suite_add_simple_test(suite, "tolower_m", test_tolower_m);
 	torture_suite_add_simple_test(suite, "codepoint_cmpi", test_codepoint_cmpi);
+	torture_suite_add_simple_test(suite, "strcasecmp", test_strcasecmp);
 	torture_suite_add_simple_test(suite, "strcasecmp_m", test_strcasecmp_m);
 	torture_suite_add_simple_test(suite, "strequal_m", test_strequal_m);
 	torture_suite_add_simple_test(suite, "strcsequal", test_strcsequal);
 	torture_suite_add_simple_test(suite, "string_replace_m", test_string_replace_m);
+	torture_suite_add_simple_test(suite, "strncasecmp", test_strncasecmp);
 	torture_suite_add_simple_test(suite, "strncasecmp_m", test_strncasecmp_m);
 	torture_suite_add_simple_test(suite, "next_token", test_next_token);
 	torture_suite_add_simple_test(suite, "next_token_null", test_next_token_null);
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 550fba3..6feed17 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -36,6 +36,8 @@ _PUBLIC_ int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 				 const char *s1, const char *s2)
 {
 	codepoint_t c1=0, c2=0;
+	codepoint_t u1=0, u2=0;
+	codepoint_t l1=0, l2=0;
 	size_t size1, size2;
 
 	/* handle null ptr comparisons to simplify the use in qsort */
@@ -59,9 +61,19 @@ _PUBLIC_ int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 			continue;
 		}
 
-		if (toupper_m(c1) != toupper_m(c2)) {
-			return c1 - c2;
+		u1 = toupper_m(c1);
+		u2 = toupper_m(c2);
+		if (u1 == u2) {
+			continue;
 		}
+
+		l1 = tolower_m(c1);
+		l2 = tolower_m(c2);
+		if (l1 == l2) {
+			continue;
+		}
+
+		return l1 - l2;
 	}
 
 	return *s1 - *s2;
@@ -83,6 +95,8 @@ _PUBLIC_ int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 				  const char *s1, const char *s2, size_t n)
 {
 	codepoint_t c1=0, c2=0;
+	codepoint_t u1=0, u2=0;
+	codepoint_t l1=0, l2=0;
 	size_t size1, size2;
 
 	/* handle null ptr comparisons to simplify the use in qsort */
@@ -123,9 +137,19 @@ _PUBLIC_ int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 			continue;
 		}
 
-		if (toupper_m(c1) != toupper_m(c2)) {
-			return c1 - c2;
+		u1 = toupper_m(c1);
+		u2 = toupper_m(c2);
+		if (u1 == u2) {
+			continue;
 		}
+
+		l1 = tolower_m(c1);
+		l2 = tolower_m(c2);
+		if (l1 == l2) {
+			continue;
+		}
+
+		return l1 - l2;
 	}
 
 	if (n == 0) {
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index c6d8f58..65b3614 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -2246,16 +2246,48 @@ static NTSTATUS catia_get_compression(vfs_handle_struct *handle,
 	NTSTATUS result;
 	struct catia_cache *cc = NULL;
 	int ret;
+	struct smb_filename *mapped_smb_fname = NULL;
+	char *mapped_name = NULL;
 
-	ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
-	if (ret != 0) {
-		return map_nt_error_from_unix(errno);
+	if (fsp != NULL) {
+		ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
+		if (ret != 0) {
+			return map_nt_error_from_unix(errno);
+		}
+		mapped_smb_fname = fsp->fsp_name;
+	} else {
+		result = catia_string_replace_allocate(handle->conn,
+				smb_fname->base_name,
+				&mapped_name,
+				vfs_translate_to_unix);
+		if (!NT_STATUS_IS_OK(result)) {
+			return result;
+		}
+
+		mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
+						mapped_name,
+						NULL,
+						NULL,
+						smb_fname->flags);
+		if (mapped_smb_fname == NULL) {
+			TALLOC_FREE(mapped_name);
+			return NT_STATUS_NO_MEMORY;
+		}
+
+		TALLOC_FREE(mapped_name);
 	}
 
-	result = SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname,
-					      _compression_fmt);
+	result = SMB_VFS_NEXT_GET_COMPRESSION(handle,
+					mem_ctx,
+					fsp,
+					mapped_smb_fname,
+					_compression_fmt);
 
-	CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
+	if (fsp != NULL) {
+		CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
+	} else {
+		TALLOC_FREE(mapped_smb_fname);
+	}
 
 	return result;
 }
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 4cf4579..e391885 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -232,12 +232,12 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
 	struct stream_io *io = (struct stream_io *)
 		VFS_FETCH_FSP_EXTENSION(handle, fsp);
 
-	DBG_DEBUG("streams_xattr_fstat called for %s\n", fsp_str_dbg(io->fsp));
-
 	if (io == NULL || fsp->base_fsp == NULL) {
 		return SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf);
 	}
 
+	DBG_DEBUG("streams_xattr_fstat called for %s\n", fsp_str_dbg(io->fsp));
+
 	if (!streams_xattr_recheck(io)) {
 		return -1;
 	}
@@ -1469,40 +1469,6 @@ static void streams_xattr_strict_unlock(struct vfs_handle_struct *handle,
 	return SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock);
 }
 
-static NTSTATUS streams_xattr_get_compression(struct vfs_handle_struct *handle,
-					      TALLOC_CTX *mem_ctx,
-					      struct files_struct *fsp,
-					      struct smb_filename *smb_fname,
-					      uint16_t *_compression_fmt)
-{
-	struct stream_io *sio =
-		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
-
-	if (sio == NULL) {
-		return SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp,
-						    smb_fname, _compression_fmt);
-	}
-
-	*_compression_fmt = COMPRESSION_FORMAT_NONE;
-	return NT_STATUS_OK;
-}
-
-static NTSTATUS streams_xattr_set_compression(struct vfs_handle_struct *handle,
-					      TALLOC_CTX *mem_ctx,
-					      struct files_struct *fsp,
-					      uint16_t compression_fmt)
-{
-	struct stream_io *sio =
-		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
-
-	if (sio == NULL) {
-		return SMB_VFS_NEXT_SET_COMPRESSION(handle, mem_ctx, fsp,
-						    compression_fmt);
-	}
-
-	return NT_STATUS_NOT_SUPPORTED;
-}
-
 static struct vfs_fn_pointers vfs_streams_xattr_fns = {
 	.fs_capabilities_fn = streams_xattr_fs_capabilities,
 	.connect_fn = streams_xattr_connect,
@@ -1528,9 +1494,6 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
 	.strict_lock_fn = streams_xattr_strict_lock,
 	.strict_unlock_fn = streams_xattr_strict_unlock,
 
-	.get_compression_fn = streams_xattr_get_compression,
-	.set_compression_fn = streams_xattr_set_compression,
-
 	.fchown_fn = streams_xattr_fchown,
 	.fchmod_fn = streams_xattr_fchmod,
 	.fsync_fn = streams_xattr_fsync,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list