[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Sat Feb 24 14:51:02 UTC 2018
The branch, master has been updated
via 1ed6934 ldb tests: fix null test on incorrect variable
via 72d780e s4:lib:com: Fix function declartions
via 0258122 s3:selftest: Run the smbtorture3 TLDAP test
via bc56913 repl_md: avoid returning LDB_SUCCESS on failure
via 6368af8 tests: Authenticate again so make sure we are not locked out
via 3b0a940 selftest: Fail testsuite on unknown environment
from 5ad5e79 s3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1ed693423d7a30c3810ddc1b6f052d376c8cd4e7
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Feb 23 15:03:20 2018 +1300
ldb tests: fix null test on incorrect variable
Fix up tests that were performing a null check on the wrong variable
after a call to ldb_msg_new
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Sat Feb 24 15:50:35 CET 2018 on sn-devel-144
commit 72d780efca5412acf9d6b85f4f26a3974cb9ec2f
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jul 26 18:16:43 2017 +0200
s4:lib:com: Fix function declartions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0258122535dbe1154a18d787e54728edfb09d10b
Author: Andreas Schneider <asn at samba.org>
Date: Thu Dec 21 17:24:01 2017 +0100
s3:selftest: Run the smbtorture3 TLDAP test
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit bc56913271e9d3a30143ef5a45d32430766d9dc3
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Feb 14 17:15:07 2018 +1300
repl_md: avoid returning LDB_SUCCESS on failure
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 6368af8260ec7dd74349eabb48d1312385e0ad49
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 22 17:30:36 2018 +0100
tests: Authenticate again so make sure we are not locked out
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 3b0a940c39e94f57457fd612721b1296d9752e57
Author: Jamie McClymont <jamiemcclymont at catalyst.net.nz>
Date: Tue Feb 13 16:58:26 2018 +1300
selftest: Fail testsuite on unknown environment
The status quo was that tests in typo'd/unknown environments would be skipped.
This was a side effect of the mechanism by which samba3 tests were run, which
has now been changed.
For an example of this being a problem in the past, see commit 523bd03f (which
fixes an issue I noticed when reading subunit logs, and which did not fail the
test).
Signed-off-by: Jamie McClymont <jamiemcclymont at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/tests/ldb_mod_op_test.c | 4 ++--
python/samba/tests/pam_winbind.py | 10 ++++++++++
selftest/selftest.pl | 4 ++--
source3/selftest/tests.py | 3 +++
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 10 +++++++++-
source4/lib/com/classes/simple.c | 25 +++++++++++++++++++------
6 files changed, 45 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
index cf2288c..0190936 100644
--- a/lib/ldb/tests/ldb_mod_op_test.c
+++ b/lib/ldb/tests/ldb_mod_op_test.c
@@ -3226,7 +3226,7 @@ static void test_ldb_add_duplicate_value_to_unique_index(void **state)
assert_int_equal(ret, LDB_SUCCESS);
msg02 = ldb_msg_new(tmp_ctx);
- assert_non_null(msg01);
+ assert_non_null(msg02);
msg02->dn = ldb_dn_new_fmt(msg02, test_ctx->ldb, "dc=test02");
assert_non_null(msg02->dn);
@@ -3267,7 +3267,7 @@ static void test_ldb_add_to_index_duplicates_allowed(void **state)
assert_int_equal(ret, LDB_SUCCESS);
msg02 = ldb_msg_new(tmp_ctx);
- assert_non_null(msg01);
+ assert_non_null(msg02);
msg02->dn = ldb_dn_new_fmt(msg02, test_ctx->ldb, "dc=test02");
assert_non_null(msg02->dn);
diff --git a/python/samba/tests/pam_winbind.py b/python/samba/tests/pam_winbind.py
index 1054e86..d64600e 100644
--- a/python/samba/tests/pam_winbind.py
+++ b/python/samba/tests/pam_winbind.py
@@ -44,3 +44,13 @@ class SimplePamTests(samba.tests.TestCase):
res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
self.assertTrue(res != None)
+
+ # Authenticate again to check that we are not locked out with just one
+ # failed login
+ password = os.environ["PASSWORD"]
+ expected_rc = 0 # PAM_SUCCESS
+
+ tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rc)
+ res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
+
+ self.assertTrue(res != None)
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index fad0191..12452bc 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -1117,8 +1117,8 @@ $envvarstr
next;
} elsif ($envvars eq "UNKNOWN") {
Subunit::start_testsuite($name);
- Subunit::end_testsuite($name, "skip",
- "environment $envname is unknown in this test backend - skipping");
+ Subunit::end_testsuite($name, "error",
+ "environment $envname is unknown - exiting");
next;
}
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 89c8d60..5232aec 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -92,6 +92,9 @@ for t in tests:
plantestsuite("samba3.smbtorture_s3.crypt_server(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t, "ad_dc_ntvfs", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
+t = "TLDAP"
+plantestsuite("samba3.smbtorture_s3.plain.%s(ad_dc)" % t, "ad_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER/tmp', '$DC_USERNAME', '$DC_PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
+
#
# RENAME-ACCESS needs to run against a special share - acl_xattr_ign_sysacl_windows
#
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index ead0bd9..62f58ad 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -5109,6 +5109,9 @@ failed:
* replication will stop with an error, but there is not much
* else we can do.
*/
+ if (ret == LDB_SUCCESS) {
+ ret = LDB_ERR_OPERATIONS_ERROR;
+ }
return ldb_module_done(ar->req, NULL, NULL,
ret);
}
@@ -5719,8 +5722,10 @@ static int replmd_replicated_handle_rename(struct replmd_replicated_request *ar,
ldb_errstring(ldb_module_get_ctx(ar->module))));
goto failed;
}
-failed:
+ talloc_free(tmp_ctx);
+ return ret;
+failed:
/*
* On failure make the caller get the error
* This means replication will stop with an error,
@@ -5728,6 +5733,9 @@ failed:
* LDB_ERR_ENTRY_ALREADY_EXISTS case this is exactly what is
* needed.
*/
+ if (ret == LDB_SUCCESS) {
+ ret = LDB_ERR_OPERATIONS_ERROR;
+ }
talloc_free(tmp_ctx);
return ret;
diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c
index 7d05733..4d28a15 100644
--- a/source4/lib/com/classes/simple.c
+++ b/source4/lib/com/classes/simple.c
@@ -43,13 +43,22 @@ static uint32_t simple_IUnknown_Release (struct IUnknown *d, TALLOC_CTX *mem_ctx
return 1;
}
-static WERROR simple_IStream_Read (struct IStream *d, TALLOC_CTX *mem_ctx, uint8_t *pv, uint32_t num_requested, uint32_t *num_readx, uint32_t num_read)
+static WERROR simple_IStream_Read(struct IStream *d,
+ TALLOC_CTX *mem_ctx,
+ uint8_t *pv,
+ uint32_t num_requested,
+ uint32_t *num_readx,
+ uint32_t *num_read)
{
- printf("%d bytes are being read\n", num_read);
+ printf("%d bytes are being read\n", *num_read);
return WERR_OK;
}
-static WERROR simple_IStream_Write (struct IStream *d, TALLOC_CTX *mem_ctx, uint8_t *data, uint32_t num_requested, uint32_t num_written)
+static WERROR simple_IStream_Write(struct IStream *d,
+ TALLOC_CTX *mem_ctx,
+ uint8_t *data,
+ uint32_t num_requested,
+ uint32_t *num_written)
{
printf("%d bytes are being written\n", num_requested);
return WERR_OK;
@@ -62,7 +71,11 @@ static WERROR simpleclass_IUnknown_QueryInterface (struct IUnknown *d, TALLOC_CT
return WERR_OK;
}
-static WERROR simpleclass_IClassFactory_CreateInstance (struct IClassFactory *d, TALLOC_CTX *mem_ctx, struct IUnknown *iunk, struct GUID *iid, struct IUnknown **ppv)
+static WERROR simpleclass_IClassFactory_CreateInstance(struct IClassFactory *d,
+ TALLOC_CTX *mem_ctx,
+ struct MInterfacePointer *pUnknown,
+ struct GUID *iid,
+ struct MInterfacePointer *ppv)
{
struct IStream *ret;
/* FIXME: Check whether IID == ISTREAM_IID */
@@ -71,8 +84,8 @@ static WERROR simpleclass_IClassFactory_CreateInstance (struct IClassFactory *d,
ret->vtable = &simple_IStream_vtable;
ret->object_data = NULL;
- *ppv = (struct IUnknown *)ret;
-
+ ppv = (struct MInterfacePointer *)ret;
+
return WERR_OK;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list