[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c71334ec0c9 lib:util: Move debug message for mkdir failing to log level 1 via 5bc215f70af samba-o3: fix -Werror=maybe-uninitialized in lib/mscat/mscat_pks7.c via 16d40ffcf04 samba-o3: fix -Werror=strict-overflow error in s4/torture/raw/eas module via 3ddb5429a0b samba-o3: fix -Werror=strict-overflow error in lib/ldb-samba/ldb_ildap module from c25e7953c6a pygpo: take ownership of password pointer https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c71334ec0c92e791022a9b7c900aa0dd649226c2 Author: Andreas Schneider Date: Thu Mar 7 12:31:42 2019 +0100 lib:util: Move debug message for mkdir failing to log level 1 If you connnect to a host with smbclient this gets always printed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13823 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Fri Mar 8 01:41:27 UTC 2019 on sn-devel-144 commit 5bc215f70af6fbf97baac1cdac9201701d8edf70 Author: Joe Guo Date: Fri Dec 21 13:47:45 2018 +1300 samba-o3: fix -Werror=maybe-uninitialized in lib/mscat/mscat_pks7.c samba-o3 test failed in ubuntu:1804 image with: ../../lib/mscat/mscat_pkcs7.c: In function ‘mscat_pkcs7_import_catfile’: ../../lib/mscat/mscat_pkcs7.c:143:18: error: ‘blob.length’ may be used uninitialized in this function [-Werror=maybe-uninitialized] mscat_data.size = blob.length; ^ ../../lib/mscat/mscat_pkcs7.c:142:18: error: ‘blob.data’ may be used uninitialized in this function [-Werror=maybe-uninitialized] mscat_data.data = blob.data; ^~~ ../../lib/mscat/mscat_pkcs7.c: In function ‘mscat_pkcs7_verify’: ../../lib/mscat/mscat_pkcs7.c:225:16: error: ‘blob.length’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ca_data.size = blob.length; ~^ ../../lib/mscat/mscat_pkcs7.c:224:16: error: ‘blob.data’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ca_data.data = blob.data; ~^~~ cc1: all warnings being treated as errors Since in `mscat_read_file`, it may still return rc = 0 while goto error, ends up with blob uninitialized. Signed-off-by: Joe Guo Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 16d40ffcf04a0c3c7dd8699cf7980ed1fb32612a Author: Joe Guo Date: Wed Dec 19 14:37:33 2018 +1300 samba-o3: fix -Werror=strict-overflow error in s4/torture/raw/eas module samba-o3 test failed in ubuntu:16.04 docker container: ==> /home/samba/samba/samba-o3.stderr <== ../../source4/torture/raw/eas.c: In function ‘test_max_eas’: ../../source4/torture/raw/eas.c:286:12: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] static bool test_max_eas(struct smbcli_state *cli, struct torture_context *tctx) ^ cc1: all warnings being treated as errors `total += j` may overflow. Change total type to `size_t` to mute error. Signed-off-by: Joe Guo Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 3ddb5429a0b67f4867ef2730d0817d432486b15c Author: Joe Guo Date: Wed Dec 19 14:25:12 2018 +1300 samba-o3: fix -Werror=strict-overflow error in lib/ldb-samba/ldb_ildap module samba-o3 test failed in ubuntu:16.04 docker container: ==> /home/samba/samba/samba-o3.stderr <== ../../lib/ldb-samba/ldb_ildap.c: In function ‘ildb_handle_request’: ../../lib/ldb-samba/ldb_ildap.c:535:2: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] for (i = 0; i < n; i++) { ^ ../../lib/ldb-samba/ldb_ildap.c:579:2: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] for (i = 0; i < n; i++) { ^ cc1: all warnings being treated as errors Change type to mute errors. Signed-off-by: Joe Guo Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: lib/ldb-samba/ldb_ildap.c | 8 lib/mscat/mscat_pkcs7.c | 6 +- lib/util/util.c | 6 +++--- source4/torture/raw/eas.c | 5 +++-- 4 files changed, 15 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ldb-samba/ldb_ildap.c b/lib/ldb-samba/ldb_ildap.c index 1b9a25ea3a7..2c32395db70 100644 ---
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c25e7953c6a pygpo: take ownership of password pointer via 5b4618ca7ac pygpo: Safer handling of memory for ads_ptr. via 18638535044 pygpo: Fix module initialization. via d2a75489477 pygpo: keep a reference to python credentials in the ADS struct to keep the internal pointer valid. via 1ff252e398c pygpo: More python exception cleanup. via a8b316d102e pygpo: Fix error handing when getting gpo unix path. via 08b5b11b96c pygpo: Proper exception exit in py_ads_connect(). via 36adf08fabb pygpo: Replace the use of SystemError with RuntimeError. from 80cf852dbe4 subunit/run.py: change shebang to python3 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c25e7953c6a4b26965bfbba40c793d13690ba68c Author: Kristján Valur Date: Thu Feb 28 15:15:14 2019 + pygpo: take ownership of password pointer BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power Autobuild-User(master): Noel Power Autobuild-Date(master): Thu Mar 7 15:08:19 UTC 2019 on sn-devel-144 commit 5b4618ca7ac04667b9f5c3b8b11b4f66cb7cac71 Author: Kristján Valur Date: Thu Feb 28 11:34:47 2019 + pygpo: Safer handling of memory for ads_ptr. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit 18638535044e7ce8589c0288c43de90bf1853d5f Author: Kristján Valur Date: Wed Feb 27 16:48:39 2019 + pygpo: Fix module initialization. * Add reference count to type. * Add error checking. * Remove unnecessary tp_new method. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit d2a75489477a6628662e7bb5dd94b3e769e8c3b1 Author: Kristján Valur Date: Wed Feb 27 16:36:32 2019 + pygpo: keep a reference to python credentials in the ADS struct to keep the internal pointer valid. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit 1ff252e398c6dc140570821394a7cda262af6dd9 Author: Kristján Valur Date: Wed Feb 27 16:32:14 2019 + pygpo: More python exception cleanup. * Don't override existing exceptions. * Careful with talloc contexts. * Return NULL on error. * Add more information to exception messages from internal functions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit a8b316d102e0e864dde4ab39cc20b98f32216ff4 Author: Kristján Valur Date: Wed Feb 27 16:03:16 2019 + pygpo: Fix error handing when getting gpo unix path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit 08b5b11b96c5325d314a0ec8dc9291542e255f6f Author: Kristján Valur Date: Wed Feb 27 14:12:43 2019 + pygpo: Proper exception exit in py_ads_connect(). connect() now succeeds or raises an exception. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power commit 36adf08fabb4977e534eff30bccff30ce427787d Author: Kristján Valur Date: Wed Feb 27 13:36:03 2019 + pygpo: Replace the use of SystemError with RuntimeError. SystemError is reserved for internal errors in the interpreter. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power --- Summary of changes: libgpo/pygpo.c | 244 ++--- 1 file changed, 129 insertions(+), 115 deletions(-) Changeset truncated at 500 lines: diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c index cd107318860..e82cc5c984f 100644 --- a/libgpo/pygpo.c +++ b/libgpo/pygpo.c @@ -74,7 +74,7 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args, { NTSTATUS status; const char *cache_dir = NULL; - PyObject *ret = Py_None; + PyObject *ret = NULL; char *unix_path = NULL; TALLOC_CTX *frame = NULL; static const char *kwlist[] = {"cache_dir", NULL}; @@ -86,9 +86,6 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args, if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s",
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 80cf852dbe4 subunit/run.py: change shebang to python3 via 10109f62ceb tests/auto_log_pass_change.py: only care about the last expected message other than exact messages count via 02c7b8c03d4 subunit/run.py: make iso8601 UTC usage python 2/3 compatible from 8b18da27cf2 s4-server: Open and close a transaction on sam.ldb at startup https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 80cf852dbe4a8091e81e1515351aff393fc12af5 Author: Joe Guo Date: Thu Mar 7 12:12:00 2019 +1300 subunit/run.py: change shebang to python3 always use explicit python version at current stage. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power Autobuild-User(master): Noel Power Autobuild-Date(master): Thu Mar 7 13:03:56 UTC 2019 on sn-devel-144 commit 10109f62ceb0cb435be3c521bd281eae48077535 Author: Joe Guo Date: Thu Mar 7 16:10:27 2019 +1300 tests/auto_log_pass_change.py: only care about the last expected message other than exact messages count The messages count could be different because of racing condition. And we should only care about the last expected one. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett abart...@samba.org Reviewed-by: Noel Power npo...@samba.org commit 02c7b8c03d4970421a5170e44c57cbc3cda82827 Author: Joe Guo Date: Thu Mar 7 12:34:15 2019 +1300 subunit/run.py: make iso8601 UTC usage python 2/3 compatible In `iso8601/iso8601.py`: if sys.version_info >= (3, 2, 0): UTC = datetime.timezone.utc ... else: class Utc(datetime.tzinfo): ... UTC = Utc() The class `Utc` is only available for python < 3.2.0. Use `UTC` instance instead, which is python 2/3 compatible. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Noel Power --- Summary of changes: python/samba/subunit/run.py| 8 ++--- python/samba/tests/auth_log_pass_change.py | 55 +- 2 files changed, 20 insertions(+), 43 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/subunit/run.py b/python/samba/subunit/run.py index 8f32d46ef49..e369b15aa02 100755 --- a/python/samba/subunit/run.py +++ b/python/samba/subunit/run.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Simple subunit testrunner for python # Copyright (C) Jelmer Vernooij 2014 @@ -24,7 +24,7 @@ $ python -m samba.subunit.run mylib.tests.test_suite """ -from iso8601.iso8601 import Utc +from iso8601.iso8601 import UTC import datetime import os @@ -184,7 +184,7 @@ class TestProtocolClient(unittest.TestResult): ":param datetime: A datetime.datetime object. """ -time = a_datetime.astimezone(Utc()) +time = a_datetime.astimezone(UTC) self._stream.write("time: %04d-%02d-%02d %02d:%02d:%02d.%06dZ\n" % ( time.year, time.month, time.day, time.hour, time.minute, time.second, time.microsecond)) @@ -458,7 +458,7 @@ class AutoTimingTestResultDecorator(HookedTestResultDecorator): time = self._time if time is not None: return -time = datetime.datetime.utcnow().replace(tzinfo=Utc()) +time = datetime.datetime.utcnow().replace(tzinfo=UTC) self.decorated.time(time) @property diff --git a/python/samba/tests/auth_log_pass_change.py b/python/samba/tests/auth_log_pass_change.py index 99548679a66..0300fbc06d1 100644 --- a/python/samba/tests/auth_log_pass_change.py +++ b/python/samba/tests/auth_log_pass_change.py @@ -100,12 +100,8 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase): net.change_password(newpassword=password, username=USER_NAME, oldpassword=USER_PASS) - -messages = self.waitForMessages(isLastExpectedMessage) -print("Received %d messages" % len(messages)) -self.assertEquals(8, - len(messages), - "Did not receive the expected number of messages") +self.assertTrue(self.waitForMessages(isLastExpectedMessage), +"Did not receive the expected message") def test_admin_change_password_new_password_fails_restriction(self): def isLastExpectedMessage(msg): @@ -136,11 +132,8 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase): exception_thrown = True self.assertEquals(True, exception_thrown, "Expected exception not thrown") - -messages = self.waitForMessages(isLastExpectedMessage) -self.assertEquals(8, -