[SCM] Samba Shared Repository - branch v4-7-test updated
Stefan Metzmacher
metze at samba.org
Sat Sep 16 11:35:02 UTC 2017
The branch, v4-7-test has been updated
via 9e8688a ctdb-client: Initialize ctdb_ltdb_header completely for empty record
via aea5af0 ctdb-daemon: Free up record data if a call request is deferred
via 74bbce0 s3: vfs: catia: compression get/set must act only on base file, and must cope with fsp==NULL.
via d955230 s3: VFS: streams_xattr: Compression is only set/get on base filenames.
via 8d52dd3 vfs_streams_xattr: Fix segfault when running with log level 10
via 5c36e9a schema: Rework dsdb_schema_set_indices_and_attributes() db operations
via db16b55 Install dcerpc/__init__.py for all Python environments
via 11048d4 charset: fix str[n]casecmp_m() by comparing lower case values
via 1630838 charset/tests: also tests the system str[n]casecmp()
via c6a4931 charset/tests: add more str[n]casecmp_m() tests to demonstrate the bug
via 7e47230 charset/tests: assert the exact values of str[n]casecmp_m()
from adfca55 WHATSNEW: Prepare changes since 4.7.0rc5.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-7-test
- Log -----------------------------------------------------------------
commit 9e8688a58f00393662ee482d408cfabed2fd4ea2
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-7-test): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(v4-7-test): Sat Sep 16 13:34:33 CEST 2017 on sn-devel-144
commit aea5af075f33b85090125da0e197b21844d42737
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 74bbce04e93eba09c7b63b6cf4df3b3aeb2cdb90
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 d95523041bb5ccb94df8cd8353133881ddb6590c
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 8d52dd377bddd1bd705cf8ac58471d57aee721d5
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 5c36e9ae5b74b28396d1acc5103e53aea6f5fc8f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Sep 11 15:22:23 2017 +1200
schema: Rework dsdb_schema_set_indices_and_attributes() db operations
Commit ec9b1e881c3eef503d6b4b311594113acf7d47d8 did not fully fix this.
There is no value in using dsdb_replace(), we are under the read lock
and replace just confuses things further.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13025
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
(cherry picked from commit 5d9bb80a027ba2b03c97d80c10173f946c758f69)
commit db16b55c2a0efffd6d40d6f91c6e8a4499f53e33
Author: Alexander Bokovoy <ab at samba.org>
Date: Wed Sep 13 11:37:34 2017 +0300
Install dcerpc/__init__.py for all Python environments
Also fix whitespace. We use tabs, not spaces in Python/waf code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13030
Signed-off-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Thu Sep 14 22:29:39 CEST 2017 on sn-devel-144
(cherry picked from commit 3f0938b9389dc9c0ca5e4acf0451f14050a7506f)
commit 11048d4f1e02615b1d20343c6c479b955342e7eb
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 16308387b5e1bcda7bbaf7d6cf947948ba3cb409
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 c6a49313f696b9f893bba2b03ad66f4322fb7be7
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 7e472300399603b8e6db333884a3530f5bc0ce72
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 +-------------------
source4/dsdb/schema/schema_set.c | 17 +++++----
source4/librpc/wscript_build | 11 +++---
8 files changed, 145 insertions(+), 82 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c
index 05645f5..2378067 100644
--- a/ctdb/client/client_db.c
+++ b/ctdb/client/client_db.c
@@ -1114,9 +1114,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 7f088f0..90f0e54 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -676,6 +676,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 5cf7476..c47b64d 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -2435,16 +2435,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 bd3965c..f75f6a1 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;
}
@@ -1653,40 +1653,6 @@ static bool streams_xattr_strict_lock_check(struct vfs_handle_struct *handle,
return true;
}
-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,
@@ -1715,9 +1681,6 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
.linux_setlease_fn = streams_xattr_linux_setlease,
.strict_lock_check_fn = streams_xattr_strict_lock_check,
- .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,
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index cfd320b..8141e32 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -175,11 +175,11 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
}
if (mod_msg->num_elements > 0) {
/*
- * Do the replace with the constructed message,
- * to avoid needing a lock between this search
- * and the replace
+ * Do the replace with the difference, as we
+ * are under the read lock and we wish to do a
+ * delete of any removed/renamed attributes
*/
- ret = dsdb_replace(ldb, msg, 0);
+ ret = dsdb_modify(ldb, mod_msg, 0);
}
talloc_free(mod_msg);
}
@@ -235,12 +235,13 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
* @SAMBA_FEATURES_SUPPORTED
*/
} else if (mod_msg->num_elements > 0) {
+
/*
- * Do the replace with the constructed message,
- * to avoid needing a lock between this search
- * and the replace
+ * Do the replace with the difference, as we
+ * are under the read lock and we wish to do a
+ * delete of any removed/renamed attributes
*/
- ret = dsdb_replace(ldb, msg_idx, 0);
+ ret = dsdb_modify(ldb, mod_msg, 0);
}
talloc_free(mod_msg);
}
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index e341432..a381a65 100644
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -407,9 +407,10 @@ for env in bld.gen_python_environments():
)
if bld.PYTHON_BUILD_IS_ENABLED():
- bld.SAMBA_SCRIPT('python_dcerpc_init',
- pattern='rpc/dcerpc.py',
- installdir='python/samba/dcerpc',
- installname='__init__.py')
+ for env in bld.gen_python_environments():
+ bld.SAMBA_SCRIPT('python_dcerpc_init',
+ pattern='rpc/dcerpc.py',
+ installdir='python/samba/dcerpc',
+ installname='__init__.py')
- bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')
+ bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')
--
Samba Shared Repository
More information about the samba-cvs
mailing list